## Thermal Liquid Domain

To view the complete domain source file, at the MATLAB® Command prompt, type:

`open([matlabroot '/toolbox/physmod/simscape/library/m/+foundation/+thermal_liquid/thermal_liquid.ssc'])`

Abbreviated thermal liquid domain declaration is shown below, with intermediate lookup table values omitted for readability.

```domain thermal_liquid % Thermal Liquid Domain % Copyright 2012-2016 The MathWorks, Inc. parameters (Size=variable) % Default liquid property tables for water % Rows of the tables correspond to the temperature vector % Columns of the tables correspond to the pressure vector T_TLU = {[273.1600:10:373.16]', 'K' }; % Temperature vector p_TLU = {[0.01, 0.1, 5:5:50], 'MPa'}; % Pressure vector pT_validity_TLU = {[ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 ], '1'}; % Pressure-temperature validity matrix rho_TLU = {[ 999.8 999.8 ... 978.2 980.3 ], 'kg/m^3'}; % Density table u_TLU = {[ 0.0002 0.0018 ... 407.1700 405.9800 ], 'kJ/kg'}; % Specific internal energy table nu_TLU = {[ 1.7917 1.7914 ... 0.3000 0.3007 ], 'mm^2/s'}; % Kinematic viscosity table cp_TLU = {[ 4.2199 4.2194 ... 4.1245 4.1157 ], 'kJ/(kg*K)'}; % Specific heat at constant pressure table k_TLU = {[ 561.0400 561.0900 ... 703.3500 706.0000 ], 'mW/(m*K)'}; % Thermal conductivity table beta_TLU = {[ 1.9649 1.9654 ... 2.3455 2.3788 ], 'GPa'}; % Isothermal bulk modulus table alpha_TLU = {1e-4 * [ -0.6790 -0.6760 ... 6.8590 6.8000 ], '1/K'}; % Isobaric thermal expansion coefficient table mu_TLU = {[ 1.79134166000000 ... 0.294776210000000 ], 'cP'}; % Dynamic viscosity table Pr_TLU = {[ 13.4736964762477 ... 1.71842839588810 ], '1'}; % Prandtl number table end parameters pT_region_flag = {1, '1' }; % Valid pressure-temperature region parameterization % 0 - By minimum and maximum value % 1 - By validity matrix T_min = {273.16, 'K' }; % Minimum valid temperature T_max = {373.16, 'K' }; % Maximum valid temperature p_min = {0.01, 'MPa' }; % Minimum valid pressure p_max = {50, 'MPa' }; % Maximum valid pressure p_atm = {0.101325, 'MPa' }; % Atmospheric pressure k_cv = {1.43e-4, 'kg/(m*s)'}; % Ratio of thermal conductivity to specific heat max_aspect_ratio = {5, '1' }; % Maximum component aspect ratio (length/diameter) for thermal conduction end variables p = {0.1, 'MPa'}; % Pressure T = {300, 'K' }; % Temperature end variables (Balancing=true) mdot = {0, 'kg/s'}; % Mass flow rate Phi = {0, 'kW' }; % Energy flow rate end end ```

It contains the following variables and parameters:

• Across variable p (absolute pressure), in MPa

• Through variable mdot (mass flow rate), in kg/s

• Across variable T (temperature), in kelvin

• Through variable Phi (energy flow rate), in kW

• Parameter pT_region_flag, defining the valid pressure-temperature region parametrization, with two values:

• 0 — By minimum and maximum value

• 1 — By validity matrix

• Parameter T_min, defining the minimum valid temperature

• Parameter p_min, defining the minimum valid pressure

• Parameter T_max, defining the maximum valid temperature

• Parameter p_max, defining the maximum valid pressure

• Parameter p_atm, defining the atmospheric pressure

• Parameter k_cv, defining the ratio of thermal conductivity to specific heat

• Parameter max_aspect_ratio, defining the maximum component aspect ratio (length/diameter) for thermal conduction

It also contains lookup tables, declared as variable-sized domain parameters, for the following liquid thermodynamic properties:

• Density

• Specific internal energy

• Kinematic viscosity

• Specific heat at constant pressure

• Thermal conductivity

• Isothermal bulk modulus

• Isobaric thermal expansion coefficient

• Dynamic viscosity

• Prandtl number

These variable-sized parameter declarations propagate to the components connected to the Thermal Liquid domain, and therefore you can use them in the `tablelookup` function in the component equations. In particular, the thermal liquid blocks in the Foundation library use these lookup tables for interpolation purposes.

To refer to this domain in your custom component declarations, use the following syntax:

`foundation.thermal_liquid.thermal_liquid `