# Cylinder

## Library

HydraulicsByFluidon/Components/Cylinders

## Description

Model of a differential cylinder with Stribeck friction and volumetric losses.

The fundamental geometrical properties of the differential cylinder are the piston and rod diameters (`Piston diameter` and `Rod diameter`) as well as the
lengths of the cylinder and the rod (`Cylinder length` and `Rod length`). By using the parameter `Inclination angle`,
the inclination of the cylinder with respect to the horizon can be adjusted.
The resulting forces due to gravity are taken into account automatically, however without inclusion of static fluid masses.

For dynamic calculations, the masses of the piston and the cylinder are required. These
can be provided by specifying the parameters `Piston mass` and `Cylinder mass`.
The dynamic mass of the fluid, which acts as an additional inertia, is automatically taken
into account by the model.

The parameters `Breakaway friction force`, `Constant friction/Coulomb force`, `Velocity dependent friction`
and `Velocity parameter for Stribeck friction` (velocity where the friction force begins to grow linearly) characterize
the velocity dependence of the friction force between piston and cylinder.
Instead of using the Stribeck friction model, a simplified friction calculation can be enabled by setting the check mark `relFric`. In this case,
the friction force equals the net force acting on the interface between piston and cylinder multiplied by the parameter `Relative friction factor`.
Regardless of which friction model is used, the friction force is not influenced by the inclination of the cylinder or the system pressure.
The parameter `Relative velocity near to zero` is used by the internal state machine of the cylinder model
and determines the velocity below which the piston is considered stuck.

The pressure in both cylinder chambers can be initialized by assigning start values to `Pressure in chamber A` (bore side) and `Pressure in chamber B` (rod side).
The parameter `Dead volume` determines the size of the parasitic volume which remains even if the piston has reached the mechanical stops at the cylinder ends.

The volumetric losses due to internal and external leakage are parameterized by providing the respective
flow rates (`Internal leakage: volume flow` and `External leakage: volume flow`),
associated pressure drops (`Internal leakage: pressure difference` and `External leakage: pressure difference`)
and the fluid density `Reference density for volume flow and pressure difference` for which these values were obtained.

The fluid properties can be propagated between the two hydraulic ports by setting the parameter `Forward fluid properties` to "true".

## Parameters

Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|

| pistonDiameter | Piston diameter | Scalar | |

| rodDiameter | Rod diameter | Scalar | |

| cylinderLength | Cylinder length | Scalar | |

| rodLength | Rod length | Scalar | |

| angle | Inclination angle | Scalar | |

| deadVolume | Dead volume | Scalar | |

| massPiston | Piston mass | Scalar | |

| massCylinder | Cylinder mass | Scalar |

Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|

| fProp | Velocity dependent friction | Scalar | |

| fCoulomb | Constant friction/Coulomb force | Scalar | |

| fBreakaway | Breakaway friction force | Scalar | |

| vM | Velocity parameter for Stribeck friction | Scalar | |

| relFric | Use "relative friction factor" to calculate friction | Scalar | true |

| relFricFactor | Relative friction factor | Scalar | |

| vSmall | Relative velocity near to zero | Scalar | |

| leakageFlowRateInternal | Internal leakage: volume flow | Scalar | |

| leakagePressureDiffInternal | Internal leakage: pressure difference | Scalar | |

| leakageFlowRateExternal | External leakage: volume flow | Scalar | |

| leakagePressureDiffExternal | External leakage: pressure difference | Scalar | |

| leakageReferenceDensity | Reference density for volume flow and pressure difference | Scalar |

Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|

| forwardFluidProperties | Forward fluid properties between ports | Scalar | true |

Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|

| stroke | stroke | Structure | |

| fixed | Cell of scalars | true | |

| start | Cell of scalars | ||

| relVelocity | relVelocity | Structure | |

| fixed | Cell of scalars | true | |

| start | Cell of scalars | ||

| pA | pA | Structure | |

| fixed | Cell of scalars | true | |

| start | Cell of scalars | ||

| pB | pB | Structure | |

| fixed | Cell of scalars | true | |

| start | Cell of scalars | ||

| strokeOut | strokeOut | Structure | |

| fixed | Cell of scalars | true | |

| start | Cell of scalars |

## Ports

Name | Type | Description | IO Type | Number |
---|---|---|---|---|

| implicit | input | 1 | |

| implicit | output | 1 | |

| implicit | Hydraulic port A | input | 2 |

| implicit | Hydraulic port B | input | 3 |

| implicit | Relative position of piston | output | 2 |