I'm trying to solve this system of differential equation (the ones in yellow markers are just constants):
The initial conditions for this system are n(0) = NN, na(0) = Na, n'(0) = q(0) = 0, q'(0) = some_constants, na'(0) = Ip(0)×Some_other_constants (shown in my code below).
FWHM = 9;
sd = 2.355*FWHM;
\[Sigma]p = 1.15*10^-21; (* m^2 *)
\[Sigma]pa = 3.8*10^-21; (* m^2 *)
\[Sigma]e11 = 1.1*10^-20; (* m^2 *)
\[Sigma]111 = 0.4*10^-20; (* m^2 *)
\[Sigma]aa1 = 4.1*10^-20; (* m^2 *)
\[Sigma]ea1 = 0.9*10^-20; (* m^2 *)
\[Sigma]1a1 = 1.3*10^-20; (* m^2 *)
\[Sigma]eaa = 3.05*10^-20; (* m^2 *)
\[Sigma]1aa = 2.0*10^-20; (* m^2 *)
NN = 9*10^27; (* m^-3 *)
Na = 1.08*10^26; (* m^-3 *)
c = 3*10^8; (* m/s*)
\[Eta] = 1.32;
\[CapitalOmega] = 5.2*10^-8;
\[CapitalOmega]a = 2.5*10^-6;
L = 0.003; (*m*)
V = 0.38;
\[Tau] = 4*10^-9 ;(*s*)
\[Tau]a = 4*10^-9; (*s*)
Ip [t] == 2.5 E^(-(t - 8)^2/(2 sd))*10^28;
sol = NDSolve[{
n'[t] == Ip[t] \[Sigma]p (NN - n[t]) - (\[Sigma]e11 c)/\[Eta] n[t] q[t] -
n[t]/\[Tau],
q'[t] == ((\[Sigma]e11 - \[Sigma]111) c)/\[Eta] n[t] q[t] -
q[t]/\[Tau]c[t] + (\[CapitalOmega] n[t])/\[Tau] -
(\[Sigma]aa1 - c)/\[Eta] na[t]q[t] + (\[Sigma]ea1*c)/\[Eta] (Na - na[t]) q[t] -
(\[Sigma]aa1 c)/\[Eta] (Na - na[t]) q[t],
na'[t] == -Ip[t] \[Sigma]pa na[t] + (\[Sigma]ea1 c)/\[Eta] (Na - na[t]) q[t] +
(Na - na[t])/\[Tau]a - (\[Sigma]aa1 c)/\[Eta] na[t] q[t] +
(2 \[CapitalOmega]a)/(\[Tau]a L (\[Sigma]eaa - \[Sigma]1aa))*
((exp ((\[Sigma]eaa - \[Sigma]1aa) (Na - na[t]) L)) - 1) ,
\[Tau]c [t_] == (\[Eta] L^3)/(8 c \[Pi]^2) (n[t] (\[Sigma]e11 - \[Sigma]111) V)^2,
Ip [t_] == 2.5 E^(-(t - 8)^2/(2 sd))*10^28,
n[0] == NN , q[0] == 0, na[0] == Na,
n'[0] == 0, q'[0] == (\[CapitalOmega] NN)/\[Tau],
na'[0] == -Ip[0] \[Sigma]pa Na,
\[Tau]c[0] == (\[Eta] L^3)/(8 c \[Pi]^2) (NN (\[Sigma]e11 - \[Sigma]111) V)^2},
{n, q, na}, {t, 0, 17}];
Plot[Evaluate[{n[t], na[t], q[t], \[Tau][t]} /. s], {t, 0, 17},
PlotPoints -> (t, 0, 1000)]
I've tried to write my code as shown above, however I got an error message
NDSolve::idelay: Initial history needs to be specified for all variables for delay-differential equations.
I'm not familiar with this topic and I personally think that I am not intending to solve a 'delay' equation. Can anyone pointing out my mistakes? Thank you.
exp()
? It should beExp[]
. And should beIp [t_] = 2.5 E^(-(t - 8)^2/(2 sd))*10^28
$\endgroup$\[Tau]c [t_]
needs to come outside ofNDSolve
and have correct function syntax. Same withIp [t]
. But even with all these fixes I'm still gettingThe number of constraints 6 is not equal to the total differential order of the system plus the number of discrete variables 3
and that means there are still more errors in this. $\endgroup$