I am trying to solve set of pdes as below
ClearAll["Global`*"] ;
n = 100;
pde = {D[S[t, z, r], z] == -S[t, z, r],
D[T[t, z, r], t] == n^-1 S[t, z, r]};
ic = {T[0, z, r] == 1, S[t, 0, r] == Exp[-r^2]};
sol = NDSolve[{pde, ic}, {S, T}, {t, 0, 10}, {z, 0, 10}, {r, 0, 10}];
ContourPlot[Evaluate[T[t, z, 1] /. sol], {z, 0, 10}, {t, 0, 10}, PlotLegends -> Automatic]
Do I need more equations and initial conditions? By the way, the pdes can not be solved when sequence of equation is different. Is it bug of mma? For example, pdes below can not be solved.
ClearAll["Global`*"] ;
n = 100;
pde = {D[T[t, z], t] == n^-1 S[t, z], D[S[t, z], z] == -S[t, z]};
ic = {T[0, z] == 1, S[t, 0] == 1};
sol = NDSolve[{pde, ic}, {S, T}, {t, 0, 10}, {z, 0, 10}];
ContourPlot[Evaluate[T[t, z] /. sol], {z, 0, 10}, {t, 0, 10}, PlotLegends -> Automatic]
while pdes below can be solved.
ClearAll["Global`*"] ;
n = 100;
pde = {D[S[t, z], z] == -S[t, z], D[T[t, z], t] == n^-1 S[t, z]};
ic = {T[0, z] == 1, S[t, 0] == 1};
sol = NDSolve[{pde, ic}, {S, T}, {t, 0, 10}, {z, 0, 10}];
ContourPlot[Evaluate[T[t, z] /. sol], {z, 0, 10}, {t, 0, 10}, PlotLegends -> Automatic]
In fact, my real pdes is a little more complicated than 1st pde.
ClearAll["Global`*"] ;
n = 100;B=10;p=10^-8;T0=10^-5;S0=10^-6;
pde = {D[S[t, z, r], z] == -2Im[k]*S[t, z, r],
D[T[t, z, r], t] == n^-1 S[t, z, r]}/.k->(1 - (n*T[t, z, r]^(3/2))/(T[t, z, r]^(3/2) - B*T[t, z, r]^(3/2) + I*p*n))^(1/2);
ic = {T[0, z, r] == T0, S[t, 0, r] == S0*Exp[-r^2]};
sol = NDSolve[{pde, ic}, {S, T}, {t, 0, 10}, {z, 0, 10}, {r, 0, 10}];
ContourPlot[Evaluate[T[t, z, 1] /. sol], {z, 0, 10}, {t, 0, 10}, PlotLegends -> Automatic]


NDSolvestumbles on a simple system of equations. – Alex Trounev Oct 08 '19 at 10:28NDSolve[{pde, ic}, {S, T}, {t, 0, 10}, {z, 0, 10}, DependentVariables -> {T[t, z], S[t, z]}]– user21 Oct 08 '19 at 11:47DependentVariablesdoesn't seem to help here. – xzczd Oct 08 '19 at 12:16D[S[t, z], z] == -S[t, z]is troublesome, because it doesn't involve derivative oft, see e.g. https://mathematica.stackexchange.com/q/163923/1871 https://mathematica.stackexchange.com/q/133731/1871 https://mathematica.stackexchange.com/q/184281/1871 https://mathematica.stackexchange.com/q/183745/1871 I'm not quite sure what happens in your case ("FiniteElement"is chosen here), but the underlying issue is similar, I guess. – xzczd Oct 08 '19 at 12:24S[t,z,r]is laser intensity andD[S[t, z, r], z] == -S[t, z, r]expresses laser absorption. Thus, there is no derivative oft. – sixpenny Oct 08 '19 at 12:54NDSolveis having trouble with them. What's the purpose or your question? Understanding whyNDSolvefails, solving the system withNDSolve, solving the system numerically, or solving the system? – xzczd Oct 08 '19 at 13:00T[t,z,r]andS[t,z,r]numerically in the first pdes. – sixpenny Oct 08 '19 at 13:06