modelCylinder

Simple model of a piston in a cylinder

Extends from FluidHeatFlow.BaseClasses.SinglePortLeft (Partial model of a single port at the left), Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one translational 1-dim. shaft flange and a support used for textual modeling, i.e., for elementary models).

Information

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

TypeNameDefaultDescription
FluidHeatFlow.Media.Mediummedium (from SinglePortLeft)FluidHeatFlow.Media.Medium()Medium
SI.TemperatureT0 (from SinglePortLeft)Initial temperature of medium
BooleanT0fixed (from SinglePortLeft)falseInitial temperature guess value or fixed
SI.AreaACross section of cylinder/piston
SI.LengthLLength of cylinder
BooleanuseSupport (from PartialElementaryOneFlangeAndSupport2)false= true, if support flange enabled, otherwise implicitly grounded

Connectors

TypeNameDefaultDescription
Interfaces.FlowPort_aflowPort (from SinglePortLeft)
Flange_bflange (from PartialElementaryOneFlangeAndSupport2)Flange of component
Supportsupport (from PartialElementaryOneFlangeAndSupport2)Support/housing of component

Components

TypeNameDefaultDescription
SI.TemperatureT_port (from SinglePortLeft)Temperature at flowPort_a
SI.TemperatureT (from SinglePortLeft)Outlet temperature of medium
SI.Lengths (from PartialElementaryOneFlangeAndSupport2)Distance between flange and support (= flange.s - support.s)
SI.Forcefflange.fForce at piston