Cylinder
Simple model of a piston in a cylinder
Library
Modelica/Thermal/FluidHeatFlow/Components
Description
This is a simple model of a piston in a cylinder:
The translational flange is connected to the piston, the cylinder has a flowPort at the bottom.
The position of the piston within the cylinder goes from 0 at the bottom to L (length of the cylinder) at the top of the cylinder.If the piston leaves the cylinder, an assertion is triggered.
- A movement of the piston is coupled with volume flow through the flowPort.
- The force at the piston is equal to pressure of the fluid times A (cross section of the piston).
The piston is considered without mass.
Note: Take care of the initial conditions. The position of the piston (relative to the support) should be in the range (0, L).The position of the flange (as well as of the support, if useSupport=true) is influenced by connected components.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_medium | medium | Medium | FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Medium') | |
mo_T0 | T0 | Initial temperature of medium | Scalar | |
mo_T0fixed | T0fixed | Initial temperature guess value or fixed | Scalar | true |
mo_A | A | Cross section of cylinder/piston | Scalar | |
mo_L | L | Length of cylinder | Scalar | |
mo_useSupport | useSupport | = true, if support flange enabled, otherwise implicitly grounded | Number | 0 |
mo_T_port | T_port | T_port | Structure | |
mo_T_port/fixed | fixed | Cell of scalars | true | |
mo_T_port/start | start | Cell of scalars | ||
mo_T | T | T | Structure | |
mo_T/fixed | fixed | Cell of scalars | true | |
mo_T/start | start | Cell of scalars | ||
mo_s | s | s | Structure | |
mo_s/fixed | fixed | Cell of scalars | true | |
mo_s/start | start | Cell of scalars |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo__nmodifiers | Number of Modifiers | Specifies the number of modifiers | Number | |
mo__modifiers | Modifiers | Add new modifier | Structure | |
mo__modifiers/varname | Variable name | Cell of strings | 'h' | |
mo__modifiers/attribute | Attribute | Cell of strings | 'start' | |
mo__modifiers/value | Value |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
flowPort | implicit | output | 1 | |
flange | implicit | Flange of component | output | 2 |
Port 3 | implicit | Support/housing of component | input | mo_useSupport |