- #1

Daniel Sellers

- 117

- 17

- TL;DR Summary
- I have a discretized second order PDE which I am attempting to solve numerically and having a hard time. Looking for suggestions for the best way to solve it.

I am attempting to solve the following PDE for Ψ representing a stream function on a 2D annulus grid:

(1/s)⋅(∂/∂s)[(s/ρ)(∂ψ/∂s)] + (1/s2)⋅(∂/∂Φ)[(1/ρ)(∂ψ/∂Φ)] - 2Ω + ρ(c0 + c1ψ) = 0

I have made a vertex centered discretization:

(1/s

This can be made to form a tridiagonal matrix by iterating through j with constant l, if we can treat ψ

The resulting tridiagonal matrix (in terms of ψ

Is it valid to assume R = k

Alternatively, we could base the R

Neither of these methods seems to converge over many iterations. The first method, where R is based completely on a 'guess' vector with 2Ω - ρ

Thanks for reading this far, I realize my approach may be somewhat naive as I have not developed intuition for this kind of problem solving yet. How would you solve this PDE numerically?

(1/s)⋅(∂/∂s)[(s/ρ)(∂ψ/∂s)] + (1/s2)⋅(∂/∂Φ)[(1/ρ)(∂ψ/∂Φ)] - 2Ω + ρ(c0 + c1ψ) = 0

I have made a vertex centered discretization:

(1/s

_{j})⋅(1/Δs^{2})⋅**[**(s_{j+1/2}/ρ_{j+1/2,l}){ψ_{j+1,l}- ψ_{j,l}} - (s_{j-1/2}/ρ_{j-1/2,l}){ψ_{j,l}- ψ_{j-1,l}}**]**+ (1/s_{j}^{2})⋅(1/ΔΦ^{2})⋅**[**(1/ρ_{j,l+1})⋅{ψ_{j,l+1}- ψ_{j,l}} - (1/ρ_{j,l-1})⋅{ψ_{j,l}- ψ_{j,l-1}}**] -**2Ω + ρ_{j,l}(c0 + c1Ψ_{j,l})This can be made to form a tridiagonal matrix by iterating through j with constant l, if we can treat ψ

_{j,l+1}and ψ_{j,l-1}terms as known values. It's been suggested to me that we can group these two terms together (R = k_{1}ψ_{j,l+1}+ k_{2}ψ_{j,l-1}) and solve for them based on an 'initial guess' of all Ψ_{j,l=c}.The resulting tridiagonal matrix (in terms of ψ

_{j,l}, ψ_{j-1,l}, ψ_{j+1,l}) can then be solved as long as the boundary conditions are specified. The problem I'm running into is how to actually treat R.Is it valid to assume R = k

_{1}ψ_{j,l+1}+ k_{2}ψ_{j,l-1}+ 2Ω - ρ_{j,l}c0 (group all of the known terms in the equation together)? If the last two terms are included in R then the method just results in solving for the initial guess given.Alternatively, we could base the R

_{1}on an initial guess, solve for Ψ_{1},l in terms of Ψ_{2,l}and then find R_{2}in terms of Ψ_{1,l}, Ψ_{2,l}, Ψ_{3,l}. This let's us find Ψ_{2,l}in terms of only Ψ_{3,l}and so on. I believe this is similar methodology to the Guass-Seidel method of updating in place.Neither of these methods seems to converge over many iterations. The first method, where R is based completely on a 'guess' vector with 2Ω - ρ

_{j,l}c0 implicitly included, the values for psi simply decrease slowly over each iteration. The second method I've described appears to be even more unstable and quickly blows up to huge values no matter the initial guess.Thanks for reading this far, I realize my approach may be somewhat naive as I have not developed intuition for this kind of problem solving yet. How would you solve this PDE numerically?