I wrote a solver in openfoam for solving transport equation for Temperature. And I expect Integrated value of T to remain constant, but it is not happening.
For a thermal transport problem, the energy should remain conserved. The source, or sink, in the energy transport equation should depend on specific temperature transport properties of the material, or the system. As Mr Mittal has identified, even in an isolated system, the temperature would decay to a steady value over time but the energy would remain conserved. You should model your problem accordingly.
You should provide more details on how you solve the equation. OpenFOAM implements a convection-diffusion equation already in the scalarTransportFoam solver. This solver assumes you provide the velocity field as input, and it uses it to compute the convective term.
actually I did not know that there is scalarTransportFoam,but I just checked that and saw my solver is similar to that but as describing more in details I have to say that I have a constant velocity field during simulation and my Temperature input is a Gaussian function.
it seems that most of you guys are saying that my expectation might not be correct.
I am unable to comment on the results of the simulation because I don't know the simulation setup (boundary conditions). However, in general, temperature is not a conserved quantity. Energy is the quantity you should verify is conserved, compatibly with your problem setup (meaning, if your BC allow, say heating or cooling, you have to account for that).
now by changing in boundary conditions the thing that happening is something that Mr.Mittal mentioned,it decays and becomes constant(steady),I don't know it is reasonable or not but I think you are right about this fact that temperature is not a quantity that should remains conserve.
what kind of boundary conditions you use? If you have insulated boundaries then, yes the energy should conserve, otherwise depends on boundary conditions. Have you checked the numerical stability? If you have high local Pe numbers you might have unstable solution.
Kosec, as already mentioned by Qazi above energy must be conserved not temperature. Unless you reach steady state the temperature can not be invariant.