I am trying to solve the system of PDE with NDSolve and I got an error message like this
NDSolve::deqn: "Equation or list of equations expected instead of
ConditionalExpression[[Eta]r[[Xi]r]==Ir[[Xi]r] (26/125 (1+Times[<<2>>])+2 Re[Times[<<2>>]])+Il[[Xi]l] (Im[Times[<<2>>]+Times[<<4>>]+Times[<<2>>]]-13/125 Re[Times[<<2>>]])+Sqrt[Il[[Xi]l]Ir[[Xi]r]] (Cos[[Phi][<<3>>]] (Times[<<2>>]+Times[<<2>>])-(Times[<<2>>]+Times[<<2>>]) Sin[[Phi][<<3>>]]),<<1>>] in the first argument {{ConditionalExpression[[Eta]r[[Xi]r]==Ir[[Xi]r] (Times[<<2>>]+Times[<<2>>])+Il[[Xi]l] (Im[<<1>>]+Times[<<2>>])+Sqrt[Times[<<2>>]] (Times[<<2>>]+Times[<<3>>]),<<1>>],<<4>>,<<1>>},{[CapitalPhi][0,0,0]==[Pi],[Eta]r[0]==1.57389,[Eta]l[0]==1.57389}}.
I have 2 questions related to this problem:
Can I somehow see what is <<1>>? As I undertand from here http://reference.wolfram.com/language/ref/Skeleton.html <<1>> is a short form of some expression, when mathematica think that it is too long. I just want to see full text of this error.
Can I tell to mathematica, that some of my unknown variables are real and more than 0. I am afraid, that I got this error message, because I have something like Sqrt[Ir*Il] in my system of PDE. and if mathematica think, that Ir and Il can be negative or complex, it will be very difficult to solve this system. I just want to tell mathematica try to find soliution only for positive Ir and Il. I tried to use Assuming like this
Assuming[Ir is Reals && Ir > 0, NDSolve[...]]
but it does not help anyhow.
Update with full example. I have many Greek symbols, when I copied it, it became chnaged a little bit
ϵr:=Rationalize[0.001];
ϵl:=Rationalize[0.002];
KH:=Rationalize[0.12];
L := 1;
S := Sqrt[3]/4*L^2;
μ:=4*S/(WL*L);
ϕ0 :=Pi;
systemtosolve={
ηr[ξr]==Im[β[ξr]]*Ir[ξr]+Im[θl[ξl,ξr]]*Il[ξl] + (Im[σr[ξl, ξr]]*Cos[ϕ[t,ξl,ξr]]-Re[σr[ξl, ξr]]*Sin[ϕ[t,ξl,ξr]])*Sqrt[Ir[ξr]*Il[ξl]],
ηl[ξl]==Im[β[ξl]]*Il[ξl]+Im[θr[ξl,ξr]]*Ir[ξr] + (Im[σl[ξl, ξr]]*Cos[ϕ[t,ξl,ξr]]+Re[σl[ξl, ξr]]*Sin[ϕ[t,ξl,ξr]])*Sqrt[Ir[ξr]*Il[ξl]],
μ *D[Φ[t,ξl,ξr],t]==(ωj[ξr,ωab,ku]-ωj[ξl,ωab,ku])-c/L*KH*(
Re[Z[ξr]-Z[ξl]]
-Ir[ξr]*(Re[β[ξr]]-Re[θr[ξl,ξr]])
+Il[ξl]*(Re[β[ξl]]-Re[θl[ξl,ξr]])
-2*(Re[(σr[ξl, ξr]-σl[ξl, ξr])/2]*Cos[ϕ[t,ξl,ξr]]-Im[(σr[ξl, ξr]+σl[ξl, ξr])/2]*Sin[ϕ[t,ξl,ξr]])*Sqrt[Ir[ξ]*Il[ξ]]),
ηr[ξr]==Im[Z[ξr]]-ϵr/KH,
ηl[ξl]==Im[Z[ξl]]-ϵl/KH,
ϕ[t,ξl,ξr]==μ *Φ[t,ξl,ξr]+KH*Re[Z[ξr]-Z[ξl]]-ϕ0
};
ic = {
Φ[0, 0, 0] == Pi,
ηr[0] == Im[Z[0]] - ϵr/KH,
ηl[0] == Im[Z[0]] - ϵr/KH
};
vars = {ηr, ηl, Φ, Ir, Il};
syssolution = Assuming[ηr∈Reals&&ηr>0&&ηl∈Reals&&ηl>0Ir[ξr]∈Reals&&Ir[ξr]>0&&Il[ξl]∈Reals&&Il[ξl]>0&&Φ∈Reals&&Φ>0ξr∈Reals&& ξl∈Reals && ξr < 0.5 && ξr > -0.5&& ξl < 0.5 && ξl > -0.5, NDSolve[{systemtosolve,ic},vars,{t,0,10^-6},{ξr,-0.1,0.1},{ξl,-0.1,0.1}]];
NDSolve::deqn: "Equation or list of equations expected instead of ConditionalExpression[ηr[ξr]==Ir[ξr]\ (26/125\ (1+Times[<<2>>])+2\ Re[Times[<<2>>]])+Il[ξl]\ (Im[Times[<<2>>]+Times[<<4>>]+Times[<<2>>]]-13/125\ Re[Times[<<2>>]])+Sqrt[Il[ξl]\Ir[ξr]]\ (Cos[ϕ[<<3>>]]\ (Times[<<2>>]+Times[<<2>>])-(Times[<<2>>]+Times[<<2>>])\ Sin[ϕ[<<3>>]]),<<1>>] in the first argument {{ConditionalExpression[ηr[ξr]==Ir[ξr]\ (Times[<<2>>]+Times[<<2>>])+Il[ξl]\ (Im[<<1>>]+Times[<<2>>])+Sqrt[Times[<<2>>]]\ (Times[<<2>>]+Times[<<3>>]),<<1>>],<<4>>,<<1>>},{Φ[0,0,0]==π,ηr[0]==1.57389,ηl[0]==1.57389}}."
There are functions β, θl, σr, Z which are normal complex functions and they are working good, because before I have a graphs for all of them.
I made a screenshot for better understanding (Image is a small in preview. Please save it and open separately to have a good quality.)
Update2
I tried to minimize my system and I found the main reason, but I still do not know what I can do.
My code looks like this
KH := Rationalize[0.12];
L := 1;
S := Sqrt[3]/4*L^2;
μ := 4*S/(WL*L); ϕ0 := Pi;
systemtosolve = { D[Φ[t, ξl, ξr], t] == 1 +
Cos[μ *Φ[t, ξl, ξr] +
KH*Re[Z[ξr] - Z[ξl]] - ϕ0] };
ic = { Φ[0, ξl, ξr] == Pi };
vars = {Φ};
syssolution = NDSolve[{systemtosolve, ic}, vars, {t, 0, 1}, {ξr, -0.1, 0.1}, {ξl, -0.1, 0.1}];
NDSolve::deqn: Equation or list of equations expected instead of ConditionalExpression[(Φ^(1,0,0))[t,ξl,ξr]==1-Cos[3/25 Plus[<<2>>]+1250000000/791 Power[<<2>>] Φ[<<3>>]],(((0.
-2. I) ξl∈Reals&&Re[(0. +2. I) ξl]<0.208)||Re[(0. -1. I) ξl]>-0.104)&&(((0. -2. I) ξr∈Reals&&Re[(0. +2. I) ξr]<0.208)||Re[(0. -1. I) ξr]>-0.104)] in the first argument {{ConditionalExpression[(Φ^(1,0,0))[t,ξl,ξr]==1-Cos[Plus[<<2>>]],((Times[<<2>>]∈Reals&&Re[<<1>>]<0.208)||Re[Times[<<2>>]]>-0.104)&&((Times[<<2>>]∈Reals&&Re[<<1>>]<0.208)||Re[Times[<<2>>]]>-0.104)]},{Φ[0,ξl,ξr]==π}}.
>>
The problem dissappeared if I remove function Z[] This function is defined like this
Z[x_] := 2*I*Integrate[Exp[-y^2.0 + 2.0*I*y*x], {y, 0, Infinity}];
When I just calculate Z function or draw it's graph everything is fine, but NDSolve do not like this function somehow.
Can you help me to understand, what is wrong with Z function?
NDSolve
was given as an argument. It is complaining that the argument is NOT an equation or a list of equations. I think you have a syntax problem somewhere, not a numerical one. Can you show a minimal example of your code so we can reproduce the problem? $\endgroup$NDSolve
to see what the message is complaining about. ProbablyConditionalExpression
is not the construct you want. $\endgroup$DSolve
andNDSolve
do not use assumptions themselves. I can't find the reference on this now, but this came up before. Here is dsolve-will-not-apply-assumption question on assumptions withDSolve
$\endgroup$