CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Energy Equation Solution Algorithm (

Chandra June 23, 2006 04:49

Energy Equation Solution Algorithm
Hi everybody,

I have solved the N.S.Momentum equations and now i have to solve the energy equation for a "non-steady" flow problem i.e. del_T/del_t + V.Grad_T = Alpha*Div_(Grad_T).

I used explicit method: T(n+1) = T(n) + dt*[Alpha*Div_(Grad_T) - V.Grad_T](n); Here, n = time-counter;

But, the result doesnt seem to be appropriate. I think something is wrong in the algorithm itself e.g. such kind of explicit scheme cant be used.

Please suggest me something in this regard. I think the people who already have solved the CFD problems before would be havign much idea about it.

Thanks a lot in anticipation,

regards, Chandra

O. June 23, 2006 05:03

Re: Energy Equation Solution Algorithm
A simple explicit scheme should work.

How did you discretize the convective part?

Do you have any coupling between your energy equation (which is a simple scalar convection/diffusion equation in this case) and the momentum and continuity equations (e.g. density = f(T))?

Chandra June 23, 2006 06:11

Re: Energy Equation Solution Algorithm
Hello, Thanks for your reply. I dont have any coupling. Fluid properties are assummed to be independent of temperature. Also, incompressible flow (water) and staggerred grid.

I discretized the convective part at cell-center as below: u.dT/dx = 0.5*[u(i,j,k,n)+u(i-1,j,k,n)]*[T(i+1,j,k,n)-T(i-1,j,k,n)]/2dx. Here, n: time-step.

All the terms in the equation is discretized like the above on time-step 'n'. And T(n+1) is evaluated simply at all the cells.

The problem:

there is a cylinder(two faces and one round wall) with a small hole at face-1 and a thin circulat slit near to the peripheral of the same face-1. A water jet is entering through the central hole, strikes on the opposite face-2 and the water goes out through the narrow-circular-slit. A heater having constant heat-flux is attached to the striking face-2. I solve the equations (continuity+momentum & energy). Velocity profile is coming fine. But for temperature profile, when the initial developing vortex strikes the surface after starting from the central-hole, the temperature profile is showing a band of high and low temperature a pressure distribution in a wave-field.

If it is convinient to you, may I email the model and the result?

Thank you, Chandra

O. June 23, 2006 06:25

Re: Energy Equation Solution Algorithm
You have a central discretization. This is not stable without artificial dissipation. Try to upwind the temperature. For the velocity you can try both, upwind or central.

I think you are having a classic odd-even decoupling ;-)

Btw. What was your motivation for this:
rather than

I would suggest this (first order only for a start)

u(i,j,k,n) >= 0 : u.dT/dx = 0.5*[u(i-1,j,k,n)+u(i,j,k,n)]*[T(i,j,k,n)-T(i-1,j,k,n)]/dx
u(i,j,k,n) < 0 : u.dT/dx = 0.5*[u(i,j,k,n)+u(i+1,j,k,n)]*[T(i+1,j,k,n)-T(i,j,k,n)]/dx

Good luck!

Chandra June 23, 2006 07:09

Re: Energy Equation Solution Algorithm
Hello, thank you very much for pointing out the mistake. I was knowing the odd-even coupling in case of momentum equations but didnt know about the temperature equation. Thanks! I had read in some of the papers that if we are using staggerred grid, we actually dont need to employ upwinding specifically, rather, staggerred grid takes care of itself once we discretize(central-difference) the momemtum equations on correponsing "FACE-centers" rather than the "CELL-center"....and that is what i did while solving the momentum equations.

I have a simple question, however. You suggested: u.dT/dx = u(i,j,k,n)*[T(i+1,j,k,n)-T(i-1,j,k,n)]/2dx.

Is this for "u(i,j,k,n) > 0" ?

and for "u(i,j,k,n) < 0",

u.dT/dx = u(i-1,j,k,n)*[T(i+1,j,k,n)-T(i-1,j,k,n)]/2dx ??

Motivation behind using: u.dT/dx = 0.5*[u(i,j,k,n)+u(i-1,j,k,n)]*[T(i+1,j,k,n)-T(i-1,j,k,n)]/2dx was that T(i,j,k) is defined on cell-center on staggerred grid and so discretize the temperature equation simply at the point-of-definition i.e. "cell-center" using central-difference. Point-of-definitions was used to discretize the momentum equations.

Thank you very much again for your help.


O. June 23, 2006 07:21

Re: Energy Equation Solution Algorithm
You don't really have a staggered grid for the temperature, hence you get the stability problem. I would go ahead with an upwind for that. Since you already have the velocities on the faces, use them and upwind the temperature. For second order you can use a MUSCL approach (extrapolate the values for T from the upwind direction). You might or might not need a limiter ...

Chandra June 23, 2006 08:05

Re: Energy Equation Solution Algorithm

Thank you very much for your help. I got very useful information from you and it is going to very helpful indeed.

Thank you,


All times are GMT -4. The time now is 18:26.