# Controlled Pressure Source (G)

Generate time-varying pressure differential

• Library:
• Simscape / Foundation Library / Gas / Sources

## Description

The Controlled Pressure Source (G) block represents an ideal mechanical energy source in a gas network. The pressure differential is controlled by the input physical signal at port M. The source can maintain the specified pressure differential across its ports regardless of the mass flow rate through the source. There is no flow resistance and no heat exchange with the environment. A positive signal at port P causes the pressure at port B to be greater than the pressure at port A.

You can choose whether the source performs work on the gas flow:

• If the source is isentropic (Power added parameter is set to Isentropic power), then the isentropic relation depends on the gas property model.

Gas ModelEquations
Perfect gas$\frac{{\left({p}_{A}\right)}^{Z\cdot R/{c}_{p}}}{{T}_{A}}=\frac{{\left({p}_{B}\right)}^{Z\cdot R/{c}_{p}}}{{T}_{B}}$
Semiperfect gas${\int }_{0}^{{T}_{A}}\frac{{c}_{p}\left(T\right)}{T}dT-Z\cdot R\cdot \mathrm{ln}\left({p}_{A}\right)={\int }_{0}^{{T}_{B}}\frac{{c}_{p}\left(T\right)}{T}dT-Z\cdot R\cdot \mathrm{ln}\left({p}_{B}\right)$
Real gas$s\left({T}_{A},{p}_{A}\right)=s\left({T}_{B},{p}_{B}\right)$

The power delivered to the gas flow is based on the specific total enthalpy associated with the isentropic process.

${\Phi }_{work}=-{\stackrel{˙}{m}}_{A}\left({h}_{A}+\frac{{w}_{A}^{2}}{2}\right)-{\stackrel{˙}{m}}_{B}\left({h}_{B}+\frac{{w}_{B}^{2}}{2}\right)$

• If the source performs no work (Power added parameter is set to None), then the defining equation states that the specific total enthalpy is equal on both sides of the source. It is the same for all three gas property models.

${h}_{A}+\frac{{w}_{A}^{2}}{2}={h}_{B}+\frac{{w}_{B}^{2}}{2}$

The power delivered to the gas flow Φwork = 0.

The equations use these symbols:

 cp Specific heat at constant pressure h Specific enthalpy $\stackrel{˙}{m}$ Mass flow rate (flow rate associated with a port is positive when it flows into the block) p Pressure R Specific gas constant s Specific entropy T Temperature w Flow velocity Z Compressibility factor Φwork Power delivered to the gas flow through the source

Subscripts A and B indicate the appropriate port.

### Variables

Use the Variables tab in the block dialog box (or the Variables section in the block Property Inspector) to set the priority and initial target values for the block variables prior to simulation. For more information, see Set Priority and Initial Target for Block Variables and Initial Conditions for Blocks with Finite Gas Volume.

### Assumptions and Limitations

• There are no irreversible losses, nor heat exchange with the environment.

## Ports

### Input

expand all

Input physical signal that specifies the pressure differential of the gas across the source. A positive signal at port P causes the pressure at port B to be greater than the pressure at port A.

### Conserving

expand all

Gas conserving port. A positive signal at port P causes the pressure at port B to be greater than the pressure at port A.

Gas conserving port. A positive signal at port P causes the pressure at port B to be greater than the pressure at port A.

## Parameters

expand all

Select whether the source performs work on the gas flow:

• Isentropic power — The source performs isentropic work on the gas to maintain the specified pressure differential, regardless of the mass flow rate. Use this option to represent an idealized pump or compressor and properly account for the energy input and output, especially in closed-loop systems.

• None — The source performs no work on the flow, neither adding nor removing power, regardless of the pressure differential produced by the source. Use this option to set up the desired flow condition upstream of the system, without affecting the temperature of the flow.

Area normal to flow path at port A.

Area normal to flow path at port B.