-1
$\begingroup$

I do not understand why it is that my density plot is not showing. Any help would be appreciated.

Clear[x, y];
x = Range[100, 1000];
y = Range[100, 1000];
x = (-p11*(1/xi + I k) - p44*(1/xi + I k)*(I k - 1/xi) + 
  p66*(1/xi^2 + k^2) + y*(q22*(1/xi + I k) - q33*(1/xi + I k) (I k - 1/xi) - 
  q44*(1/xi^2 + k^2) - q55*(1/xi - I k)))/(p22 + p33*(I k - 1/xi) - p55*(1/xi^2 + k^2));
  y = (-q11*(1/xi - I k) - x*(q22*(1/xi + I k) - q33*(1/xi + I k)*(I k - 1/xi) - 
  q44*(1/xi^2 + k^2) - q55*(1/xi - I k)))/(p22 + p33*(I k - 1/xi) - p55*(1/xi^2 + k^2));
  DensityPlot[Im[y], {xi, 1, 100}, {k, 1, 100}, ColorFunction -> "SunsetColors", PlotLegends -> Automatic, 
  PlotRange -> {Automatic, Automatic, Full}]

I'm providing the full code for your reference.

omegaJ = 4*10^-15;
lambdaJ = 10^12;
zion = 1;
e = 1.602*10^-19;              (* electron charge *)
teqlb = 10^6;                  (* equilibrium temp *)
melec = 9.1094*10^-31;         (* mass of electron *)
ionFreq = 1.00*10^1;
freqID = 5.00*10^-3;           (* ion-dust attachment frequency*)
freqED = 1.00*10^2;
rdust = 37.5*10^-6;            (* dust radius *)
mion = 2*10^-14;               (*ion mass *)
mnd = 4.0*10^-16;              (*-ve dust mass*)
grav = 6.67*10^-11;            (*gravitational constant*)
cs = 4*10^-3;                  (*sound speed *)
ne0 = 5*10^3;                  
ni0 = 10^3;                 
nnd0 = 1.39*10^1;
veff = ionFreq/(2*ni0);
znd0 = 10^4;    
qnd0 = -znd0*e;                (*equilibrium dust charge*)
etemp = 10^5;                                   
itemp = 10^4;
Subscript[i, e0] = Abs[-\[Pi] *rdust^2*e*((8*etemp)/(\[Pi]*melec))^0.5*ne0*
 Exp[(e*qnd0)/(rdust*etemp)]];          (*electron current*)
Subscript[i, i0] = Abs[\[Pi]*rdust^2*e*((8*itemp)/(\[Pi]*mion))^0.5*
ni0*(1 - (e*qnd0)/(rdust*itemp))];            (*Ion current *)
ndCf = 10^4*e;
c = (-freqED + ionFreq - 2*ne0*veff)/omegaJ;
d = (3*visco*omegaJ)/(melec*ne0*lambdaJ*xi^2) + (visco*omegaJ*k^2)/(
melec*ne0*lambdaJ);
h = ((3*visco)/(lambdaJ*nnd0*mnd*xi^2))*omegaJ;
gamma = (4*\[Pi]*e^2*lambdaJ^2)/teqlb;
beta = (qnd0*nnd0)/e;
a1 = teqlb/(mion*cs^2);
a2 = -zion*ni0*omegaJ*a1;
a3 = -zion*ni0*(2*veff*ni0 - ionFreq);
a4 = -(beta*Subscript[i, e0])/qnd0;
a5 = (beta*Subscript[i, i0]*(2*veff*ni0 - ionFreq))/qnd0;
a6 = (beta*Subscript[i, i0]*omegaJ*a1)/qnd0;
r5 = (qnd0*teqlb*omegaJ)/(e*mnd*cs);
r6 = (qnd0*teqlb)/(e*lambdaJ*mnd);
r8 = -(1/(melec*lambdaJ) + (teqlb*qnd0*omegaJ)/(e*mnd));
r9 = (2*teqlb*k)/(melec*lambdaJ);
r10 = (2*teqlb*k)/(lambdaJ*mnd);
d1 = h*d*c*freqID*ndCf;
d6 = r10*c*d*freqID*ndCf;
d11 = h*d*c*ndCf;
d15 = c*d*r10*ndCf;
d16 = d*c*freqID;
e4 = d*r10*freqID*ndCf - c*d*r10*ndCf*omegaJ - c*d*r10*freqID*omegaJ -
c*r10*cs*omegaJ*freqID*ndCf;
e11 = d*r10*ndCf - c*d*r10*omegaJ - c*r10*ndCf*cs*omegaJ;
e13 = d*freqID - d*c*omegaJ - c*freqID - cs*omegaJ;
p11 = a2*d15 + a6*r10*c*d;           
p22 = a2*d11 + a6*h*d*c ;           
p33 = r8*h*a3*ndCf - r8*h*ne0*freqID*ndCf + r8*h*a4*freqID + 
r8*h*a5 + beta (r5 + r6)*d16*omegaJ;
p44 = r8*r10*a3*ndCf - r8*r10*ne0*freqID*ndCf + r8*r10*a4*freqID + r8*r10*a5;
p55 = d1/gamma;
p66 = d6/gamma;     
q11 = -beta*(r5 + r6)*d16*ndCf;    
q22 =  a2*e11 + a6*r10*d - a6*c*cs*omegaJ*r10;  
q33 = r8*r10*a3*omegaJ + r8*r10*ne0*freqID*omegaJ + r8*r10*ne0*ndCf*omegaJ - r8*r10*a4*omegaJ;                        
q44 = e4/gamma;
q55 = e13*ndCf;
Clear[x, y];
x = Range[100, 1000];
y = Range[100, 1000];
x = (-p11*(1/xi + I k) - p44*(1/xi + I k)*(I k - 1/xi) + p66*(1/xi^2 + k^2) + 
 y*(q22*(1/xi + I k) - q33*(1/xi + I k) (I k - 1/xi) - q44*(1/xi^2 + k^2) - q55*(1/xi 
 - I k)))/(p22 + p33*(I k - 1/xi) - p55*(1/xi^2 + k^2));
y = (-q11*(1/xi - I k) - x*(q22*(1/xi + I k) - q33*(1/xi + I k)*(I k - 1/xi) - 
 q44*(1/xi^2 + k^2) - q55*(1/xi - I k)))/(p22 + p33*(I k - 1/xi) - p55*(1/xi^2 + 
 k^2));
DensityPlot[Im[y], {xi, 1, 100}, {k, 1, 100}, ColorFunction -> "SunsetColors", 
 PlotLegends -> Automatic, PlotRange -> {Automatic, Automatic, Full}]
$\endgroup$
4
  • 1
    $\begingroup$ Provide definitions for all of your parameters. e.g. p11,p44 and so on. $\endgroup$ – Edmund Apr 27 at 13:40
  • $\begingroup$ There are parameters without numerical values in your code $\endgroup$ – DiSp0sablE_H3r0 Apr 27 at 13:41
  • 1
    $\begingroup$ Also, x = Range[100, 1000], but x is reassigned to a formula. The x range is never used. Although x is a function of y = Range[100, 1000], y is a function of the formula, x, but not the range. $\endgroup$ – creidhne Apr 27 at 14:55
  • $\begingroup$ With the full code you've added, look at Variables[x] ... visco is undefined. $\endgroup$ – creidhne May 4 at 21:33

Browse other questions tagged or ask your own question.