# Calculating heat ballance in transient simulation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 26, 2022, 12:03 [Solved] Calculating heat ballance in transient simulation #1 Senior Member     Alexander Karachun Join Date: Nov 2015 Location: Mykolaiv, Ukraine Posts: 234 Rep Power: 9 Hello colleagues. I am performing transient simulation of room heating process. I use incompressible fluid with constant properties (density, heat capacity, viscosity etc.). I use Boussinesq buoyancy model and thermal energy model. Heat radiation is disabled. I have fluid domain with inlet and outlet and different walls that have temperature or heat transfer coefficient and temperature BC. Inlet BC has variable mass flow and static temperature both defined by an expression. Both inlet and outlet are composed of couple surfaces i.e., air is supplied and removed through multiple vents. I do nor model whole ventilation system i want to manually calculate heat balance to ensure that my simulation is OK, and my simulation abides conservation of energy rule. To do so I want to sum all heat fluxes that enter and leave my fluid domain. And I have a couple of questions: 1) Due to constant fluid properties and incompressibility, I can write expression below to describe heat difference between inlet and outlet (I have separate expression for Cp): heatInOut = (massFlowAve(Temperature)@Inlet-massFlowAve(Temperature)@Outlet) *massFlow()@Inlet*airHeatCapacity My question is it OK to use physical locator to average temperature across multiple inlets and outlets? 2) For heat flux through the walls I use expressions like this areaInt(Wall Heat Flux)@Wall I have noticed that in results and only in results I have access to other variable for heat flux called "Heat Flux" instead of "Wall Heat Flux". What variable should I use? Those variables give different results. This source states that Heat Flux is right variable. https://forum.ansys.com/discussion/24508/cfx-heat-flux-versus-wall-heat-flux-inlet-outlet-energy-different-values 3) Finally, I have third component of heat energy that stored into mass of air inside fluid domain. My idea is to estimate heat applied to volume of fluid (or removed from it) as: mass_of_fluid*(massAve(Temperature)@Domain_at_timestep_tn - massAve(Temperature)@Domain_at_timestep_tn-1)*Cp/(timestep_size) I.e., I want to calculate heat power that was applied to fluid as product of fluid mass multiplied by temperature difference? Heat capacity and divided by timestep size. Now I have all three components of heat energy and sum of all of those components should give me value close to zero. Does my formula is reasonable? And is there are some easiest ways to check heat balance and ensure that I do not loose some heat source in my expressions. I know that I can check solver heat imbalance, but this only tell me that everything is OK in whole model and not tell me if I miss some surface in my expression. Thanks in advance! Sorry for posting too much of text. Last edited by karachun; January 28, 2022 at 02:24.

 January 26, 2022, 17:04 #2 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,077 Rep Power: 134 The long post is good - it means you have explained thoroughly what you are talking about and that helps get better answers. Q1) Yes, this is OK. It only works for constant properties, converged solutions and mass flow averaging the quantity. Q2) I do not know the answer to this. Q3) I think your question is whether your function will give the correct heating power - it looks OK to me. But note that the heat imbalance already does this for you. If you want to see the individual contributions of each boundary patch then look at the end of the output file as the heat balance calculation shown there has the breakdown of all the contributions. So you probably do not need to calculate this yourself. Also note the heat imbalance calculation in the solver is not limited to your assumption of constant properties and incompressible flow - it works for any flow type supported by CFX. karachun likes this. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 January 27, 2022, 04:53 #3 Senior Member     Alexander Karachun Join Date: Nov 2015 Location: Mykolaiv, Ukraine Posts: 234 Rep Power: 9 Thank you for your ansver. Look like you are right and I dont need to manualy control heat balance. Moreover I can add that in my case inlet and outlet of my room are connected, i.e. air removed from room is heated and returned into room through inlet (this is not living room but rather box with some machinery that should not be connected to atmosphere outside of box for technological reasons). Therefore all i need to know is heat power from Formula (1) because this is the ammount of heat that heating system should apply. In addition if solution run enough time then system reach state when all air inside room is heated to some equilibrium point and heat from formula (1) is allmost equal to heat from formula (2) with only minor fluctuations.

 January 27, 2022, 05:19 #4 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,077 Rep Power: 134 OK, good. That answers your question doesn't it? __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

January 27, 2022, 06:32
#5
Senior Member

Alexander Karachun
Join Date: Nov 2015
Location: Mykolaiv, Ukraine
Posts: 234
Rep Power: 9
Yes.

As for question for "Heat Flux" variable vs "Wall Heat Flux" I have compared results based on area integrals of those variables in CFD-Post with H-Energy imbalance summary in *.out file. And i have noticed that expression

areaInt(Heat Flux)@Wall
match the solver heat flux imbalance while

areaInt(Wall Heat Flux)@Wall
does not match. Difference between results sometimes reach 10-15%.

The only one question I have is why both heat through Inlet and Outlet are positive? This is counterintuitive for me but the whole balance look like reasonable.

Code:
``` +--------------------------------------------------------------------+
|                              H-Energy                              |
+--------------------------------------------------------------------+
Boundary         : Back                                   -1.5877E+02
Boundary         : Cage                                   -1.7428E+03
Boundary         : Door                                   -1.6188E+02
Boundary         : Floor                                  -9.3614E+02
Boundary         : Frame                                  -2.7323E+03
Boundary         : Inlet                                   5.0300E+03
Boundary         : Outlet                                  1.1278E+03
Boundary         : Roof                                   -9.1129E+01
Boundary         : Side                                   -3.0363E+02
Neg Accumulation : Default Domain                         -2.6244E+01
-----------
Domain Imbalance :                                         4.9296E+00```
Attached Images
 H-Energy.PNG (20.0 KB, 4 views)

 January 27, 2022, 16:50 #6 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,077 Rep Power: 134 I just looked at the documentation on Wall Heat Flux vs Heat Flux - see solver modelling guide section 2.7.5.6.2. That answers your question I think. Why inlet and outlet both positive? Probably because of the reference temperature. If the reference temperature is between the inlet and outlet temperature then both inlet and outlet will have the same sign. Opaque and karachun like this. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 January 28, 2022, 02:23 #7 Senior Member     Alexander Karachun Join Date: Nov 2015 Location: Mykolaiv, Ukraine Posts: 234 Rep Power: 9 Thank you. You answered all of my questions.