Main Content

Controlled Reservoir (2P)

Two-phase fluid reservoir at variable pressure and temperature

Library

Two-Phase Fluid/Elements

  • Controlled Reservoir (2P) block

Description

The Reservoir (2P) block sets boundary conditions in a two-phase fluid network. Those conditions are specified in terms of pressure and—depending on the Reservoir energy specification setting—either specific enthalpy or specific internal energy. The reservoir is assumed infinite in size, causing its pressure and specific internal energy to remain constant.

Port A represents the reservoir inlet. The flow resistance between port A and the reservoir interior is assumed negligible. The pressure at port A is therefore equal to that inside the reservoir.

Port P sets the absolute pressure in the reservoir (in units of MPa). Ports H and U set the specific enthalpy and specific internal energy, respectively (both in units of kJ/kg). Which of these two ports is active depends on the energy specification setting of the block.

The specific enthalpy and specific internal energy at the reservoir inlet depend on the direction of flow. If fluid leaves the reservoir, these variables are the same as inside the reservoir. The reservoir then acts as an energy source. If fluid enters the reservoir, these variables are the same as upstream of the reservoir. The reservoir acts as an energy sink.

This block also serves as a reference connection for the Pressure & Internal Energy Sensor (2P) block. In this case, the measured pressure and specific internal energy are relative to the reservoir pressure and specific internal energy.

Assumptions and Limitations

  • The flow resistance between port A and the reservoir interior is negligible. Pressure is the same at port A and in the reservoir interior.

Parameters

Reservoir energy specification

Measure of energy to specify during simulation. The default setting is Specific enthalpy. Changing this setting changes port H to port U. Use the active port to specify the chosen measure of energy.

Cross-sectional area at port A

Flow area of the reservoir inlet, represented by port A. The flow area must be greater than zero. The default value is 0.01 m^2.

Ports

The block has four ports:

  • A — Two-phase fluid port representing the inlet of the reservoir.

  • P — Physical signal input port for the (absolute) pressure of the fluid in the reservoir.

  • H — Physical signal input port for the specific enthalpy of the fluid in the reservoir. Whether this port is active depends on the Reservoir energy specification setting of the block.

  • U — Physical signal input port for the specific internal energy of the fluid in the reservoir. Whether this port is active depends on the Reservoir energy specification setting of the block.

Extended Capabilities

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

Introduced in R2015b