Help discretizing this PDE (stream function)

  • I
  • Thread starter Daniel Sellers
  • Start date
  • Tags
    Function Pde
In summary: Delta \phi)^2}$$In summary, the conversation discusses the discretization of a partial differential equation in cylindrical coordinates to solve for a stream function ψ
  • #1
Daniel Sellers
117
17
TL;DR Summary
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: 348
  • Cell_Center.png
    Cell_Center.png
    5.8 KB · Views: 351
Physics news on Phys.org
  • #2
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.
 
  • #3
Shouldn't the mass density be constant? If not, please describe the exact problem being solved.
 
  • #4
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).
 
  • #5
$$\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 Daniel Sellers

1. What is a PDE and why is it important to discretize it?

A PDE, or partial differential equation, is a mathematical equation that involves multiple variables and their partial derivatives. It is important to discretize a PDE in order to solve it numerically, as it allows us to approximate the continuous solution on a discrete grid of points.

2. How do you discretize a PDE?

Discretizing a PDE involves replacing the continuous derivatives with finite difference approximations on a discrete grid. This grid can be in one, two, or three dimensions, depending on the number of variables in the PDE. The discretized equation can then be solved using numerical methods.

3. What is the stream function in a PDE?

The stream function is a mathematical function used to describe the flow of a fluid in two dimensions. It is defined as the ratio of the fluid's velocity components in the x and y directions, and is often used in the discretization of the Navier-Stokes equations, which govern fluid flow.

4. What are the benefits of discretizing a PDE?

Discretizing a PDE allows us to solve complex mathematical equations numerically, which may not have analytical solutions. It also allows us to study the behavior of a system over time, as we can step through the discrete time intervals and observe how the solution changes.

5. Are there any limitations to discretizing a PDE?

One limitation of discretizing a PDE is that the accuracy of the solution depends on the size of the grid used. A smaller grid may provide a more accurate solution, but it also requires more computational resources. Additionally, the discretization process may introduce errors or artifacts in the solution, which must be carefully considered and addressed.

Similar threads

Replies
6
Views
2K
  • Differential Equations
Replies
10
Views
3K
  • Differential Equations
Replies
4
Views
2K
  • Differential Equations
Replies
1
Views
2K
  • Differential Equations
Replies
9
Views
2K
Replies
3
Views
9K
  • Electromagnetism
Replies
6
Views
2K
  • Programming and Computer Science
Replies
4
Views
3K
  • Advanced Physics Homework Help
Replies
7
Views
1K
Replies
1
Views
585
Back
Top