Isothermal Liquid Domain

The isothermal liquid domain declaration is shown below.

domain isothermal_liquid
% Isothermal Liquid Domain

% Copyright 2019 The MathWorks, Inc.

parameters
    rho_L_atm           = { 998.21,    'kg/m^3' }; % Liquid density at atmospheric pressure (no entrained air)
    entrained_air_model = foundation.enum.entrained_air_model.const; % Entrained air model
    %                                                                       1 - const
    %                                                                       2 - linear
    bulk_modulus_model = foundation.enum.bulk_modulus_model.const; % Isothermal bulk modulus model
    %                                               1 - const
    %                                               2 - linear
    beta_gain          = { 6,          '1'      }; % Isothermal bulk modulus vs. pressure increase gain
    beta_L_atm         = { 2.1791e9,   'Pa'     }; % Liquid isothermal bulk modulus at atmospheric pressure (no entrained air)
    nu_atm             = { 1.0034e-6,  'm^2/s'  }; % Kinematic viscosity at atmospheric pressure
    air_ratio          = { 0 ,         '1'      }; % Entrained air-to-liquid volumetric ratio at atmospheric pressure
    polytropic_index   = { 1.0,        '1'      }; % Air polytropic index
    rho_g_atm          = {1.225,       'kg/m^3' }; % Gas (air) density at atmospheric condition
    p_min              = { 0.1,        'Pa'     }; % Minimum valid pressure
    p_atm              = { 0.101325,   'MPa'    }; % Atmospheric pressure
    p_crit             = { 3,          'MPa'    }; % Pressure at which all entrained air is dissolved
end

variables
    p = { 0.1, 'MPa' }; % Pressure
end

variables(Balancing = true)
    mdot = { 0 , 'kg/s' }; % Mass 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

  • Parameter rho_L_atm, defining the liquid density at atmospheric pressure, with zero entrained air

  • Enumerated parameter entrained_air_model, defining the entrained air parametrization, with two values:

    • 0 — Entrained air is constant

    • 1 — Entrained air is a function of pressure

  • Enumerated parameter bulk_modulus_model, defining the bulk modulus parametrization, with two values:

    • 0 — Bulk modulus is constant

    • 1 — Bulk modulus is a function of pressure

  • Parameter beta_gain, defining the ratio of bulk modulus to pressure increase, for when the bulk modulus is a function of pressure

  • Parameter beta_L_atm, defining the liquid isothermal bulk modulus at atmospheric pressure, with zero entrained air

  • Parameter nu_atm, defining the kinematic viscosity at atmospheric pressure

  • Parameter air_ratio, defining the entrained air-to-liquid volumetric ratio at atmospheric pressure

  • Parameter polytropic_index, defining the air polytropic index

  • Parameter rho_g_atm, defining the air density at atmospheric condition

  • Parameter p_min, defining the minimum valid pressure

  • Parameter p_atm, defining the atmospheric pressure

  • Parameter p_crit, defining the pressure at which all entrained air is dissolved, for when the amount of entrained air is a function of pressure

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

foundation.isothermal_liquid.isothermal_liquid