Main Content

Moist Air Source Domain

This domain is used only for connecting sources of moisture and trace gas to components with internal moist air volume.

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

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

Abbreviated moist air source domain declaration is shown below, with intermediate lookup table values omitted for readability.

domain moist_air_source
% Moist Air Source Domain
% This domain is used only for connecting sources of moisture and trace gas
% to moist air components.

% Copyright 2017 The MathWorks, Inc.

parameters
    trace_gas_model = foundation.enum.trace_gas_model.track_properties; % Trace gas model
    %                                                                     1 - none
    %                                                                     2 - track_fraction
    %                                                                     3 - track_properties

    T_TLU = {[-56.55, -50:10:-10, -5:1:5, 10:10:350]', 'degC'}; % Temperature vector

    h_w_vap_TLU = {[
        2836.88241275372
        2837.81392500514
        ...
        1027.62017777647
        892.733785613825], 'kJ/kg'}; % Water specific enthalpy of vaporization vector

    h_w_TLU = {[
        2396.55944251649
        2408.68643343608
        ...
        3155.43043805905
        3175.80160435813], 'kJ/kg'}; % Water vapor specific enthalpy vector

    h_g_TLU = {[
        439.555216260064
        444.670268200251
        ...
        814.123440770426
        824.984623198037], 'kJ/kg'}; % Trace gas specific enthalpy vector

    T_min = {-56.55, 'degC'}; % Minimum valid temperature
    T_max = {350,    'degC'}; % Maximum valid temperature
    T_atm = {20,     'degC'}; % Atmospheric temperature
end

variables
    T   = {300, 'K'}; % Temperature
    x_w = 0;          % Specific humidity
    x_g = 0;          % Trace gas mass fraction
end

variables (Balancing=true)
    Phi    = {0, 'kW'  }; % Mixture energy flow rate
    mdot_w = {0, 'kg/s'}; % Water vapor mass flow rate
    mdot_g = {0, 'kg/s'}; % Trace gas mass flow rate
end

end

The domain declaration contains the following variables and parameters:

  • Across variable T (temperature), in K

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

  • Across variable x_w (specific humidity), unitless

  • Through variable mdot_w (water vapor mass flow rate), in kg/s

  • Across variable x_g (trace gas mass fraction), unitless

  • Through variable mdot_g (trace gas mass flow rate), in kg/s

  • Parameter T_min, defining the minimum allowable temperature

  • Parameter T_max, defining the maximum allowable temperature

  • Parameter T_atm, defining the atmospheric temperature

Parameter trace_gas_model provides a choice of three trace gas models:

  • foundation.enum.trace_gas_model.none — None

  • foundation.enum.trace_gas_model.track_fraction — Track mass fraction only

  • foundation.enum.trace_gas_model.track_properties — Track mass fraction and gas properties

In the Foundation Moist Air library, the Moist Air Properties (MA) block serves as the source for domain parameter values, including the selection of the trace gas model. For more information on propagation of domain parameters, see Working with Domain Parameters.

The domain declaration also contains sets of parameters that define water vapor and trace gas properties in the form of lookup table data. The table lookup is with respect to the temperature vector, T_TLU. These parameter declarations propagate to the components connected to the Moist Air Source domain, and therefore you can use them in the tablelookup function in the component equations.

You do not need to independently specify the water vapor and trace gas properties for the Moist Air Source domain. The Moist Air library blocks with an S port are set up in such a way that they propagate the properties from the regular Moist Air domain to the Moist Air Source domain connected to their S port. This way, the water vapor and trace gas properties are consistent between the Moist Air domain and the Moist Air Source domain.

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

foundation.moist_air.moist_air_source 

See Also

Related Topics