# How to solve Energy Balance equation by numerical method

Good Day

I am new to heat transfer technique please give me some suggestion on solving energy balance equation

$$a \frac{\partial T_p}{\partial t}=\frac{\partial}{\partial x}\left(b\frac{\partial T_p}{\partial x}\right)+\frac{\partial}{\partial z}\left(c\frac{\partial T_p}{\partial z}\right)+b$$

which is discretized as

$$a\left(\frac{T_p-T_{p_0}}{\Delta t}\right)=c\left(\frac{T_u-T_p}{\Delta X_u \Delta X}\right)+d\left(\frac{T_D-T_p}{\Delta X_d \Delta X}\right)+e\left(\frac{T_w-T_p}{\Delta Z_w \Delta Z}\right)+f\left(\frac{T_E-T_p}{\Delta Z_E \Delta Z}\right)+b$$

$b=S_c+S_pT_p$

Where $T_p$ is the temperature of solar panel $a,c,d,e,f$ are the constant value.

I am not getting how to proceed with this equation. Please suggest some hints at solutions.

• You need to read an introductory textbook about finite difference methods. The second equation you show above is the equation the temperature at every grid point has to satisfy. This leads to a linear system that you can then solve for the temperature of the next time step. – Wolfgang Bangerth Jan 18 '15 at 15:39
• Can you suggest me some reference book/article for this sir. – Ambaresh Jan 18 '15 at 16:19
• Any book on finite difference methods will do, given that you are missing one of the very first steps of what to do to solve these equations. Go to your library and see what they have. – Wolfgang Bangerth Jan 18 '15 at 18:33

## 1 Answer

The problem with giving you the next step in this solution is that it is very easy to naively create a Finite Difference Scheme and have it become unstable. The things (without going into the math too much) which matter in this regard are your time step, grid size and how quick your variables are changing.

In order to have your scheme be stable, it is often preferred to use an implicit time integration. This means that each iteration in your loop (looping over the time of interest), this Tp0 value will be your b vector in the prototypical Ax=b linear system. To form your A matrix you will need to read more about difference schemes. I would defer you to googling about "5 point stencils" for 2D FD Approximations. You'll find a full list of equations.

Honestly, I do not understand why the discretized equation below the balance law looks as it does. To me, this looks like a slightly retooled Unsteady Heat Conduction equation in 2D. If that is the case, that is usually not the typical way to discretize a second order differential equation with differences. (Though I do not know what Tu, Td, Tw, or Te are.