0
|
725 Views
|
|
1 Total Likes
View groups...
Share
GROUPS:

# ParametricNDSolve not working with my system

Posted 6 months ago
 Hi experts, I want to solve the Bloch equations numerically with one parameter. Thus I tried to use ParametricNDSolve, but this does not give me any result, even though there is no mistake. However, when I use NDSolve and just type in a value for the parameter, there is a solution. Therefor I suspect a mistake in my understanding of the ParametricNDSolve. My code looks like this: \[Delta] = 0 \[Gamma] = 0.1 \[Omega] = 1 s = ParametricNDSolve[{Subscript[\[Rho], 22]'[ t] == -\[Gamma]* Subscript[\[Rho], 22][ t] - (I/2*\[Omega]*Subscript[\[Rho], 21][t] - I/2*Conjugate[\[Omega]]*Subscript[\[Rho], 12][t]), Subscript[\[Rho], 11]'[ t] == \[Gamma]* Subscript[\[Rho], 22][ t] + (I/2*\[Omega]*Subscript[\[Rho], 21][t] - I/2*Conjugate[\[Omega]]*Subscript[\[Rho], 12][t]), Subscript[\[Rho], 21]'[ t] == -(I*\[Delta] + g)*Subscript[\[Rho], 21][t] - I/2*\[Omega]*(Subscript[\[Rho], 22][t] - Subscript[\[Rho], 11][t]), Subscript[\[Rho], 21]'[t] == Conjugate[Subscript[\[Rho], 12]'[t]], Subscript[\[Rho], 11][0] == 1, Subscript[\[Rho], 22][0] == 0, Subscript[\[Rho], 12][0] == 0, Subscript[\[Rho], 21][0] == 0}, {Subscript[\[Rho], 11][t], Subscript[\[Rho], 12][t], Subscript[\[Rho], 21][t], Subscript[\[Rho], 22][t]}, {t, 0, 100}, {g}] Plot[Evaluate[ Table[{Subscript[\[Rho], 22][g][t]} /. s, {g, 1, 2, 0.1}]], {t, 0, 100}, PlotRange -> All]  Does anyone see my mistake? Thanks, Emil