Group Abstract Group Abstract

Message Boards Message Boards

ContourPlot in Fast Spherical Harmonics on radiative transfer

Posted 10 years ago
POSTED BY: Sungwoo Yang
4 Replies

Your function B wants omega as a number. What you feed it is a list omega = Range[0.1,0.9,0.2]. Perhaps you should specify the action of B when omega is a list.

POSTED BY: Gianluca Gorni

This is where I am confused. It seems that meanIntensity is just a function of one variable and intensity is a function of two variables. I guess what you are looking for is similar to the following simplified version:

f[x_]:=x+a
g[x_,y_]:=x+y+b

both f and g are functionals depending on the parameters a and b. Your plot should look like a family of curves or surfaces? Am I right?

POSTED BY: Shenghui Yang

In your case before the omegafunctlion is executed, meanIntensity would not be defined. A simplified experiment like below:

In[25]:= f[x_]:=a=3
In[26]:= Head[a]
Out[26]= Symbol
In[27]:= f[1]
Out[27]= 3
In[28]:= Head[a]
Out[28]= Integer

You can plot with the following code:

ContourPlot[ Evaluate[meanIntensity[tau, omega]/meanIntensity[0]], {tau, 0, 10}, {omega, 0, 1}, PlotRange -> {{0, 10}, All}]

sample1

POSTED BY: Shenghui Yang
Posted 10 years ago

Hi Shenghui, Thank you so much for your reply. I was able to get the plot you showed above, but it is not a function of omega. Here is what I typed as you suggested.

omega = 0.1;
{meanIntensity, intensity} = 
  createSphericalHarmonics[0.5, omega, 1., 5, 19];
ContourPlot[
 Evaluate[meanIntensity[tau, omega]/meanIntensity[0]], {tau, 0, 
  5}, {omega, 0, 1}, PlotRange -> {{0, 5}, All}]

But what I am looking for is plot which is function of omega. For example, if I edit below, the plot is not working.

omega = Range[0.1,0.9,0.2];
{meanIntensity, intensity} = 
  createSphericalHarmonics[0.5, omega, 1., 5, 19];
ContourPlot[
 Evaluate[meanIntensity[tau, omega]/meanIntensity[0]], {tau, 0, 
  5}, {omega, 0, 1}, PlotRange -> {{0, 5}, All}]

I appreciate your help.

POSTED BY: Sungwoo Yang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard