Message Boards Message Boards

0
|
3678 Views
|
7 Replies
|
1 Total Likes
View groups...
Share
Share this post:

PDE solving - which solver is best?

Posted 6 years ago

enter image description here

Hello, I am trying to find the best solver for this problem described above. The equation is given in Mathematica commands:

  K1 = i;
  V = Tan[x];
  P = r^2/(Cos[y])^5

  eq = K1*r^3*D[u[r, y], {r, 3}] + r^2*D[u[r, y], {r, 2}] + r*K1*D[V^2*u[r, y], {r, 1}] + V*r*K1*D[u[r, y], {r, 1}] + V*r*K1*D[V*u[r,y], {r,1}]+ V^2*r*K1*D[u[r, y], {r, 1}] + 
V^3*K1*D[u[r, y], {r, 1}] == 2*u[r,y]*P

and the I.C.s are set to:

u(r,0)=1 u(0,y)=1

u'(0,y)=0 u''(0,y)=10

Which solver and method and form of input is best?

Thanks

POSTED BY: Ser Man
7 Replies

Il the cube power the composition of the differential operator three times? If so, your expanded equation should be something like

op = Function[r*D[#, r] + Tan[\[Phi]] D[#, \[Phi]]];
I*Nest[op, \[CapitalPsi][r, \[Phi]], 3] == 
 2 \[CapitalPsi][r, \[Phi]]*r^2/Cos[\[Phi]]^5

provided that i means the imaginary unit.

POSTED BY: Gianluca Gorni
Posted 6 years ago

Yes, it the cubic of the differential operator. Is # really nr 3 ? A typo?

POSTED BY: Ser Man

The # is the argument of the operator, where it receives the Psi. Try op[\[CapitalPsi][r, \[Phi]]]

POSTED BY: Gianluca Gorni
Posted 6 years ago

Thanks for the hint. I tried your form in the previous command:

op = Function[r*D[#, r] + Tan[\[Phi]] D[#, \[Phi]]];I*Nest[op, \[CapitalPsi][r, \[Phi]], 3] ==  2 \[CapitalPsi][r, \[Phi]]*r^2/Cos[\[Phi]]^5

 sol = u[r, y] /. 
 NDSolve[{op,
 u[0, y] == 1,
 Derivative[1, 0][u][0, y] == 0, 
 Derivative[2, 0][u][0, y] == 10, 
 Derivative[3, 0][u][0, y] == 0, 

 u, {r, 0, 3}, {y, 0, 3},
 MaxSteps -> Infinity, PrecisionGoal -> 1,
 AccuracyGoal -> 1, 
 Method -> {"MethodOfLines", 
 "SpatialDiscretization" -> {"TensorProductGrid", 
 "MinPoints" -> 32, "MaxPoints" -> 32, "DifferenceOrder" -> 2},
 Method -> {"Adams", "MaxDifferenceOrder" -> 1}}] // 

 Plot3D[sol, {r, 0, 3}, {y, 0, 3}, AxesLabel -> Automatic]

I got the same error.

How can I start with some basic and simple I.C. that are completely arbitary, and work from there?

Can you propose a model with some arbitrary conditions, so I see what is wrong here?

POSTED BY: Ser Man
Posted 6 years ago

Thanks for the hint. I tried your form in the previous command:

op = Function[r*D[#, r] + Tan[\[Phi]] D[#, \[Phi]]];I*Nest[op, \[CapitalPsi][r, \[Phi]], 3] ==  2 \[CapitalPsi][r, \[Phi]]*r^2/Cos[\[Phi]]^5

 sol = u[r, y] /. 
 NDSolve[{op,
 u[0, y] == 1,
 Derivative[1, 0][u][0, y] == 0, 
 Derivative[2, 0][u][0, y] == 10, 
 Derivative[3, 0][u][0, y] == 0, 

 u, {r, 0, 3}, {y, 0, 3},
 MaxSteps -> Infinity, PrecisionGoal -> 1,
 AccuracyGoal -> 1, 
 Method -> {"MethodOfLines", 
 "SpatialDiscretization" -> {"TensorProductGrid", 
 "MinPoints" -> 32, "MaxPoints" -> 32, "DifferenceOrder" -> 2},
 Method -> {"Adams", "MaxDifferenceOrder" -> 1}}] // 

 Plot3D[sol, {r, 0, 3}, {y, 0, 3}, AxesLabel -> Automatic]

I got the same error.

How can I start with some basic and simple I.C. that are completely arbitary, and work from there?

Can you propose a model with some arbitrary conditions, so I see what is wrong here?

POSTED BY: Ser Man

op is only a component of the equation. The equation is

I*Nest[op, \[CapitalPsi][r, \[Phi]], 3] == 
 2 \[CapitalPsi][r, \[Phi]]*r^2/Cos[\[Phi]]^5
POSTED BY: Gianluca Gorni
Posted 6 years ago
op = I*Nest[op, \[CapitalPsi][r, \[Phi]], 3] ==  2 \[CapitalPsi][r, \[Phi]]*r^2/Cos[\[Phi]]^5

 sol = u[r, y] /. 
 NDSolve[{op,
 u[0, y] == 1,
 Derivative[1, 0][u][0, y] == 0, 
 Derivative[2, 0][u][0, y] == 10, 
 Derivative[3, 0][u][0, y] == 0, 

 u, {r, 0, 3}, {y, 0, 3},
 MaxSteps -> Infinity, PrecisionGoal -> 1,
 AccuracyGoal -> 1, 
 Method -> {"MethodOfLines", 
 "SpatialDiscretization" -> {"TensorProductGrid", 
 "MinPoints" -> 32, "MaxPoints" -> 32, "DifferenceOrder" -> 2},
 Method -> {"Adams", "MaxDifferenceOrder" -> 1}}] // 

 Plot3D[sol, {r, 0, 3}, {y, 0, 3}, AxesLabel -> Automatic]


and I still get this strange message:

0.00021449999999999998` cannot be used as a variable.

Can you try it, and see how it can be given some test-initial conditions to give completion of the command?

Thanks in advance!

POSTED BY: Ser Man
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract