Heat Equation with cylindrical rod

Click For Summary
SUMMARY

This discussion focuses on applying the heat equation to a cylindrical rod using an explicit finite difference scheme. The advantages of cylindrical coordinates are highlighted, particularly in relation to boundary conditions at the outer radius, which simplifies the modeling process compared to Cartesian coordinates. The conversation also emphasizes the limitations of explicit schemes, recommending the use of implicit methods like the Crank-Nicolson method for improved numerical stability. Sample code and implementation strategies for Neumann boundary conditions are also discussed.

PREREQUISITES
  • Understanding of the heat equation and its applications
  • Familiarity with finite difference methods, specifically explicit and implicit schemes
  • Knowledge of cylindrical coordinates and their advantages in modeling
  • Experience with boundary conditions, particularly Neumann and Dirichlet conditions
NEXT STEPS
  • Research the Crank-Nicolson method for solving partial differential equations
  • Explore implicit finite difference schemes and their implementation
  • Study the application of Neumann boundary conditions in numerical methods
  • Learn about tri-diagonal matrix solvers for efficient computation in implicit schemes
USEFUL FOR

Mathematicians, physicists, and engineers working on heat transfer problems, numerical analysts developing algorithms for partial differential equations, and anyone interested in advanced numerical methods for cylindrical geometries.

baseball07
Messages
5
Reaction score
0
Hello, I am looking to apply to heat equation to a cylindrical rod and solving with explicit finite difference scheme. I have never worked with cylindrical coordinates before, what would be the best way to model this? I am having a hard time understanding the advantage of using cylindrical. Isn't it the same as if I "unrolled" it and took the problem as either a 2-D or 3-D planar geometry with the same surface area? Does anyone have any sample code I can see on how to implement?
 
Physics news on Phys.org
You are right, it is similar to a 2-D plane system, except the thickness is not constant, it is ##2\pi x## or ##2 \pi y## depending which axis is the the center line of the cylinder.

When you have set up the finite difference from the differential equation in cylindrical coordinates, you should be able to see how to replace the "variable thickness" terms in the difference scheme with a "constant thickness", and that will give you the exactly the same difference scheme as you used for a 2D plane problem.

This makes it easy to write one program that can solve both plane and axisymmetrcic problems, if you want to do that.
 
baseball07 said:
Hello, I am looking to apply to heat equation to a cylindrical rod and solving with explicit finite difference scheme. I have never worked with cylindrical coordinates before, what would be the best way to model this? I am having a hard time understanding the advantage of using cylindrical. Isn't it the same as if I "unrolled" it and took the problem as either a 2-D or 3-D planar geometry with the same surface area? Does anyone have any sample code I can see on how to implement?

The advantage in using cylindrical coordinates lies in applying the boundary conditions at the outer radius. In cylindrical coordinates, one of the coordinates at the boundary is constant (the radial coordinate), while, in cartesian coordinates, both x and y vary on the boundary, and worse yet, the grid points do not all lie on the boundary. To unroll the cylinder, you have to deform it, and this changes the geometry (and the solution).

I would also like to encourage you not to use an explicit finite difference scheme. I'm sure that this limits the size of the time step you can take for numerical stability. Please consider using an implicit scheme, which can easily be implemented using a tri-diagonal matrix solver.

Chet
 
Thank you for all the suggestions, I will look more deeply into the equations and post questions. As far as explicit stepping, I have some very basic 1-D code and was never able to rewrite it using crank nicholson. I was running into problems in that I did not know how to incorporate the Neumann BC into the matrix (the other is a dirichlet). If someone can help me with this, PM me and I can send you over my code.
 
With a Neumann condition, you know the value of a node depending on a neighboring value, e.g. for a N-node discretization on [0,R] with Neumann on the left boundary \frac{\partial u}{\partial r}|_{r=0} = 0
u_{1}-u_{0}=0
discretization for the diffusion term at node 1 is
u_{2} -2u_1 + u_{0}=0
You can now replace this with the Neumann bc
u_{2} - 2u_1 + u_{1}=0, or:
u_{2} - u_1=0

so your unknowns run from u_1...u_N.
If your favorite language starts counting at zero, it will be more convenient to place r=0 at node -1 so your unknowns run from u0..u_N-1

The Crank-Nicolson method is unconditionally stable for the heat equation and the explicit Euler is not (Explicit Euler is mainly used as a classroom example of a simple but bad numerical method).
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 23 ·
Replies
23
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
0
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K