Documentation

Energy Flows in Thermal Liquid Networks

Upwind Energy Scheme

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 component2等于在港口的组件吗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 component2is 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:

Φ A A d = { m ˙ A u A , m ˙ A > 0 m ˙ A u I , m ˙ A 0 ,

where:

  • ΦAAdis the thermal energy flow rate due to advection through port A.

  • m ˙ A is the mass flow rate through port A.

  • uAis the specific internal energy upwind of port A.

  • uI具体的内部能源内部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

Numerical 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:

Φ A T h = { m ˙ A u A + G ( u A u I ) , m ˙ A > 0 m ˙ A u I + G ( u A u I ) , m ˙ A 0 ,

where:

  • ΦAThis the thermal energy flow rate due to advection through port A and conduction between port A and the internal fluid volume.

  • Gis a thermal conductance coefficient computed from the fluid properties and component geometry.

Rewriting the modified expression in a more convenient form:

Φ A T h = { ( m ˙ A + G ) u A G u I , m ˙ A > 0 G u A + ( m ˙ A G ) u I , m ˙ A 0

Usingminandmaxfunctions to collapse the conditional expression:

Φ A T h = [ max ( m ˙ A , 0 ) + G ] u A + [ min ( m ˙ A , 0 ) G ] u I

Approximating the collapsed expression as a numerically smooth expression:

Φ A T h m ˙ A + m ˙ A 2 + 4 G 2 2 u A + m ˙ A m ˙ A 2 + 4 G 2 2 u I

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:

G = k S c v L ,

where:

  • kis the thermal conductivity defined in theThermal Liquid Settings (TL)block.

  • Sis the flow cross-sectional area at the port considered.

  • cvis the specific heat defined in theThermal Liquid Settings (TL)block.

  • Lis a characteristic distance between the port and the component’s fluid volume.

Upwind Energy Scheme with Smoothing

Total Energy Flow Rate

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 = Φ A T h + p ρ ,

where:

  • ΦAis the total energy flow rate through port A.

  • ΦAThis the thermal energy flow rate through port A computed from the smoothed upwind energy scheme.

  • pis 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.