# Interface (2P-MA)

**Libraries:**

Simscape /
Fluids /
Fluid Network Interfaces

## Description

The Interface (2P-MA) block represents a flow
connection between a two-phase fluid 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. When moist air leaves
port **MA**, the block assigns the values of the **Interface
relative humidity** and **Interface trace gas mass
fraction** parameters to the signal. However, when moist air enters port
**MA**, the block retains the upstream values.

You can choose whether to maintain constant moisture and trace gas amounts at the interface
or to specify them using the **W** or **Tw** and
**TG** ports respectively. The fluid at the **2P**
port must remain superheated. You can use the **Two-phase fluid superheated
vapor check** parameter to choose what action the block performs if the
fluid does not meet this condition.

### Equations

The block conserves mass such that

$${\dot{m}}_{2P}+{\dot{m}}_{MA}=0,$$

where:

*ṁ*is the mass flow rate into port_{2P}**2P**.*ṁ*is the mass flow rate into port_{MA}**MA**.

The block maintains equal port pressures and temperatures such that

$$\begin{array}{l}{p}_{2P}={p}_{MA}\\ {T}_{2P}={T}_{MA}\end{array}$$

The block calculates the energy balance over the interface as

$${\Phi}_{2P}+{\Phi}_{MA}={\dot{m}}_{2P}\left({h}_{2P}+\frac{{w}_{2P}^{2}}{2}\right)+{\dot{m}}_{MA}\left({h}_{MA}+\frac{{w}_{MA}^{2}}{2}\right),$$

where:

*Φ*is the energy flow rate into port_{2P}**2P**.*Φ*is the energy flow rate into port_{MA}**MA**.*h*is the specific enthalpy at port_{2P}**2P**.*h*is the specific enthalpy at port_{MA}**MA**.*v*is the specific volume at port_{2P}**2P**.*v*is the specific volume at port_{MA}**MA**.*w*is the flow velocity at port_{2P}**2P**.*w*is the flow velocity at port_{MA}**MA**.

For a given cross-sectional area, *S*, the block
defines *w _{2P}* as

$${w}_{2P}=\frac{{\dot{m}}_{2P}{v}_{2P}}{S},$$

and *w _{MA}* as

$${w}_{MA}=\frac{{\dot{m}}_{MA}{v}_{MA}}{S},$$

where

$${v}_{MA}=\frac{{R}_{I}{T}_{MA}}{{p}_{MA}}.$$

You specify *S* using the
**Cross-sectional area at ports 2P and MA** parameter. The
block computes the specific gas constant of the interface mixture,
*R _{I}*, as a function of the fluid on
either side such that

$${R}_{I}=f\left({R}_{A},{R}_{W},{R}_{G},{x}_{WI},{x}_{GI}\right),$$

where:

*R*is the dry air specific gas constant._{A}*R*is the water vapor specific gas constant._{W}*R*is the trace gas specific gas constant._{G}*x*is the interface specific humidity. The block determines this value when the flow exits port_{WI}**MA**, based on your parameter settings:When

**Moisture and trace gas specification**is`Constant`

, the block calculates*x*based on the method specified with the_{WI}**Interface moisture specification**parameter.When

**Moisture and trace gas specification**is`Controlled`

, the block bases*x*on the input that you supply at port_{WI}**W**or port**Tw**.

*x*is the interface trace gas mass fraction. The block determines this value when the flow exits port_{GI}**MA**, based on your parameter settings:When

**Moisture and trace gas specification**is`Constant`

, the block calculates*x*based on the value of the_{GI}**Interface trace gas mass fraction**or**Interface trace gas mole fraction**parameter.When

**Moisture and trace gas specification**is`Controlled`

, the block bases*x*on the input that you supply at port_{GI}**TG**.

## Ports

### Input

### Conserving

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2022a**