Contenuto principale

fluidPropertiesThermalLiquid

Calculate thermal liquid fluid property values

Since R2026a

    Description

    requestedPropertyValue = fluidPropertiesThermalLiquid(propertySource,requestedProperty,pressure=pressureValue,temperature=temperatureValue) calculates the value of the thermal liquid property, requestedProperty, for the liquid source, propertySource, at the specified pressure, pressureValue, and temperature, temperatureValue.

    example

    requestedPropertyValue = fluidPropertiesThermalLiquid(propertySource,requestedProperty,pressure=pressureValue,temperature=temperatureValue,Name=Value) calculates the value of the thermal liquid property at the specified temperature, pressure, and additional specified fluid characteristics, by using one or more Name=Value arguments.

    example

    [requestedPropertyValue,valid] = fluidPropertiesThermalLiquid(___) returns the thermal liquid properties and a Boolean, valid, that returns true if the input properties are within the valid range for the fluid.

    example

    Examples

    collapse all

    This example shows how to calculate the fluid properties from a Thermal Liquid Settings block.

    Open the Water Hammer Effect example.

    openExample("simscape/WaterHammerEffectExample")

    Calculate the specific internal energy at 280 K and 101,325 Pa for the thermal liquid specified in the Thermal Liquid Settings (TL) block.

    fluidTemp = simscape.Value(280,"K");
    fluidPressure = simscape.Value(101325,"Pa");
    [ie,valid] = fluidPropertiesThermalLiquid("WaterHammerEffect/Thermal Liquid Settings (TL)","specificInternalEnergy",temperature=fluidTemp,pressure=fluidPressure)
    ie = 
      28.7696 (kJ/kg)
    valid =
         1

    The specific internal energy is 28.7696 kJ/kg, and the valid output is true, so the results are in the valid range for the fluid.

    This example shows how to calculate fluid properties for a predefined fluid. You must have a Simscape™ Fluids™ license to calculate fluid properties for a predefined fluid.

    Calculate the isothermal bulk modulus and the isobaric thermal expansion coefficient for water at 325, 350, and 375 K, and atmospheric pressure.

    [values, valid] = fluidPropertiesThermalLiquid("Water",["beta", "alpha"],temperature=[325, 350, 375], pressure = 0.101)
    
    values =
      1×2 cell array
        {[0.0185 0.0174 0.0165]}    {[4.8420e-04 6.3650e-04 7.7237e-04]}
    valid =
        1    1    0

    If the arguments for temperature and pressure are not the same size, the function uses matrix expansion to define all the fluid states. The isothermal bulk modulus is [0.0185 0.0174 0.0165] and the isobaric thermal expansion coefficient is [4.8420e-04 6.3650e-04 7.7237e-04]. The last element of the valid output is zero, which means that the input at that point is outside the valid fluid range.

    Input Arguments

    collapse all

    Thermal liquid properties source, specified as a block handle, character vector, or string scalar. This argument can be:

    • A block handle or path to a Thermal Liquid Settings (TL) or Thermal Liquid Properties (TL) (Simscape Fluids) block.

    • The name of a predefined fluid in the Thermal Liquid Properties (TL) block. You must have a Simscape Fluids license to specify the name of a predefined fluid. The available predefined fluids are:

      • Water

      • Seawater (MIT model)

      • Ethylene glycol and water mixture

      • Propylene glycol and water mixture

      • Glycerol and water mixture

      • Diesel Fuel

      • Aviation fuel Jet-A

      • SAE 5W-30

    Example: "myModel/Thermal Liquid Settings (TL)"

    Name of fluid property, specified as one of these properties:

    Property ArgumentProperty
    "rho", "density"Density
    "beta", "isothermalBulkModulus"Isothermal bulk modulus
    "alpha", "isobaricThermalExpansionCoefficient" Isobaric thermal expansion coefficient
    "u", "specificInternalEnergy"Specific internal energy
    "h", "specificEnthalpy"Specific enthalpy
    "cp", "specificHeatAtConstantPressure"Specific heat at constant pressure
    "cv", "specificHeatAtConstantVolume"Specific heat at constant volume
    "mu", "dynamicViscosity"Dynamic viscosity
    "nu", kinematicViscosity"Kinematic viscosity
    "k", "thermalConductivity"Thermal conductivity
    "Pr", "PrandtlNumber"Prandtl Number

    Fluid pressure value at which the block calculates the value of the property specified by requestedProperty, specified as a scalar, matrix, or simscape.Value object. If you specify this argument as a double, the function assumes it is in units of MPa.

    Example: pressure = 0.101,p = 0.101

    Data Types: double | simscape.Value

    Fluid temperature at which the block calculates the value of the property specified by requestedProperty, specified as a scalar, matrix, or simscape.Value object. If you specify this argument as a double, the function assumes it is in units of K.

    Example: temperature = 293,T = 293

    Data Types: double | simscape.Value

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: fluidPropertiesThermalLiquid("Water","Pr",temperature=280,pressure=0.101, Tatm=300) returns the density of water at 280 K and pressure 0.101 MPa when the atmospheric temperature is 300 K.

    Volumetric fraction of the entrained air in the fluid and air mixture at atmospheric conditions, specified as a scalar or a simscape.Value object.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Specific gas constant of the entrained air in the fluid, specified as a scalar or a simscape.Value object. If you specify this argument as a double, the function assumes it is in units of kJ/(K*kg). This name-value argument has the same behavior as Rair.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Specific gas constant of the entrained air in the fluid, specified as a scalar or a simscape.Value object. If you specify this argument as a double, the function assumes it is in units of kJ/(K*kg). This name-value argument has the same behavior as specificGasConstant.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Option to account for air dissolution into the fluid network, specified as a Boolean.

    • If you specify false, the amount of entrained air is constant.

    • If you specify true, the entrained air in the network can dissolve into the liquid. The amount of dissolved air is a function of pressure.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Critical pressure at which all entrained air is dissolved for a specific temperature, specified as a scalar or a simscape.Value object. If you specify this argument as a double, the function assumes it is in units of MPa. This name-value argument has the same behavior as criticalPressure.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Critical pressure at which all entrained air is dissolved for a specific temperature, specified as a scalar or a simscape.Value object. If you specify this argument as a double, the function assumes it is in units of MPa. This name-value argument has the same behavior as pCrit.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Reference pressure, specified as a scalar or a simscape.Value object. The block uses this value to calculate the effect of entrained air on density, isothermal bulk modulus, thermal expansion coefficient, and kinematic viscosity. If propertySource is Ethylene glycol and water mixture, Propylene glycol and water mixture, or Glycerol and water mixture, the block uses this value to calculate the density and thermal expansion coefficient. If you specify this argument as a double, the function assumes it is in units of MPa. This name-value argument has the same behavior as atmosphericPressure.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Reference pressure, specified as a scalar or a simscape.Value object. The block uses this value to calculate the effect of entrained air on density, isothermal bulk modulus, thermal expansion coefficient, and kinematic viscosity. If propertySource is Ethylene glycol and water mixture, Propylene glycol and water mixture, or Glycerol and water mixture, the block uses this value to calculate the density and thermal expansion coefficient. If you specify this argument as a double, the function assumes it is in units of MPa. This name-value argument has the same behavior as pAtm.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Reference temperature, specified as a scalar or a simscape.Value object. The block uses this value to calculate the effect of entrained air on density, isothermal bulk modulus, thermal expansion coefficient, and kinematic viscosity. If you specify this argument as a double, the function assumes it is in units of K. This name-value argument has the same behavior as atmosphericTemperature.

    To use this name-value argument, propertySource must be a predefined fluid.

    Reference temperature, specified as a scalar or a simscape.Value object. The block uses this value to calculate the effect of entrained air on density, isothermal bulk modulus, thermal expansion coefficient, and kinematic viscosity. If you specify this argument as a double, the function assumes it is in units of K. This name-value argument has the same behavior as Tatm.

    To use this name-value argument, propertySource must be a predefined fluid.

    Data Types: double | simscape.Value

    Volumetric fraction of the solvent in the aqueous mixture, specified as a scalar or a simscape.Value object. This name-value argument has the same behavior as volumeFraction.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture or Propylene glycol and water mixture.

    Data Types: double | simscape.Value

    Volumetric fraction of the solvent in the aqueous mixture, specified as a scalar or a simscape.Value object. This name-value argument has the same behavior as cVol.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture or Propylene glycol and water mixture.

    Data Types: double | simscape.Value

    Mass fraction of the solvent in the aqueous mixture, specified as a scalar or a simscape.Value object. This name-value argument has the same behavior as massFraction.

    If propertySource is Seawater (MIT model), the default value is 3.5e-3, otherwise it is 0.1.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture, Propylene glycol and water mixture, Seawater (MIT model), or Glycerol and water mixture.

    Data Types: double | simscape.Value

    Mass fraction of the solvent in the aqueous mixture, specified as a scalar or a simscape.Value object. This name-value argument has the same behavior as cMass.

    If propertySource is Seawater (MIT model), the default value is 3.5e-3, otherwise it is 0.1.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture, Propylene glycol and water mixture, Seawater (MIT model), or Glycerol and water mixture.

    Data Types: double | simscape.Value

    Liquid isothermal bulk modulus, specified as a scalar or a simscape.Value object. The isothermal bulk modulus a measure of the fluid compressibility with respect to pressure. The function assumes that the isothermal bulk modulus is constant at all temperature and pressure values. If you specify this argument as a double, the function assumes it is in units of GPa. This name-value argument has the same behavior as isothermalBulkModulus.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture, Propylene glycol and water mixture, or Glycerol and water mixture.

    Data Types: double | simscape.Value

    Liquid isothermal bulk modulus, specified as a scalar or a simscape.Value object. The isothermal bulk modulus a measure of the fluid compressibility with respect to pressure. The function assumes that the isothermal bulk modulus is constant at all temperature and pressure values. If you specify this argument as a double, the function assumes it is in units of GPa. This name-value argument has the same behavior as beta.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture, Propylene glycol and water mixture, or Glycerol and water mixture.

    Data Types: double | simscape.Value

    Minimum valid pressure, specified as a scalar or a simscape.Value object. If you specify this argument as a double, the function assumes it is in units of MPa. This name-value argument has the same behavior as minimumPressure.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture, Propylene glycol and water mixture, or Glycerol and water mixture.

    Data Types: double | simscape.Value

    Minimum valid pressure, specified as a scalar or a simscape.Value object. If you specify this argument as a double, the function assumes it is in units of MPa. This name-value argument has the same behavior as pMin.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture, Propylene glycol and water mixture, or Glycerol and water mixture.

    Data Types: double | simscape.Value

    Maximum valid pressure, specified as a scalar or a simscape.Value object. If you specify this argument as a double, the function assumes it is in units of MPa. This name-value argument has the same behavior as maximumPressure.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture, Propylene glycol and water mixture, or Glycerol and water mixture.

    Data Types: double | simscape.Value

    Maximum valid pressure, specified as a scalar or a simscape.Value object. If you specify this argument as a double, the function assumes it is in units of MPa. This name-value argument has the same behavior as pMax.

    To use this name-value argument, propertySource must be Ethylene glycol and water mixture, Propylene glycol and water mixture, or Glycerol and water mixture.

    Data Types: double | simscape.Value

    Output Arguments

    collapse all

    Calculated fluid property value, returned as a scalar, matrix, or a simscape.Value object. The units of the output are:

    PropertyUnit
    Densitykg/m^3
    Isothermal bulk modulusGPa
    Isobaric thermal expansion coefficient1/K
    Specific internal energykJ/kg
    Specific enthalpykJ/kg
    Specific heat at constant pressurekJ/(kg*K)
    Specific heat at constant volumekJ/(kg*K)
    Dynamic viscositycP
    Kinematic viscositymm^2/s
    Thermal conductivitymW/(K*m)
    Prandtl Number1

    Validity of the returned properties, returned as a Boolean scalar or matrix. If the inputs are outside the valid fluid range, this output is false.

    The size of the valid output is the same as the input arguments. If the inputs are matrices, then each entry of the valid output reports the validity of the corresponding elements in the input matrices.

    Alternative Functionality

    Simscape Block

    The values that the function returns are the same as the properties shown when you click the Plot button next to Thermal liquid properties in the Thermal Liquid Settings (TL) or Thermal Liquid Properties (TL) block dialog box.

    Version History

    Introduced in R2026a