Main Content

Interface (G-MA)

R2026b

Gas and moist air network interface

Since R2022a

  • Interface (G-MA) block icon

Libraries:
Simscape / Fluids / Fluid Network Interfaces

Description

The Interface (G-MA) block represents a flow connection between a gas network and moist air network. Pressure, temperature, and mass flow rate are equal at the interface. The block does not transfer the fluid properties of each fluid network across the interface. To conserve fluid properties, ensure that the Gas Properties (G) block and the Moist Air Properties (MA) block have the same settings. When moist air leaves port MA, the block assigns the values of the Interface relative humidity, Interface trace gas mass fraction, and Interface mass ratio of water droplets to moist air parameters, or the values of the input signals, to the signal. However, when moist air enters port MA, the block retains the upstream values.

You can choose whether to maintain constant humidity, water droplets, and trace gas amounts at the interface or to specify them using the W or Tw, D, and TG ports, respectively.

Mass and Momentum Balance

The block conserves mass such that

m˙G+m˙MA=0,

where:

  • ṁG is the mass flow rate into port G.

  • ṁMA is the mass flow rate into port MA.

The block maintains equal port pressures and temperatures such that

pG=pMATG=TMA

Energy Balance

The block calculates the energy balance over the interface as

ΦG+ΦMA=m˙G(hG+wG22)+m˙MA(hMA+wMA22),

where:

  • ΦG is the energy flow rate into port G.

  • ΦMA is the energy flow rate into port MA.

  • hG is the specific enthalpy at port G.

  • hMA is the specific enthalpy at port MA.

  • vG is the specific volume at port G.

  • vMA is the specific volume at port MA.

  • wG is the flow velocity at port G.

  • wMA is the flow velocity at port MA.

For a given cross-sectional area, S, the block defines wG as

wG=m˙GvGS,

and wMA as

wMA=m˙MAvMAS,

where:

vMA=RITMApMA.

The specific gas constant of the mixture at the interface is a function of the fluid on either side such that

RI=f(RA,RWRG,xWI,xGI),

where:

  • RA is the dry air specific gas constant.

  • RW is the water vapor specific gas constant.

  • RG is the trace gas specific gas constant.

  • xWI is the interface specific humidity. The block determines this value when the flow exits port MA, based on your parameter settings:

    • When you clear the Provide input signal for interface humidity check box, the block calculates xWI based on the method specified with the Interface humidity specification parameter.

    • When you select Provide input signal for interface humidity, the block bases xWI on the input that you supply at port W or port Tw.

  • xGI is the interface trace gas mass fraction. The block determines this value when the flow exits port MA, based on your parameter settings:

    • When you clear the Provide input signal for interface trace gas check box, the block calculates xGI based on the value of the Interface trace gas mass fraction or Interface trace gas mole fraction parameter.

    • When you select Provide input signal for interface trace gas, the block bases xGI on the input that you supply at port TG.

Ports

Input

expand all

Physical signal port associated with the humidity content at the interface.

Dependencies

To enable this port, select Provide input signal for interface humidity and set Interface humidity specification to Relative humidity, Specific humidity, Mole fraction, or Humidity ratio.

Programmatic Use

Port: W

Physical signal port associated with the wet-bulb temperature at the interface, in K.

Dependencies

To enable this port, select Provide input signal for interface humidity and set Interface humidity specification to Wet-bulb temperature.

Programmatic Use

Port: Tw

Physical signal port associated with the trace gas at the interface.

Dependencies

To enable this port, select Provide input signal for interface trace gas.

Programmatic Use

Port: TG

Physical signal port associated with the mass ratio of water droplets to moist air at the interface.

Dependencies

To enable this port, select Provide input signal for interface water droplets.

Programmatic Use

Port: D

Conserving

expand all

Gas conserving port associated with the gas at the interface.

Programmatic Use

Port: G

Moist air conserving port associated with the moist air at the interface.

Programmatic Use

Port: MA

Parameters

expand all

