# DoubleRodCylinder

## Library

HydraulicsByFluidon/Components/Cylinders

## Description

Model of a double rod cylinder with Stribeck friction and volumetric losses.

The fundamental geometrical properties of the double rod cylinder are the piston and rod diameters (**pistonDiameter**, **rodDiameterA**, **rodDiameterB**) as well as the
lengths of the cylinder and the rod (**cylinderLength** and **rodLength**). By using the parameter **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 | |

| rodDiameterA | Rod diameter @ port A | Scalar | |

| rodDiameterB | Rod diameter @ port B | Scalar | |

| cylinderLength | Cylinder length | Scalar | |

| rodLengthA | Rod length @ port A | Scalar | |

| rodLengthB | Rod length @ port B | 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 | Cylinder flange | input | 1 |

| implicit | Piston flange @ port A | input | 2 |

| implicit | Piston flange @ port B | output | 1 |

| implicit | Hydraulic port A | input | 3 |

| implicit | Hydraulic port B | input | 4 |

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