How to solve the timedependent heat equation
LausX
I have to solve the time dependent heat equation with a source term in 1D and later also in 3D. Do you have any suggestion how to implement this in Igor Pro?
The equation looks like this:
a*dT/dt = d/dx (k*d/dx(T)) + S(x,t)
Thanks a lot
* Make the equation dimensionless. By example, use X = x/L, \tau = (t \alpha)/Lc^2 (where \alpha is the thermal diffusivity and Lc is a characteristic system length), and \Theta = (T - To)/(TL - To). The advantage is, you will reduce the number of input parameters, you will define the equation bounds as 0 (zero) to 1 on both the X and \Theta scales, and while \tau will still go from 0 to infinity, you can examine the answers at physically meaningfully times such as \tau = 1 (the system "relaxation time").
* Does k depend also on either x or T? If not, pull it out. If so, rewrite the dependence in terms of dimensionless variables.
* The 3-D case is usually handled by separation of variables. Can your system be done that way, even to first order? If so, you have a set of three first order DiffEQs rather than one complex (and potentially non-analytical) DiffEQ.
* Speaking of analytical, does your equation have an analytical solution at all? If so, the solution using a numerical integration approach is ... redundant.
I am likely being presumptuous in some of my thoughts. You are probably asking about this because the equation you have cannot be solved analytically (even in 1-D with some form of approximations for S(x,t) to expand the general solution when S(x,t) = 0) and/or cannot be solved by separation of variables in 3-D.
As to how to implement this in Igor Pro ...
* You can use a brute force integration method. Write a function that calculates \Delta \Theta for discreet steps in \Delta X and \Delta \tau. Step through that function in a loop. I've done this type of approach on simple systems.
* You can use the built-in Integrate... operations in Igor Pro. Here, I have no experience, and others who do will certainly chime in.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
September 1, 2017 at 06:06 am - Permalink