I am looking for a particular type of plots. OK, let me explain,
Here is my DE (I don't know what to call it),
where, $\frac{\partial p}{\partial r} =0$, $r_1=\epsilon$, $r_2=1+\phi\cos(2\pi z)$. We have another quantity, $Q(z)=Q^*-(1+\phi^2/2)+\epsilon^2$,
$$Q(z)=2\int_{r1}^{r2}r w[r,z]dr$$,
and finally, we have another quantity,
$$\Delta P=\int_{0}^{1}\frac{\partial p}{\partial z}dz$$. The paper, I am reviewing, does this,
First solve the original PDE for $w[r,z]$ by treating it as an ODE assuming $p_z$ to be a constant.
Integrate $w[r,z]$ w.r.t $r$, then sub the expression for $Q(z)$ and then solve for $p_z$.
Finally, integrate $p_z$ w.r.t $z$ to get $\Delta P$.
The authors find analytical solution, which then make the whole process easy but I am looking for a numerical one.
Here is my trying but I am unable to get anywhere with it.
r2 = 1 + phi*Cos[2*Pi*z]; K1 = 0.2; epsilon = 0.32; phi = 0.4;
sol[P1_, z_] :=
First@NDSolve[{P1 == 1/r*D[r*D[w[r], r], r] - 1/K1*(w[r] + 1),
w[epsilon] == -1, w[1 + phi*Cos[2*Pi*z]] == -1},
w, {r, epsilon, 1 + phi*Cos[2*Pi*z]}]
PP1[z_, Q_] :=
NSolve[(Q - (1 + phi^2/2) + epsilon^2) -
2*NIntegrate[
r*w[r] /. sol[P1, z], {r, epsilon, 1 + phi*Cos[2*Pi*z]}], P1]
Plot[PP1[z, 0.1], {z, 0, 1}]
DP[Q_] := NIntegrate[PP1[z, 0.1], {z, 0, 1}]
Plot[DP[Q], {Q, -1, 1}]
NSolve
as a hybrid symbolic-numeric solver. You probably wantFindRoot
instead. If I have time later, I'll take a look. $\endgroup$ – Michael E2 Dec 14 '18 at 15:27Phi
is undefined and therefore the numeric functions cannot solve equations with symbolic parameters. Is it meant to be lowercasephi
. $\endgroup$ – Michael E2 Dec 15 '18 at 0:56Pi
, sorry about that. But still I am getting errors . $\endgroup$ – JaJ Dec 15 '18 at 3:01