| Simscape™ | ![]() |
Simulate hydraulic capacity of variable volume with compressible fluid
Hydraulic Elements

The Variable Volume Chamber block models fluid compressibility in variable volume chambers, such as hydraulic cylinder cavities. The fluid is considered to be a mixture of liquid and a small amount of entrained, nondissolved gas. Use this block together with the Translational Hydro-Mechanical Converter block.
Note The Variable Volume Chamber block takes into account only the flow rate caused by fluid compressibility. The fluid volume consumed to create piston velocity is accounted for in the Translational Hydro-Mechanical Converter block. |
The chamber is simulated according to the following equations:
![]()

where
| q | Flow rate due to fluid compressibility |
| V0 | Initial volume of fluid in the chamber |
| A | Effective piston area |
| x | Piston displacement from initial position |
| or | Chamber orientation with respect to the globally assigned positive direction. If displacement in positive direction increases the volume of the chamber, or equals 1. If displacement in positive direction decreases the volume of the chamber, or equals –1. |
| E | Fluid bulk modulus |
| El | Pure liquid bulk modulus |
| p | Gauge pressure of fluid in the chamber |
| pα | Atmospheric pressure |
| α | Relative gas content at atmospheric pressure, α = VG/VL |
| VG | Gas volume at atmospheric pressure |
| VL | Volume of liquid |
| n | Gas-specific heat ratio |
The main objective of representing fluid as a mixture of liquid and
gas is to introduce an approximate model of cavitation, which takes place
in a chamber if pressure drops below fluid vapor saturation level. As it is
seen in the graph below, the bulk modulus of a mixture decreases at
, thus considerably
slowing down further pressure change. At high pressure,
, a small
amount of nondissolved gas has practically no effect on the system behavior.

Cavitation is an inherently thermodynamic process, requiring consideration of multiple-phase fluids, heat transfers, etc., and as such cannot be accurately simulated with Simscape™ software. But the simplified version implemented in the block is good enough to signal if pressure falls below dangerous level, and to prevent computation failure that normally occurs at negative pressures.
If it is known that cavitation is unlikely in the system under design, you can set the relative gas content in the fluid properties to zero, thus increasing the speed of computations.
Port A is a hydraulic conserving port associated with the chamber inlet. Port P is a physical signal port that controls piston displacement.
The block positive direction is from port A to the reference point. This means that the flow rate is positive if it flows into the chamber.
The model is based on the following assumptions:
Fluid density remains constant.
Fluid fills the entire chamber volume.

Effective piston area. The default value is 5e-4 m^2.
Specifies chamber orientation with respect to the globally assigned positive direction. The chamber can be installed in two different ways, depending upon whether the piston motion in the positive direction increases or decreases the volume of the chamber. If piston motion in the positive direction decreases the chamber volume, set the parameter to Decreases at positive. The default value is Increases at positive.
Volume of fluid in the chamber at initial piston position. The default value is 1e-4 m^3.
Gas-specific heat ratio. The default value is 1.4.
Initial pressure in the chamber. This parameter specifies the initial condition for use in computing the block's initial state at the beginning of a simulation run. For more information, see Computing Initial Conditions. The default value is 0.
The parameter is determined by the type of working fluid selected for the system under design. Use the Hydraulic Fluid block or the Custom Hydraulic Fluid block to specify the fluid properties.
Nondissolved gas relative content determined as a ratio of gas volume to the liquid volume. The parameter is determined by the type of working fluid selected for the system under design. Use the Hydraulic Fluid block or the Custom Hydraulic Fluid block to specify the fluid properties.
The block has the following ports:
Hydraulic conserving port associated with the chamber inlet.
Physical signal port that controls piston displacement.
The Variable Volume Chamber Test Rig demo (sh_variable_chamber_test_rig) is specifically designed to demonstrate the Variable Volume Chamber block behavior at different regimes. Each chamber is installed between two equal fixed-area orifices. The top chamber is set to increase its volume with the piston motion in positive direction, while the bottom chamber volume decreases at the same time.
Translational Hydro-Mechanical Converter
![]() | Variable Resistor | Voltage-Controlled Current Source | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |