MATLAB: How to specify an initial condition for pressure for the Single-Acting Hydraulic Cylinder in SimHydraulics 1.4 (R2008b)

actingcylinderpistonpressureSimscape Fluidssingle

The documentation for Single-Acting Hydraulic Cylinder says that it consists of five components, including the variable volume chamber block. This block requires initial pressure as a parameter, even though the single acting cylinder does not. How does this get resolved?

Best Answer

The stock model of the Single-Acting Hydraulic Cylinder does not allow initial pressure to be specified. It is assumed that the pressure is zero at the beginning of simulation. To be able to set initial pressure to something other than zero, you should build your own model of the cylinder. The structure of the cylinder model is described in detail in the description of the stock cylinder model at this link:
Please look at the attached model which has a custom built cylinder, and use this example as a starting point for your application.