CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   wallheatflux and first law in compression/expansion (https://www.cfd-online.com/Forums/openfoam-solving/156786-wallheatflux-first-law-compression-expansion.html)

will_ca July 13, 2015 06:08

wallheatflux and first law in compression/expansion
 
Dear all,


I am using the coldengineFoam solver to simulate compression and expansion in a cylinder. I am using OpenFOAM 2.3.0 and I am interested in the heatflux through the walls.


When I use the OpenFoam wallheatflux utility I get a different result from when I use the first law of thermodynamics to calculate the heatflux.
The wall heatflux utility uses k*sngrad(T)
using the first law I can get the heatflux for example by Q=dU+pdV=1/(gamma-1) *d(pV)+pdV
I use function objects to get the volume and the volume averaged pressure and my simulations are with constant cp.
The maximum heatflux that the OpenFOAM utility gives me is much smaller than the one I calculated.


When trying to find out why there is that difference, I tried simulating a cylinder with adiabatic walls (Temperature BC at wall zeroGradient). The heat flux utility then gives me zero heatflux for every crank angle as expected. When I use the first law however I do get a heatflux!




I don't know which one I should trust or whether that actually means I can trust neither.


Does anyone know what I'm doing wrong or where the problem might be?
I'm really grateful for any help.


All times are GMT -4. The time now is 21:40.