Finite Difference method to solve diffusion equation

AI Thread Summary
The discussion focuses on using the finite difference method to solve the diffusion equation for a well-insulated cylindrical material with specified thermal properties and boundary conditions. The user expresses confusion about implementing the finite difference equation, particularly how to apply initial and boundary conditions and the correct values for temperature at different spatial points. Clarification is sought on the boundary condition regarding time, which was initially misunderstood but later corrected to indicate that the system reaches steady state around t = 17. Participants suggest sticking to the explicit method due to the lack of coverage on the Crank-Nicholson method in their coursework. The conversation highlights the importance of specifying initial temperature distributions for accurate numerical solutions.
miniradman
Messages
191
Reaction score
0

Homework Statement


Plot the transient conduction of a material with k = 210 w/m K, Cp = 350 J/kg K, ρ = 6530 kg/m3

Where the material is a cylinder, with constant cross sectional area and is well insulated. The boundary conditions for the cylinder:
T(0,t) = 330K
T(l,t) = 299K
\frac{∂T}{∂t}(x,17)=0

Homework Equations


Diffusion equation:
\frac{∂T}{∂t}=\alpha\frac{∂^{2}T}{∂x^{2}}

rearranged diffusion equation in finite difference form
T(x,t+Δt)=\frac{\alphaΔt}{Δx^{2}}[T(x+Δx, t)-2T(x,t)+T(x-Δx,t)]


The Attempt at a Solution


Hi all

I've never used the finite difference equation before to solve a PDE and I'm unsure how to use it. I know how to find values such as α (thermal diffusivity), but I'm unsure on how to sub in my initial and boundary conditions. And which values would I use for T(x+Δx, t) or T(x-Δx,t)? Since I'm trying to find change in temperature over time at a fixed distance x, I would assume that Δx = 0? (which I know is incorrect).

I've tried looking online for PDE finite analysis techniques, but they're all either ODE examples or mesh analysis (something we haven't covered).
 
Physics news on Phys.org
Try Googling the Crank-Nicholson method for the 1D heat conduction equation (or the diffusion equation). This is a standard example in courses on finite difference, numerical method, and PDEs.

I don't understand your boundary condition ##\frac { \partial T} {\partial t}(x,17) = 0##. Why t= 17? If the time derivative is constant everywhere at one time, isn't it constant everywhere at all times - i.e. the solution is steady state heat conduction along a uniform rod with the end temperatures given, so there is nothing to solve for numerically!
 
Sorry I made a mistake with that, I was meant to say that the system reaches steady state at approximately t = 17.

We haven't yet covered the Crank-Nicholson method, so I have a feeling we may have to stick with the explicit method.
 
If you want an explicit method you could use http://en.wikipedia.org/wiki/FTCS_scheme

With the constant temperatures at T(0,t) and T(l,t) the solution will converge to steady state as t increases for any starting temperature distribution T(x,0). It seems a bit strange that the question doesn't specify the starting temperature, so you can have something to check your results against. Just saying that it approximately converges by t = 17 doesn't tell you much.
 
Back
Top