
[Sponsors] 
October 7, 2019, 10:47 
chtMultiRegionFoam wallHeatFlux mismatch

#1 
New Member
Join Date: Sep 2019
Posts: 8
Rep Power: 3 
Dear CFDehtousiasts,
Currently I am working on a model that should capture the convective heat transfer between a coil, with hot water running through it, to ambient tankwater. With this model I try to capture the local and total heat transfer. The first setup of the model includes a simple single tube surrounded by tankWater. I am extracting heat flux values on both sides of my coil and in both directions (just for checking). These value nicely match. Code:
wallHeatFlux1 { type wallHeatFlux; libs ("libfieldFunctionObjects.so"); patches ("coilWall_to_coilWater"); region coilWall; executeControl writeTime; writeControl writeTime; } wallHeatFlux2 { type wallHeatFlux; libs ("libfieldFunctionObjects.so"); patches ("coilWater_to_coilWall"); region coilWater; executeControl writeTime; writeControl writeTime; } wallHeatFlux3 { type wallHeatFlux; libs ("libfieldFunctionObjects.so"); patches ("coilWall_to_tankWater"); region coilWall; executeControl writeTime; writeControl writeTime; } wallHeatFlux4 { type wallHeatFlux; libs ("libfieldFunctionObjects.so"); patches ("tankWater_to_coilWall"); region tankWater; executeControl writeTime; writeControl writeTime; } If I compare the wall heat flux values from the wallHeatFlux utility, to the value computed from the flow rate and temperature at the inlet and outlet as: Qdot=(mdot*rho*Cp*(inletToutletT)) I find a significant mismatch between both values (see figure). BTW: I used patchAverage to compute my mean outletT. Unfortunately, I could not find a solution in other threads on the wallHeatFlux utility. Any ideas or tips would be much appreciated! Last edited by foamyva; October 8, 2019 at 03:57. Reason: Attached the wrong figure 

October 9, 2019, 02:25 
Update

#2 
New Member
Join Date: Sep 2019
Posts: 8
Rep Power: 3 
I ran the simulation with turbulence turned off. Surprisingly (or not) the wall heat flux and flowrate based heat flux to almost match perfectly (see figure).
Now, I am using an KOmegaSST turbulence model. In order to capture the heat transfer as good as possible I have meshed my system in such a way that y+ is smaller or equal to one everywhere and therefore not using any wall functions. Any experience on this aspect what could cause the energy imbalance? 

October 9, 2019, 09:38 

#3 
Senior Member
Join Date: Sep 2013
Posts: 269
Rep Power: 16 
Your formula is only an approximation instead of temperature you'd need to look at the total Enthalpy between inlet and outlet. And you'd need to integrate instead of average everything.You would also need to include kinetic energy, although this part should probably nearly cancel out or be insignificant. Unless maybe the diameter changed drastically and the flow is quite fast.
Are any of your material or transport properties temperature dependent? Do the wall heat fluxes from the different regions match? So is the coilWall_to_coilWater heatflux nearly identical to the coilWater_to_ coilWall flux? 

October 9, 2019, 10:23 

#4 
New Member
Join Date: Sep 2019
Posts: 8
Rep Power: 3 
Thanks for your help! As mentioned in the original post I checked the heat flux on each side and they do match. Regarding the averaging of the temperature, patchAverage uses areaAverage and therefore does a weighted average calculation. As far as I know this is equivalent to integration, right?
I understand your point about the total enthalpy. However I do not believe that the internal energy/velocity would change so significant that it results in the given energy mismatch. It is still worth checking. Best way would to this would be to check the enthalpy flux over the inlet and outlet? I will have to look into this. I do use temperature dependent material properties, however I do not believe the problem can be found here, as the noturbulence model gives good results with the same material properties. BTW: tube is horizontal and has a uniform crosssection. 

October 9, 2019, 12:22 

#5 
Senior Member
Join Date: Sep 2013
Posts: 269
Rep Power: 16 
This is the full energy equation (not a single simplification made):
The last part of it assumed as zero since
Now we apply the Gauss theorem: Which yields: This equals: where and the pv term was used to transform e to h. We now need to evaluate that term on the entire boundary of our domain. I'll split it into inlet/outlet and walls. With the difference being the assumption that nothing flows through the wall (n.v=0) Under the assumption that no temperature gradient is present at inlet and outlet and no change in kinetic energy this equals your formula Now you can check if either of these assumptions is not the case for your simulation. And no you need to integrate since T is multiplied and hence weighted by v and cp if neither of these 3 is constant this is inaccurate. 

October 10, 2019, 05:44 
Solved!

#6 
New Member
Join Date: Sep 2019
Posts: 8
Rep Power: 3 
Thank you very much! I now integrated the inlet and outlet field using patchMassFlowAverage
Code:
massFlowAverageT { type patchMassFlowAverage; functionObjectLibs ( "libsimpleFunctionObjects.so" ); fields ( T ); patches ( inlet outlet ); factor 1.0; region coilWater; outputControlMode outputTime; outputInterval 1; writeStartTime no; verbose true; } Naturally, if one wants to be really precise the variation of Cp over the patch should also be taken into account as you showed in the derivation. However, taking into account the minimal variation of Cp (and the hassle to get obtain that variable in postprocessing) I left that out for now. Again thanks a lot for your detailed elaboration! 

Tags 
chtmultiregionfoam, heat exchange, wall heat transfer, wallheatflux 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
OF 6 wallHeatFlux utility not working on chtMultiRegionFoam tutorial  troparry  OpenFOAM PostProcessing  0  July 31, 2018 19:17 
Error in thermophysical properties (chtMultiRegionFoam)  mukut  OpenFOAM PreProcessing  27  October 5, 2017 06:48 
wallHeatFlux utility with sonicFoam  hiuluom  OpenFOAM PostProcessing  3  September 18, 2015 07:39 
wallHeatFlux utility with chtMultiRegionFoam solver.  Usem  OpenFOAM Programming & Development  9  January 6, 2014 05:10 
wallHeatFlux utility and chtMultiRegionFoam solver  Lada  OpenFOAM PostProcessing  4  June 7, 2012 09:46 