Engee documentation

Constant Volume Chamber (G)

A tank with one inlet and a fixed volume of gas.

blockType: AcausalFoundation.Gas.Elements.ConstantVolumeChamber

Path in the library:

/Physical Modeling/Fundamental/Gas/Elements/Constant Volume Chamber (G)

Description

Block Constant Volume Chamber (G) simulates the accumulation of mass and energy in a gas network. There is a constant volume of gas in the chamber. The enclosure can exchange mass and energy with the connected gas network and exchange heat with the environment, allowing the internal pressure and temperature to change over time. Pressure and temperature vary depending on the compressibility and heat capacity of the gas volume.

Conservation of mass

The law of conservation of mass relates the mass flow rate to the dynamics of pressure and temperature changes in the internal unit representing the volume of gas:

where

  • is the partial derivative of the gas mass in terms of pressure at constant temperature and volume;

  • is the partial derivative of the mass of a gas with respect to temperature at constant pressure and volume;

  • — gas pressure. The pressure at port A is considered to be equal to this pressure, ;

  • — the temperature of the gas. It is assumed that the temperature at port H is equal to this temperature, ;

  • — time;

  • — mass consumption at the port A. The flow rate associated with the port is positive when gas flows into the unit;

  • — mass flow rate on port B. The flow rate associated with the port is positive when gas flows into the unit;

  • — mass consumption at port C. The flow rate associated with the port is positive when gas flows into the unit;

  • — mass flow rate at port D. The flow rate associated with the port is positive when gas flows into the unit;

Energy conservation

The law of conservation of energy relates the expenditure of energy and heat to the dynamics of pressure and temperature changes in the internal unit representing the volume of gas:

where

  • is the partial derivative of the internal energy of a gas in terms of pressure at constant temperature and volume;

  • is the partial derivative of the internal energy of a gas with respect to temperature at constant pressure and volume;

  • — energy flow through port A;

  • — energy flow through port B;

  • — energy flow through port C;

  • — energy flow through port D;

  • — heat flow through port H.

Partial derivatives for models of ideal and semi-ideal gases

Partial derivatives of mass and internal energy The volume of gas in terms of pressure and temperature at a constant volume depends on the model of gas properties. For models of an ideal and semi-ideal gas, the equations are as follows:







where

— gas density;

— gas volume;

— specific enthalpy of the gas;

— the coefficient of compressibility;

— universal gas constant;

— specific heat capacity at constant pressure of the gas volume.

Partial derivatives for the real gas model

For a real gas model, partial derivatives of mass and internal energy the volumes of gas in terms of pressure and temperature at a constant volume are equal to:







where

— isothermal volumetric gas compression module;

— isobaric coefficient of thermal expansion of the gas.

Assumptions and limitations

  • The walls of the chamber are absolutely rigid.

  • There is no flow resistance between the A port and the inside of the camera.

  • There is no thermal resistance between the H port and the inside of the camera.

Variables

Use the parameter group Initial Targets to set the priority and initial target values for the block parameter variables before modeling. For more information, see Configuring physical blocks using target values.

Ports

Conserving

# A — entrance to the camera
gas

Details

The gas port corresponds to the entrance to the chamber.

Program usage name

port_a

# H — temperature inside the chamber
warm

Details

A thermal port related to the temperature of the gas inside the chamber.

Program usage name

thermal_port

# B — entrance to the camera
gas

Details

The gas port corresponds to the second entrance to the chamber.

Dependencies

To use this port, set the parameter Number of ports meaning 2, 3 or 4.

Program usage name

port_b

# C — entrance to the camera
gas

Details

The gas port corresponds to the third entrance to the chamber.

Dependencies

To use this port, set the parameter Number of ports meaning 3 or 4.

Program usage name

port_c

# D — entrance to the camera
gas

Details

The gas port corresponds to the fourth entrance to the chamber.

Dependencies

To use this port, set the parameter Number of ports meaning 4.

Program usage name

port_d

Parameters

Parameters

# Chamber volume — volume of gas in the chamber
m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3

Details

The volume of gas in the chamber. The camera is rigid, so its volume remains constant during simulation. It is assumed that the chamber is always completely filled with gas.

Units

m^3 | um^3 | mm^3 | cm^3 | km^3 | ml | l | gal | igal | in^3 | ft^3 | yd^3 | mi^3

Default value

0.1 m^3

Program usage name

volume

Evaluatable

Yes

# Number of ports — number of inlet ports in the chamber
1 | 2 | 3 | 4

Details

The number of inlet ports in the chamber. The camera can have from one to four ports marked from A to D. When you change the parameter value, the corresponding ports are displayed or hidden on the block icon.

Values

1 | 2 | 3 | 4

Default value

1

Program usage name

port_count

Evaluatable

No

# Cross-sectional area at port A — the area normal to the flow path at the entrance A to the chamber
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

The cross-sectional area of the entrance to the chamber at port A in the direction normal to the gas flow path.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

0.01 m^2

Program usage name

port_a_area

Evaluatable

Yes

# Cross-sectional area at port B — the area normal to the flow path at the entrance B to the chamber
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

The cross-sectional area of the chamber entrance at port B in the direction normal to the gas flow path.

Dependencies

To use this parameter, set for the parameter Number of ports meaning 2, 3 or 4.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

0.01 m^2

Program usage name

port_b_area

Evaluatable

Yes

# Cross-sectional area at port C — the area normal to the flow path at the entrance C to the chamber
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

The cross-sectional area of the chamber entrance at port C in the direction normal to the gas flow path.

Dependencies

To use this parameter, set for the parameter Number of ports meaning 3 or 4.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

0.01 m^2

Program usage name

port_c_area

Evaluatable

Yes

# Cross-sectional area at port D — the area normal to the flow path at the entrance D to the chamber
m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Details

The cross-sectional area of the chamber entrance at port D in the direction normal to the gas flow path.

Dependencies

To use this parameter, set for the parameter Number of ports meaning 4.

Units

m^2 | um^2 | mm^2 | cm^2 | km^2 | in^2 | ft^2 | yd^2 | mi^2 | ha | ac

Default value

0.01 m^2

Program usage name

port_d_area

Evaluatable

Yes