# Help me with grad shafranov equation

1. Mar 28, 2013

### BacalhauGT

i need to solve this equation:

$R\frac{\partial }{\partial R} \left ( \frac{1}{R} \frac{\partial }{\partial R} \Psi \right ) + \frac{\partial^2 }{\partial z^2} \Psi = R^2 A_1 - A_2$

psi is a function of Z and R. A1 and A2 are constants

can you help me?

Last edited: Mar 28, 2013
2. Mar 28, 2013

### fzero

Have you succeeded in solving the homogeneous version? Separation of variables will work there. The particular solutions to the inhomogenous equation above seem rather easy to guess at.

3. Mar 29, 2013

### BacalhauGT

for particular solutions i have to solve:

first term = A1 R^2

second = -A2

Right?

4. Mar 29, 2013

### fzero

Not necessarily, the equation reads LHS = RHS. You must check whether either or both terms on the LHS can generate either or both terms on the RHS.

5. Mar 29, 2013

### BacalhauGT

Can you explain me why? (btw, i am sorry, but what do you mean by LHS and RHS?)

Can you explain me that?

My knowledge about differential equations is bad. I know the final solution and i just have to found the particular one. With the method i said i can obtain that solution, i just dont know why it works and if it is luck or incorrect :)

Thank you.

6. Mar 29, 2013

### fzero

Sorry, I meant left-hand side (LHS) and right-hand side (RHS).

Sorry again, I should have clarified what you meant, or wrote something differently to avoid confusion. It is true that we can find the particular solution by first finding a particular solution that gives $A_1 R^2$ and then finding another that gives $-A_2$. I was confused and thought that you meant the first term on the LHS gave the first term on the RHS and similarly for the 2nd terms. So I ended up writing something even more confusing.

To summarize, the equation is linear, so the solution is composed of 3 terms. One is the solution to the homogeneous equation, one is the particular solution for $A_1 R^2$ and the last is the particular solution for $-A_2$.

7. Mar 29, 2013

### BacalhauGT

ok

No. i am wrong. I did exactly what you were thinking :rofl:. So i did:

$R\frac{\partial }{\partial R} \left ( \frac{1}{R} \frac{\partial }{\partial R} \Psi \right ) = R^2 A_1$

and

$\frac{\partial^2 }{\partial z^2} \Psi = - A_2$

I know it is not necessary. But it worked LOL. the particular solution is (A1/8) R^4 - (A2/2) Z^2 and with that method i can obtain (A1/8) R^4 - (A2/2) Z^2 ()

Yes, i understand. So you are saying:

$\Psi_{particular} = \Psi_{-A_2} + \Psi_{A_1 R^2}$, right?

So for $\Psi_{A_1 R^2}$ i have:

$R\frac{\partial }{\partial R} \left ( \frac{1}{R} \frac{\partial }{\partial R} \Psi_{A_1 R^2} \right ) + \frac{\partial^2 }{\partial z^2} \Psi_{A_1 R^2} = R^2 A_1$

right?

Thats my problem, i cant solve it. have i to use separation of variables?

Thank you

8. Mar 29, 2013

### fzero

Yes.

You can use separation of variables. This will recount some of the solutions to the homogenous equation that you found before, but that's ok. You should get an inhomogenous equation for the R dependence, for which you already found the particular solution with your "wrong" method.

Incidently, your wrong method actually seems to work here because the inhomogenous equation is also separable. In general, it would not. As an example, I don't believe it would work for a term like $R z$ on the right-hand side.

9. Mar 29, 2013

### BacalhauGT

Yes i understand. But now, with separation:

$\Psi_{particular} = \Theta_z \Phi_R$

using:

$R\frac{\partial }{\partial R} \left ( \frac{1}{R} \frac{\partial }{\partial R} \Psi_{particular} \right ) + \frac{\partial^2 }{\partial z^2} \Psi_{particular} = R^2 A_1 - A_2$

so i have by separation:

$\Theta_z R\frac{\partial }{\partial R} \left ( \frac{1}{R} \frac{\partial }{\partial R} \Phi_R \right ) + \Phi_R \frac{\partial^2 }{\partial z^2} \Theta_z = R^2 A_1 - A_2$

And now?? thats my problem.

Thank you.

Edit: i dont know if it helps, but the function has to be a pair function in z variable. It helped me when i had terms like const*z with my method, then i did const=0 because const.z is not apair function.

Last edited: Mar 29, 2013
10. Mar 29, 2013

### the_wolfman

Its actually pretty easy to find series solutions to the G-S equation when p' = constant and FF' = constant. This was first done by Solov'ev.

One simple solution is
\psi = -S_1/8 R^2 -S_2/2 Z^2 + S_3 + S_4 R^2 + S_5 (R^4 -4 R^2 Z^2)

Freidberg's Ideal MHD textbook talks more about the solution.

There is also a good paper by one of his former students that keeps higher order terms (and logarithmic terms).
A.J. Cerfon and J.P. Freidberg, Physics of Plasmas 17, 2010

11. Mar 29, 2013

### fzero

