Thermal energy advection should always match the direction of flow. To satisfy this condition, the Thermal Liquid domain employs a modeling framework known as the upwind scheme. This scheme works by matching the specific internal energy at a port to that just upwind of the port:
If the flow at a port is directed into the component, the specific internal energy at that port is equal to that carried by the incoming fluid. In the figure, the specific internal energy at port A of component 2 is equal to that at port B of component 1.
If the fluid flow at a port is directed out of the component, the specific internal energy at that port is equal to that in the component’s internal fluid volume. In the figure, the specific internal energy at port A of component 2 is equal to that in the internal fluid volume of the same component.
The upwind scheme describes the advection thermal energy flow rate using a conditional expression that, for port A of some component, reads:
ΦAAd is the thermal energy flow rate due to advection through port A.
is the mass flow rate through port A.
uA is the specific internal energy upwind of port A.
uI is the specific internal energy in the internal fluid volume.
Without numerical smoothing, this expression introduces a number of computational challenges. It adds a slope discontinuity to the thermal energy flux at zero mass flow rates that makes the model more prone to simulation errors. It also adds a jump discontinuity to the specific internal energy and makes its value ill-defined during flow reversals.
Upwind Energy Scheme without Smoothing
The Thermal Liquid domain smoothes the numerical discontinuities introduced by the upwind energy scheme by adding to the thermal energy flow rate a thermal conduction term. At port A of some component:
ΦATh is the thermal energy flow rate due to advection through port A and conduction between port A and the internal fluid volume.
G is a thermal conductance coefficient computed from the fluid properties and component geometry.
Rewriting the modified expression in a more convenient form:
to collapse the conditional expression:
Approximating the collapsed expression as a numerically smooth expression:
The end expression removes the slope discontinuity from the thermal energy flow rate curve and the jump discontinuity from the specific internal energy curve. The thermal conductance coefficient determines the amount of smoothing applied in both cases:
k is the thermal conductivity defined in the Thermal Liquid Settings (TL) block.
S is the flow cross-sectional area at the port considered.
cv is the specific heat defined in the Thermal Liquid Settings (TL) block.
L is a characteristic distance between the port and the component’s fluid volume.
Upwind Energy Scheme with Smoothing
The Through variable of the Thermal Liquid domain is the total energy flow rate. This variable is defined in terms of the smoothed upwind thermal energy flow rate as:
ΦA is the total energy flow rate through port A.
ΦATh is the thermal energy flow rate through port A computed from the smoothed upwind energy scheme.
p is the absolute pressure at port A.
ρ is the fluid density at port A.
The kinetic energy contribution to the total energy flow rate is assumed negligible in Thermal Liquid networks and is ignored in this domain.