2D Finite Difference formulation in polar coordinates.

In summary, the conversation discusses implementing a derivative boundary condition at r=0 in a partial differential equation in polar/cylindrical coordinates. The solution involves discretizing the equation and replacing the boundary condition with known values at r=0. The process is different in a 1-D system compared to a 2-D system, where the boundary points are treated differently. In a 2-D system, the values of T at the neighboring nodes (T1, T2, and T3) are set equal to T0, resulting in T0=T1=T2=T3.
  • #1
maistral
240
17
So I have this PDE:

d2T/dr2 + 1/r dT/dr + d2T/dθ2 = 0.

How do I implement dT/dr || [r = 0] = 0? Also, what should I do about 1/r?

This is actually the first time I am going to attack FDF in polar/cylindrical coordinates. I can finite-difference the base equation fairly decently; I am just having a hard time in implementing the derivative boundary condition at r = 0. Can someone give me an idea what to do?
 
Physics news on Phys.org
  • #2
In practice, no computations are made on the line r=0. I assume you know how to discretize and how to obtain your finite difference matrix-vector system.
Suppose you discretize and you have N+1 nodes from j=0..N in the radial direction where the nodes with index j=0 correspond to r=0. This leads to a matrix-vector system of size (N+1). The Neumann boundary condition (first order) can be written as ## \frac{T_1 - T_0}{\Delta R_1} = 0## or: ## T_0 = T_1##

The solution on the computational nodes at r=0 are known when ##T_1## is known. So you replace every occurence of ##T_0## with ##T_1## and you delete the first row and column of the discretization matrix and you solve the size N matrix system. When the solution ## T_1 .. T_N## is found, you simply add ## T_0 = T_1## to your solution vector.
 
  • #3
Hi. Thanks for replying.

I managed to do what you suggested in a 1-D system (in radial directions only). I wanted to stencil my problem in a 2-D system (radial and angular directions). This is my problem:

fdf%20pipe.gif


I know the number of points is... :DD:DD:DD I'm doing this to kill off certain doubts.

I stencil around T0, by using an energy balance approach. I got something like T0 = (2T1 + 2T3) / 4. Is this correct? This is actually the problem I am facing.

If I implement the boundary condition that dT/dr [r = 0] = 0, that would mean either (T1-T0)/2Δr or (T3-T0)/2Δr is 0 right? Which do I replace? T1 or T3?
 
Last edited:
  • #4
Physically [itex]r = 0[/itex] is an interior point of the domain. You can't impose a condition on the value of [itex]T[/itex] or [itex]\partial T/\partial r[/itex] there.
 
  • #5
If he is simulating only a quarter of a circle, then r=0 is on the boundary of the domain (it is not so clear in the text, but the problem description says ##\Delta \phi = \pi / 2## ).

Then to implement the Neumann boundary condition:
on the horizontal line, T1=T0
on the 45-degree line, T2=T0
on the vertical line, T3=T0
So T0=T1=T2=T3
 

Related to 2D Finite Difference formulation in polar coordinates.

1. What is the difference between 2D finite difference formulation and other numerical methods?

2D finite difference formulation is a numerical method used to solve partial differential equations in two-dimensional systems. It involves discretizing the domain into a grid and approximating the derivatives at each grid point using finite difference equations. Unlike other numerical methods, such as finite element or finite volume methods, 2D finite difference formulation does not require the use of complex meshes and can be easily implemented for irregular geometries.

2. Can 2D finite difference formulation be used for problems in polar coordinates?

Yes, 2D finite difference formulation can be used for problems in polar coordinates. In fact, this method is particularly well-suited for problems with circular or radial symmetry since it naturally takes into account the curvature of the coordinate system. However, a transformation of the equations is required to convert them from Cartesian to polar coordinates before applying the finite difference method.

3. What are the advantages of using 2D finite difference formulation in polar coordinates?

Some advantages of using 2D finite difference formulation in polar coordinates include:

  • Improved accuracy and efficiency for problems with circular or radial symmetry
  • Easy implementation for problems with irregular geometries
  • No need for complex meshes, reducing computational time and resources
  • Can handle problems with varying boundary conditions

4. What are the limitations of 2D finite difference formulation in polar coordinates?

Some limitations of using 2D finite difference formulation in polar coordinates include:

  • Not suitable for problems with non-uniform boundary conditions
  • May require a large number of grid points to achieve desired accuracy
  • Boundary conditions at the origin may be difficult to implement
  • Not applicable for problems with high-dimensional systems

5. How does the accuracy of 2D finite difference formulation in polar coordinates compare to other numerical methods?

The accuracy of 2D finite difference formulation in polar coordinates depends on the number of grid points used and the smoothness of the solution. In general, it can provide comparable accuracy to other numerical methods, such as finite element or finite volume methods. However, for problems with highly irregular geometries or non-uniform boundary conditions, other methods may be more accurate and efficient.

Similar threads

  • Differential Equations
Replies
4
Views
2K
Replies
1
Views
1K
Replies
3
Views
2K
  • Differential Equations
Replies
3
Views
2K
Replies
8
Views
354
  • Differential Equations
Replies
2
Views
3K
  • Differential Equations
Replies
1
Views
3K
  • Programming and Computer Science
Replies
5
Views
2K
  • Differential Equations
Replies
6
Views
2K
  • Differential Equations
Replies
5
Views
2K
Back
Top