0
$\begingroup$

I am trying to solve set of pdes as below

p=0.01;B=10;n=100;S0=0.01;T0=0.01;
pdes = {D[S[t, z], z] == -2*Im[k]*S[t, z], 3/2*n*D[T[t, z], t] == 2*Im[k]*S[t, z]} /.k-> (1-n/(1-B+I*p*n*T[t,z]^(-3/2)))^(1/2);
bc = {S[t, 0] == S0};
ic = {T[0, z] == T0};
s = NDSolve[{pdes, ic, bc}, {S, T}, {t, 0, 2}, {z, 0, 2}]
ContourPlot[Evaluate[T[t, z] /.s], {t, 0, 2}, {z, 0, 2},PlotLegends -> Automatic]

Then I get error message: NDSolveFEMInitializePDECoefficients::femcnsd: The PDE coefficient -(((0. +0.795 I) S[t,z] (Im^[Prime])[Sqrt[1-100/(-9+(0. +0.0053 I) Power[<<2>>])]])/(Sqrt[1-100/(-9+(0. +0.0053 I)/T[<<2>>]^(3/2))] (-9+(0. +0.0053 I)/T[t,z]^(3/2))^2 T[t,z]^(5/2))) does not evaluate to a numeric scalar at the coordinate {0.05,0.05}; it evaluated to Indeterminate instead.

If I use T[t,z]^(3/2) instead of T[t,z]^(-3/2), it works.

Could any one help me to figure it out?


Strange, it is solved when I just multply fraction with T[t,z]^{3/2}, it becomes

pdes = {D[S[t, z], z] == -2*Im[k]*S[t, z], 
3/2*n*D[T[t, z], t] == 2*Im[k]*S[t, z]} /.k ->(1-n*T[t, z]^(3/2)/(T[t, z]^(3/2) - B*T[t, z]^(3/2) + I*p*n))^(1/2);

I have to say that, although mma is very convinient to solve simple pde and ode, i have to give it up when encounting "complex" pdes. It waisted me too much time just to adjust the equations and find proper methods.

$\endgroup$
  • $\begingroup$ NDSolve is trying to calculate the derivative Im'. $\endgroup$ – Alex Trounev Oct 7 at 21:57
  • $\begingroup$ What does it mean? Alex. $\endgroup$ – sixpenny Oct 8 at 6:07
  • $\begingroup$ It uses a method for which it is necessary to calculate the derivative Im'[]. But this derivative is not defined therefore it evaluated to Indeterminate instead $\endgroup$ – Alex Trounev Oct 8 at 9:29
  • $\begingroup$ Strange. It can be solved when I multiply T[t,z]^{3/2} in the fractions. $\endgroup$ – sixpenny Oct 8 at 9:36
  • $\begingroup$ No, there is a message NDSolveFEMDiscretizePDE::femdpop: The NDSolveFEMFEMStiffnessElements operator failed. $\endgroup$ – Alex Trounev Oct 8 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.