Cylinder

Simple model of a piston in a cylinder

    Cylinder

Library

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

Cylinder_0

NameLabelDescriptionData TypeValid Values

mo_medium

medium

Medium

FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Medium')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Air_30degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Air_70degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.MineralOil')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Water')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Gylcol20_20degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Gylcol50_20degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Water_10degC')
FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Water_90degC')

mo_T0

T0

Initial temperature of medium

Scalar

mo_T0fixed

T0fixed

Initial temperature guess value or fixed

Scalar

true
false

mo_Exchange

Exchange

Exchange of medium via flowport

Scalar

true
false

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
1

Cylinder_1

NameLabelDescriptionData TypeValid Values

mo_T_port

T_port

T_port

Structure

mo_T_port/fixed

fixed

Cell of scalars

true
false

mo_T_port/start

start

Cell of scalars

mo_T

T

T

Structure

mo_T/fixed

fixed

Cell of scalars

true
false

mo_T/start

start

Cell of scalars

mo_s

s

s

Structure

mo_s/fixed

fixed

Cell of scalars

true
false

mo_s/start

start

Cell of scalars

mo_f

f

f

Structure

mo_f/fixed

fixed

Cell of scalars

true
false

mo_f/start

start

Cell of scalars

Ports

NameTypeDescriptionIO TypeNumber

flowPort

implicit

output

1

flange

implicit

Flange of component

output

2

Port 3

implicit

Support/housing of component

input

mo_useSupport