Documentation Center

  • Trial Software
  • Product Updates

Thermal Liquid Domain

The thermal liquid domain declaration is shown below.

domain thermal_liquid
% Thermal Liquid Domain

% Copyright 2012-2013 The MathWorks, Inc.

parameters (Size=variable)
    % Default lookup table values for liquid properties given for water
    T_TLU 	= {[273.1600:10:373.16]', 'K'   };  % Temperature
	p_TLU  	= {[0.1, 1, 50:50:500]  , 'bar' };	% Pressure
    pT_validity_TLU = {ones(11, 12),  '1'   };  % Pressure-temperature validity matrix

    % Thermodynamic properties at T_TLU temperatures and p_TLU pressures
  	rho_TLU	= {[999.8    999.8    1002.3    1004.8    1007.3    1009.7    1012.2    1014.5    1016.9    1019.2    1021.5    1023.8
                999.7    999.7    1002.0    1004.4    1006.7    1009.0    1011.3    1013.5    1015.8    1018.0    1020.2    1022.3
                998.2    998.2    1000.4    1002.7    1004.9    1007.1    1009.3    1011.5    1013.6    1015.7    1017.8    1019.9
                995.6    995.6    997.8     1000.0    1002.2    1004.3    1006.5    1008.6    1010.7    1012.7    1014.8    1016.8
                992.2    992.2    994.4     996.5     998.6     1000.8    1002.9    1004.9    1007.0    1009.0    1011.0    1013.0
                988.0    988.0    990.2     992.3     994.4     996.5     998.6     1000.7    1002.7    1004.7    1006.7    1008.7
                983.2    983.2    985.3     987.5     989.6     991.7     993.8     995.8     997.9     999.9     1001.9    1003.9
                977.8    977.8    979.9     982.1     984.2     986.3     988.4     990.5     992.5     994.6     996.6     998.6
                971.8    971.8    974.0     976.2     978.3     980.5     982.6     984.7     986.8     988.8     990.9     992.9
                965.3    965.3    967.5     969.8     972.0     974.2     976.3     978.5     980.6     982.7     984.7     986.8
                958.8    958.8    960.6     962.9     965.2     967.4     969.6     971.8     974.0     976.1     978.2     980.3], 'kg/m^3' }; % Density

	u_TLU	= {[0.0002    0.0018    0.0860    0.1588    0.2190    0.2670    0.3034    0.3288    0.3436    0.3483    0.3435    0.3294
                42.0620   42.0600   41.9350   41.8040   41.6680   41.5270   41.3820   41.2330   41.0810   40.9240   40.7630   40.5990
                83.9530   83.9480   83.6510   83.3490   83.0490   82.7490   82.4510   82.1530   81.8560   81.5600   81.2650   80.9710
                125.7700  125.7600  125.3100  124.8600  124.4100  123.9700  123.5300  123.1000  122.6800  122.2500  121.8400  121.4200
                167.5700  167.5600  166.9600  166.3700  165.7900  165.2100  164.6500  164.0900  163.5400  163.0000  162.4600  161.9400
                209.3600  209.3600  208.6300  207.9000  207.1900  206.4800  205.7900  205.1100  204.4500  203.7900  203.1400  202.5000
                251.1900  251.1900  250.3300  249.4700  248.6200  247.7900  246.9800  246.1800  245.3900  244.6200  243.8600  243.1200
                293.0600  293.0600  292.0700  291.0700  290.1000  289.1400  288.2000  287.2800  286.3800  285.4900  284.6200  283.7700
                334.9900  334.9900  333.8600  332.7300  331.6300  330.5400  329.4800  328.4400  327.4100  326.4100  325.4300  324.4600
                377.0000  377.0000  375.7300  374.4600  373.2200  372.0000  370.8100  369.6400  368.5000  367.3800  366.2700  365.1900
                419.0100  419.0100  417.6900  416.2700  414.8900  413.5400  412.2100  410.9100  409.6400  408.4000  407.1700  405.9800], 'J/g' }; % Internal energy

	nu_TLU	= {[1.7917    1.7914    1.7763    1.7615    1.7473    1.7338    1.7208    1.7085    1.6967    1.6854    1.6747    1.6645
                1.3061    1.3059    1.2986    1.2914    1.2845    1.2779    1.2716    1.2656    1.2598    1.2543    1.2491    1.2441
                1.0032    1.0032    0.9995    0.9959    0.9924    0.9891    0.9859    0.9829    0.9801    0.9774    0.9748    0.9724
                0.8006    0.8005    0.7987    0.7970    0.7953    0.7937    0.7922    0.7908    0.7894    0.7881    0.7870    0.7859
                0.6577    0.6577    0.6570    0.6562    0.6555    0.6548    0.6543    0.6537    0.6532    0.6528    0.6523    0.6520
                0.5530    0.5530    0.5529    0.5527    0.5526    0.5525    0.5524    0.5524    0.5524    0.5524    0.5524    0.5525
                0.4739    0.4739    0.4741    0.4743    0.4745    0.4747    0.4750    0.4753    0.4755    0.4758    0.4762    0.4765
                0.4127    0.4127    0.4131    0.4135    0.4139    0.4143    0.4148    0.4152    0.4157    0.4162    0.4167    0.4172
                0.3643    0.3643    0.3648    0.3654    0.3659    0.3665    0.3670    0.3676    0.3682    0.3688    0.3694    0.3700
              	0.3254    0.3254    0.3261    0.3267    0.3273    0.3280    0.3286    0.3293    0.3299    0.3306    0.3312    0.3319
                0.2866    0.2866    0.2945    0.2952    0.2959    0.2965    0.2972    0.2979    0.2986    0.2993    0.3000    0.3007], 'mm^2/s' }; % Kinematic viscosity

 	cp_TLU 	= {[4.2199    4.2194    4.1957    4.1726    4.1508    4.1300    4.1103    4.0916    4.0738    4.0569    4.0408    4.0254
                4.1955    4.1951    4.1769    4.1592    4.1422    4.1259    4.1103    4.0954    4.0812    4.0676    4.0545    4.0421
                4.1843    4.1840    4.1690    4.1543    4.1401    4.1264    4.1133    4.1007    4.0885    4.0768    4.0656    4.0548
                4.1801    4.1798    4.1667    4.1538    4.1413    4.1293    4.1177    4.1064    4.0956    4.0851    4.0750    4.0653
                4.1796    4.1794    4.1675    4.1558    4.1444    4.1334    4.1227    4.1123    4.1023    4.0926    4.0832    4.0741
                4.1813    4.1813    4.1702    4.1592    4.1484    4.1380    4.1279    4.1181    4.1086    4.0993    4.0903    4.0816
                4.1850    4.1850    4.1742    4.1636    4.1532    4.1432    4.1334    4.1239    4.1146    4.1056    4.0969    4.0884
                4.1901    4.1901    4.1795    4.1690    4.1588    4.1489    4.1393    4.1299    4.1207    4.1118    4.1032    4.0947
                4.1968    4.1968    4.1862    4.1757    4.1655    4.1555    4.1458    4.1364    4.1273    4.1183    4.1096    4.1012
                4.2052    4.2052    4.1944    4.1837    4.1733    4.1632    4.1534    4.1438    4.1345    4.1255    4.1166    4.1080
                4.2136    4.2136    4.2045    4.1935    4.1828    4.1724    4.1623    4.1524    4.1429    4.1335    4.1245    4.1157], 'J/(g*K)' }; % Specific heat at constant pressure

 	k_TLU	= {[561.0400  561.0900  563.8000  566.5600  569.3200  572.0800  574.8200  577.5400  580.2400  582.9200  585.5700  588.1800
             	580.0200  580.0700  582.4500  584.8800  587.3200  589.7500  592.1800  594.6100  597.0200  599.4200  601.8000  604.1600
                598.4400  598.4800  600.7300  603.0300  605.3300  607.6400  609.9400  612.2400  614.5400  616.8200  619.1000  621.3600
                615.4800  615.5200  617.7300  620.0000  622.2600  624.5400  626.8100  629.0700  631.3400  633.6000  635.8500  638.0900
                630.6000  630.6400  632.8700  635.1500  637.4400  639.7200  642.0100  644.2900  646.5700  648.8400  651.1100  653.3600
                643.6100  643.6100  645.8800  648.2100  650.5300  652.8600  655.1800  657.5100  659.8200  662.1400  664.4400  666.7400
                654.3900  654.3900  656.7300  659.1200  661.5000  663.8900  666.2700  668.6500  671.0200  673.3800  675.7400  678.0900
                663.1300  663.1300  665.5400  668.0000  670.4600  672.9100  675.3600  677.8000  680.2400  682.6700  685.0900  687.5000
                670.0200  670.0200  672.5100  675.0500  677.5900  680.1200  682.6400  685.1600  687.6700  690.1700  692.6600  695.1400
                675.2700  675.2700  677.8500  680.4800  683.1100  685.7300  688.3400  690.9400  693.5300  696.1100  698.6800  701.2400
                680.5200  680.5200  681.7700  684.5000  687.2200  689.9400  692.6400  695.3400  698.0200  700.6900  703.3500  706.0000], 'mW/(m*K)'	}; % Thermal conductivity

 	beta_TLU= {[1.9649    1.9654    1.9929    2.0213    2.0499    2.0787    2.1078    2.1372    2.1668    2.1966    2.2268    2.2572
                2.0913    2.0918    2.1191    2.1471    2.1752    2.2036    2.2322    2.2610    2.2899    2.3191    2.3485    2.3781
                2.1786    2.1791    2.2067    2.2350    2.2634    2.2919    2.3206    2.3494    2.3784    2.4075    2.4367    2.4661
                2.2332    2.2337    2.2619    2.2908    2.3197    2.3487    2.3778    2.4070    2.4363    2.4657    2.4951    2.5246
                2.2600    2.2605    2.2895    2.3191    2.3487    2.3784    2.4081    2.4378    2.4675    2.4973    2.5272    2.5571
                2.2638    2.2638    2.2936    2.3240    2.3544    2.3848    2.4151    2.4455    2.4758    2.5062    2.5365    2.5669
                2.2472    2.2472    2.2779    2.3092    2.3403    2.3715    2.4025    2.4336    2.4646    2.4955    2.5264    2.5573
                2.2140    2.2140    2.2455    2.2776    2.3096    2.3415    2.3733    2.4050    2.4367    2.4683    2.4998    2.5313
                2.1668    2.1668    2.1992    2.2321    2.2649    2.2976    2.3301    2.3626    2.3949    2.4272    2.4593    2.4914
                2.1081    2.1081    2.1413    2.1750    2.2086    2.2421    2.2754    2.3085    2.3415    2.3744    2.4072    2.4399
                2.0494    2.0494    2.0739    2.1084    2.1428    2.1770    2.2110    2.2449    2.2786    2.3121    2.3455    2.3788], 'GPa' };	% Isothermal bulk modulus

   	alpha_TLU= {1e-4 * [ 0.6790    0.6760    0.4900    0.3070    0.1300   -0.0410   -0.2060   -0.3650   -0.5190   -0.6680   -0.8110   -0.9490
                        -0.8780   -0.8810   -0.9980   -1.1140   -1.2270   -1.3370   -1.4450   -1.5490   -1.6510   -1.7500   -1.8460   -1.9390
                        -2.0680   -2.0690   -2.1410   -2.2130   -2.2830   -2.3520   -2.4200   -2.4860   -2.5510   -2.6140   -2.6760   -2.7360
                        -3.0340   -3.0350   -3.0740   -3.1130   -3.1520   -3.1910   -3.2290   -3.2670   -3.3050   -3.3410   -3.3770   -3.4130
                        -3.8550   -3.8560   -3.8700   -3.8840   -3.8990   -3.9140   -3.9300   -3.9460   -3.9610   -3.9770   -3.9930   -4.0090
                        -4.5780   -4.5780   -4.5720   -4.5660   -4.5620   -4.5580   -4.5550   -4.5520   -4.5500   -4.5490   -4.5480   -4.5470
                        -5.2330   -5.2330   -5.2090   -5.1860   -5.1650   -5.1440   -5.1250   -5.1070   -5.0900   -5.0740   -5.0590   -5.0450
                        -5.8400   -5.8400   -5.8010   -5.7620   -5.7250   -5.6910   -5.6570   -5.6250   -5.5950   -5.5660   -5.5380   -5.5120
                        -6.4140   -6.4140   -6.3600   -6.3070   -6.2560   -6.2080   -6.1610   -6.1170   -6.0740   -6.0330   -5.9940   -5.9560
                        -6.9670   -6.9670   -6.8980   -6.8310   -6.7660   -6.7050   -6.6460   -6.5890   -6.5350   -6.4820   -6.4320   -6.3840
                        -7.5190   -7.5190   -7.4230   -7.3420   -7.2640   -7.1890   -7.1180   -7.0490   -6.9830   -6.9200   -6.8590   -6.8000], '1/K' }; % Isobaric coefficient of thermal expansion

end

parameters
    pT_region_flag = { 0,   '1'     }; % Valid pressure-temperature region parametrization, 0: By minimum and maximum value, 1: By validity matrix
    T_min       = { 273.15, 'K'     }; % Minimum allowable temperature
    p_min       = { 0.1,    'bar'   }; % Minimum allowable pressure
    T_max       = { 373.15, 'K'     }; % Maximum allowable temperature
    p_max       = { 500,    'bar'   }; % Maximum allowable pressure
    G_min    	= { 1e-3,   'W/K'   }; % Minimum thermal conductance
    p_atm       = { 1,      'atm'   }; % Atmospheric pressure
end

variables
	p = { 1,  'bar'	};	% Pressure
    T = { 293.15,	'K'     };	% Temperature
end

variables(Balancing = true)
    mdot = { 0, 'kg/s'	};	% Mass Flow Rate
    Phi  = { 0, 'J/s'	};	% Thermal Flux: total heat flow due to fluid transport and conduction
end

end

It contains the following variables and parameters:

  • Across variable p (pressure), in bar

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

  • Across variable T (temperature), in kelvin

  • Through variable Phi (thermal flux), in J/s

  • 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 allowable temperature

  • Parameter p_min, defining the minimum allowable pressure

  • Parameter T_max, defining the maximum allowable temperature

  • Parameter p_min, defining the maximum allowable pressure

  • Parameter G_min, defining the minimum thermal conductance

  • Parameter p_atm, defining the atmospheric pressure

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

  • Density

  • Internal energy

  • Kinematic viscosity

  • Specific heat at constant pressure

  • Thermal conductivity

  • Isothermal bulk modulus

  • Isobaric coefficient of thermal expansion

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 

Was this topic helpful?