I'm sorry, my brain isn't up to speed today. Of course separation of variables doesn't work because of the inhomogeneous terms. I would just guess at the form of the particular solutions. You will end up doing something like you were doing in the first place, that I called the "wrong" method . Look at each term on the left separately to guess the particular solution. But you also need to check how the other derivative terms act on the particular solution act. It was leaving out this step that made me say that the method was "wrong." The method is fine as long as you check every term on the left-hand side.

Let me just give an example to explain. Consider finding a solution to

$$\frac{\partial^2}{\partial z^2} \psi = A_1 R^2.$$

We can guess that $\psi = A_1 R^2 Z^2/2$. Now when we check this in the other term

$$R \frac{\partial}{\partial R} \left( \frac{1}{R} \frac{\partial}{\partial R} \frac{A_1 R^2 Z^2}{2} \right) = 0.$$

So $\psi = A_1 R^2 Z^2/2$ is part of the particular solution.

12. Mar 29, 2013

### BacalhauGT

yes. my solution is:

$\begin{split} R\frac{\partial }{\partial R} \left ( \frac{1}{R} \frac{\partial }{\partial R} \Psi_1 \right ) = A_1 R^2 & \Leftrightarrow \frac{\partial }{\partial R} \left ( \frac{1}{R} \frac{\partial }{\partial R} \Psi_1 \right ) = A_1 R \\ &\Leftrightarrow \left ( \frac{1}{R} \frac{\partial }{\partial R} \Psi_1 \right ) = A_1 \frac{R^2}{2} + E(z) \\ &\Leftrightarrow \frac{\partial }{\partial R} \Psi_1 = A_1 \frac{R^3}{2} + R E(z) \\ &\Leftrightarrow \Psi_1 = A_1 \frac{R^4}{8} + R E(z) + F(z) \end{split}$

and:

$\frac{\partial^2 }{\partial z^2} \Psi_1 = - A_2 \Leftrightarrow \frac{\partial }{\partial z} \Psi_1 = - A_2 z + C(R) \Leftrightarrow \Psi_1 = -A_2 \frac{z^2}{2} + z C(R) + D(R)$

The function has to be pair (C(R)=0). So:

$A_1 \frac{R^4}{8} + R E(z) + F(z) = -A_2 \frac{z^2}{2} + D(R)$

so E(z)=0

then:

$\Psi_1 = \frac{A_1}{8}R^4 - \frac{A_2}{2}z^2$

Thats my method. And i know from a paper that it is right. But i would like to know if my method can be applied here for some reason or is just luck

what do you think. any idea?

edit: with 1st term = -A2 and sexond = A1 R^2, i cant obtain this solution. just a solution that contains homogenious terms and a function of z that is unknown

Last edited: Mar 29, 2013
13. Mar 29, 2013

### BacalhauGT

Thank you.

i know the solution. i can see it in the books, but never how they solved and thats my problem.

Whats realy the name of the book you talked? ideal magnetohydrodynamics?

Last edited: Mar 29, 2013
14. Mar 29, 2013

### the_wolfman

You're getting the correct particular solutions, but I think you're getting a little lucky. To get the solution I posted earlier and more general solutions assume the flux has the form

$\psi = \sum_n \sum_m c_{nm} R^n Z^m$.

Then plug that into the Grad-Shafranov equation $\Delta^* \psi =A_1 R^2 - A_2$ and solve. You'll find that certain combinations of $c_{nm}$ have to sum together in the right way.

It gets a little messy as you keep higher order terms.

Yes. That is the full title.

15. Mar 29, 2013

### BacalhauGT

thank you.

So, i will assume $\psi = \sum_n \sum_m c_{nm} R^n Z^m$.

i just want the particular solution.

So, with your method, i have (with GS eq):

$\sum_{n} \sum_{m} E_m C_n m (m-2) R^{m-2} Z^n + \sum_{n} \sum_{m} E_m C_n n (n-1) R^{2} Z^{n-2}$

then i change $n-2 \rightarrow n' \Leftrightarrow n =n' +2$ and $m-2 \rightarrow m' \Leftrightarrow m =m' +2$, right?

so m' will be -2,-1,0,1,2... and n' -2,0,...

So i get:

$\sum_{n} \sum_{m'+2} E_{m'+2} C_n m' (m'+2) R^{m'} Z^n + \sum_{n'+2} \sum_{m} E_m C_{n'+2} (n'+2) (n'+1) R^{m} Z^{n'}$

sums star in 0. So:

$\sum_{n} \sum_{m} E_{m+2} C_n m (m+2) R^{m} Z^n + E_m C_{n+2} (n+2) (n+1) R^{2} Z^{n} = A_1 R^2 + A_2$

is this?

Now:

i want for m = 2, n=0. it will become:

$E_4 C_0 8 + E_2 C_2 = A_1$

but c_2=0.

if a use C_0=1, i will get E_4 = A_1/8, the result i want. But why cant i choose c_0= other value?

for m=0,n=0, itwill become:

$2 E_0 C_2 = -A_2$

if E_0 = 1, i have c_2 = -A_2/2,the result i want.

But why i have to set E_0 = C_0 = 1?

For example, for n=0,m=0, constant is a homogeneous solution. it is because of that (any constant = constante-1 + 1)?

Thank you!

edit: forget Em and Cn. i can write Cmn. right? with that i have got the right solution. is that, right?

:)

Last edited: Mar 29, 2013