Message Boards Message Boards

GROUPS:

How to solve PDE numerically?

Posted 1 month ago
366 Views
|
2 Replies
|
1 Total Likes
|

$$\frac{\partial T^2}{\partial r^2}+\frac{1}{r}\frac{\partial T}{\partial r}+\frac{1}{r^2}\frac{\partial T^2}{\partial \theta^2}+\lambda T=-\lambda r \sin{\theta}$$ The boundary condition are: $T=0$ at $r=1$ and $T=finite$ at $r=0$ and $\theta$ varying from 0 to 2 Pi.

  eqn = D[T[r, \[Theta]], {r, 2}] + 1/r D[T[r, \[Theta]], {r, 1}] + 
       1/r^2 D[T[r, \[Theta]], {\[Theta], 2}] + \[Lambda]^2 T[
         r, \[Theta]] == -\[Lambda] r Sin[\[Theta]]

Although this problem i had solved first manually using separation of variable then applying the shooting method. But i want to solve this using Mathematica alone. In separation of variable i assumed $T=F(r) \sin{\theta}$ and then i solved ode using the shooting method. The boundary condition was: $F=0$ at $r=1$ and $F'=0$ at $r=0$.

2 Replies

I tried

eqn = D[T[r, \[Theta]], {r, 2}] + 1/r D[T[r, \[Theta]], {r, 1}] + 1/r^2 D[T[r, \[Theta]], {\[Theta], 2}] + \[Lambda]^2 T[ r, \[Theta]] == -\[Lambda] r Sin[\[Theta]]    
eqn1 = FullSimplify[# r^2] & /@ eqn    
eqn2 = eqn1 /. \[Lambda] -> 1.2    
lsg = NDSolve[
  {eqn /. \[Lambda] -> 0, T[0, \[Theta]] == 5, 
   D[T[r, \[Theta]], r] == 0 /. r -> 0},
  T,
  {r, 0, 1}, {\[Theta], 0, 2 Pi},
  Method -> {"MethodOfLines", 
    "DifferentiateBoundaryConditions" -> False}]

But that doesn't do the job. Unfortunately the error messages do not give any hint how to avoid the division by zero. A question for Support?

Posted 1 month ago

Yes! the same problem i encountered while i was trying before going for manual way. Yes it need support team help.

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