Heat Equation with cylindrical rod

Click For Summary

Discussion Overview

The discussion revolves around applying the heat equation to a cylindrical rod using an explicit finite difference scheme. Participants explore the advantages of cylindrical coordinates over planar geometries and discuss numerical methods for solving the equation, including boundary conditions and stability considerations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant questions the necessity of cylindrical coordinates, suggesting that unrolling the cylinder might yield similar results in 2-D or 3-D planar geometries.
  • Another participant clarifies that cylindrical coordinates help in applying boundary conditions more effectively, as one coordinate remains constant at the boundary.
  • A suggestion is made to avoid using explicit finite difference schemes due to potential limitations on time step size for numerical stability, advocating instead for implicit schemes like Crank-Nicolson.
  • A participant expresses difficulty in implementing the Crank-Nicolson method with Neumann boundary conditions and seeks assistance in incorporating these conditions into their code.
  • Discussion includes a mathematical explanation of how to apply Neumann boundary conditions in the context of finite difference discretization.
  • It is noted that the Crank-Nicolson method is unconditionally stable for the heat equation, contrasting with the explicit Euler method, which is described as primarily a classroom example.

Areas of Agreement / Disagreement

Participants express differing views on the use of explicit versus implicit finite difference schemes, with some advocating for the latter due to stability concerns. There is no consensus on the best approach to modeling the problem, as participants explore various perspectives on cylindrical versus planar geometries.

Contextual Notes

Participants mention limitations related to the implementation of boundary conditions and the stability of different numerical methods, but these aspects remain unresolved within the discussion.

Who May Find This Useful

This discussion may be useful for individuals interested in numerical methods for solving partial differential equations, particularly in the context of heat transfer in 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 [itex]\frac{\partial u}{\partial r}|_{r=0} = 0[/itex]
[itex]u_{1}-u_{0}=0[/itex]
discretization for the diffusion term at node 1 is
[itex]u_{2} -2u_1 + u_{0}=0[/itex]
You can now replace this with the Neumann bc
[itex]u_{2} - 2u_1 + u_{1}=0[/itex], or:
[itex]u_{2} - u_1=0[/itex]

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
3K
  • · Replies 23 ·
Replies
23
Views
7K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
0
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K