Option for specifying the interface humidity. If you select this check box, the block enables port W. If you clear this check box, you can specify constant humidity conditions.

Programmatic Use

Parameter: humidity_input
Values: "true" | "false"

Whether to calculate humidity using relative humidity, specific humidity, mole fraction, humidity ratio, or wet-bulb temperature.

Programmatic Use

Parameter: humidity_spec
Values: "foundation.enum.HumiditySpec.RelativeHumidity" | "foundation.enum.HumiditySpec.SpecificHumidity" | "foundation.enum.HumiditySpec.MoleFraction" | "foundation.enum.HumiditySpec.HumidityRatio" | "foundation.enum.HumiditySpec.WetBulbTemperature"

Relative humidity at the interface. The block uses this value to calculate the humidity.

Dependencies

To enable this parameter, clear the Provide input signal for interface humidity check box and set Interface humidity specification to Relative humidity.

Programmatic Use

Parameter: RH_interface

Specific humidity at the interface. The block uses this value to calculate the humidity.

Dependencies

To enable this parameter, clear the Provide input signal for interface humidity check box and set Interface humidity specification to Specific humidity.

Programmatic Use

Parameter: x_w_interface

Water vapor mole fraction at the interface. The block uses this value to calculate the humidity.

Dependencies

To enable this parameter, clear the Provide input signal for interface humidity check box and set Interface humidity specification to Mole fraction.

Programmatic Use

Parameter: y_w_interface

Humidity ratio at the interface. The block uses this value to calculate the humidity.

Dependencies

To enable this parameter, clear the Provide input signal for interface humidity check box and set Interface humidity specification to Humidity ratio.

Programmatic Use

Parameter: HR_interface

Wet bulb temperature at the interface. The block uses this value to calculate humidity.

Dependencies

To enable this parameter, clear the Provide input signal for interface humidity check box and set Interface humidity specification to Wet-bulb temperature.

Programmatic Use

Parameter: Tw_interface

Option for specifying the trace gas fraction. If you select this check box, the block enables port TG. If you clear this check box, you can specify constant trace gas conditions.

Programmatic Use

Parameter: trace_gas_input
Values: "true" | "false"

Whether to parameterize the trace gas at the interface using mass fraction or mole fraction.

Programmatic Use

Parameter: trace_gas_spec
Values: "foundation.enum.trace_gas_spec.mass_fraction" | "foundation.enum.trace_gas_spec.mole_fraction"

Mass fraction of trace gas at the interface.

Dependencies

To enable this parameter, clear the Provide input signal for interface trace gas check box and set Interface trace gas specification to Mass fraction.

Programmatic Use

Parameter: x_g_interface

Mole fraction of trace gas at the interface.

Dependencies

To enable this parameter, clear the Provide input signal for interface trace gas check box and set Interface trace gas specification to Mole fraction.

Programmatic Use

Parameter: y_g_interface

Option for specifying the mass ratio of water droplets to moist air. If you select this check box, the block enables port D. If you clear this check box, you can specify constant water droplet conditions with the Interface mass ratio of water droplets to moist air parameter.

Programmatic Use

Parameter: water_droplets_input
Values: "true" | "false"

Mass ratio of water droplets to moist air at the interface.

Dependencies

To enable this parameter, clear the Provide input signal for interface water droplets check box.

Programmatic Use

Parameter: r_d_interface

Relative humidity at the point of saturation.

Programmatic Use

Parameter: RH_ws

Cross-sectional area of the gas and moist air ports.

Programmatic Use

Parameter: area

Monitor or control invalid inputs. When you select Limit to valid values, the block saturates the inputs within the bounds. You can choose to have the block issue a warning when it limits the inputs by selecting Warn and limit to valid values, or you can stop the simulation when the block receives invalid inputs by selecting Error.

Programmatic Use

Parameter: input_error_spec
Values: "foundation.enum.input_range_error.limit" | "foundation.enum.input_range_error.warn" | "foundation.enum.input_range_error.error"

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2022a

expand all