Help discretizing this PDE (stream function)

  • Context: Undergrad 
  • Thread starter Thread starter Daniel Sellers
  • Start date Start date
  • Tags Tags
    Function Pde
Click For Summary

Discussion Overview

The discussion revolves around the discretization of a partial differential equation (PDE) for a stream function ψ in cylindrical coordinates, specifically within a 2D annulus grid. Participants explore various methods for numerical solving, including Gauss-Seidel methods, while addressing the complexities of the discretization process.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents a PDE and two approaches for discretizing it: vertex-centered and cell-centered methods, seeking feedback on potential flaws or instabilities.
  • The vertex-centered discretization is outlined, focusing on approximating differential terms by evaluating the slope of ψ at the boundaries of Δs.
  • The cell-centered discretization is also described, with a similar focus on approximating the differential terms.
  • Another participant questions the assumption of mass density being constant, prompting a clarification about its dependence on cylindrical coordinates s and Φ.
  • A later reply confirms that density varies with s and Φ, providing the complete form of the PDE, which includes additional terms related to frame rotation and constants from a Taylor expansion.
  • A mathematical expression is shared to illustrate a specific discretization approach for the first term of the PDE, emphasizing the dependence on density and the grid structure.

Areas of Agreement / Disagreement

Participants express differing views on the constancy of mass density, with one participant assuming it to be constant while another clarifies that it varies with the coordinates. The discussion remains unresolved regarding the implications of this variability on the discretization methods proposed.

Contextual Notes

Participants have not reached consensus on the assumptions regarding mass density, which may affect the discretization approach. The discussion also highlights the complexity of accurately representing the PDE in a numerical format, with potential oversights in the discretization methods being a concern.

Daniel Sellers
Messages
117
Reaction score
17
TL;DR
I have attempted two different methods of discretization for a PDE on a 2D annulus grid in cylindrical coordinates. I would appreciate anyone pointing out problems or suggesting better methods. This is part of research I am conducting as an undergrad.
I have a PDE that I want to solve for a stream function ψ(j,l) by discretizing it on a 2D annulus grid in cylindrical coordinates, then solving with guas-seidel methods (or maybe a different method, not the point):

(1/s)⋅(∂/∂s)[(s/ρ)(∂ψ/∂s)] + (1/s2)⋅(∂/∂Φ)[(1/ρ)(∂ψ/∂Φ)]

Where s and Φ are cylindrical coordinates, ρ is mass density (known through other means)

I've attempted to discretize this equation in a cell centered manner (which is what my professor suggested) but I also discretized it with ψ defined at the vertexes because it is easier for me to think about (I am fairly new to this type of numerical equation solving).

Vertex Centered Discretization (please see vertex centered grid attached):

(1/sj)⋅(1/Δs2)⋅[(sj+1j+1,l){ψj+1,l - ψj,l} - (sj-1j-1,l){ψj,l - ψj-1,l}] + (1/sj2)⋅(1/ΔΦ2)⋅[(1/ρj,l+1)⋅{ψj,l+1 - ψj,l} - (1/ρj,l-1)⋅{ψj,l - ψj,l-1}]

Cell Centered Discretization (see cell centered grid attached):

(1/sj)⋅(1/Δs2)⋅[(sj+3/2j+1,l){ψj+1,l - ψj,l} - (sj-1/2j-1,l){ψj,l - ψj-1,l}] + (1/sj+1/22)⋅(1/ΔΦ2)⋅[(1/ρj+1,l)⋅{ψj,l+1 - ψj,l} - (1/ρj-1,l)⋅{ψj,l - ψj,l-1}]

In each case I am attempting to approximate the outside differential terms by finding difference in the slope of ψ at either end of Δs for each iteration.

Does this make sense to anyone familiar with this type of numerical problem solving? Are there any obvious flaws, instabilities or oversights I've missed?
 

Attachments

  • Vertex_Center.png
    Vertex_Center.png
    4.9 KB · Views: 438
  • Cell_Center.png
    Cell_Center.png
    5.8 KB · Views: 439
Physics news on Phys.org
Oh, I should probably mention that I am only giving the terms which I need help discretizing. The rest of the equation is straightforward to discretize and is mostly constant terms.
 
Shouldn't the mass density be constant? If not, please describe the exact problem being solved.
 
No, the density depends on s and Φ, the entire equation is:

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

Where Ω is frame rotation rate and c0, c1 are arbitrary constants (from the first and second term of a taylor expansion).
 
$$\frac{1}{s}\frac{\partial}{\partial s}\left(\frac{s}{\rho}\frac{\partial \psi}{\partial s}\right)=\frac{1}{s_i}\frac{\left[\frac{s_{i+1/2}}{\rho_{i+1/2}}(\psi_{i+1,j}-\psi_{i,j})-\frac{s_{i-1/2}}{\rho_{i-1/2}}(\psi_{i,j}-\psi_{i-1,j})\right]}{(\Delta s)^2}$$
 
  • Like
Likes   Reactions: Daniel Sellers

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
10K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K