modelPiston

Piston model with steam on both sides

Information

In a piston a different pressure of fluids perform mechanical linear work.

Depending on push_left, the left (when pushleft is true) side or the right (when pushleft is false) side is connected to the input, and the other side is connected to the output.

x is a nondimensional piston position, 0 being left and 1 being right.

The piston has soft stops and a dead volume at both ends.

Parameters

TypeNameDefaultDescription
SI.AreaAArea of piston
SI.Lengthl_strokeStroke length of motion
SI.VolumeV_deadDead volume at both ends
BooleanoutputXfalseEnable piston position output
Advanced
ThermofluidStream.Utilities.Units.InertanceLdropOfCommons.LInertance at inlet and outlet
SI.MassFlowRatem_flow_regdropOfCommons.m_flow_regRegularization threshold of mass flow rate
Initials
BooleaninitializeXtrueInitialize piston position
Medium.AbsolutePressurep0_left1e5Left side initial pressure
Medium.AbsolutePressurep0_right1e5Right side initial pressure
SI.Massm0_left2Left side initial mass
SI.Massm0_right2Right side initial mass
SI.Lengthx00.5Initial piston position

Connectors

TypeNameDefaultDescription
Undirected.Interfaces.Rearport_left
Undirected.Interfaces.Rearport_right
Modelica.Mechanics.Translational.Interfaces.Flange_aflange
Modelica.Blocks.Interfaces.RealOutputx_outxUnitless piston position []

Components

TypeNameDefaultDescription
Medium.ThermodynamicStatestate_in_left
Medium.ThermodynamicStatestate_in_right
SI.MassFlowRatem_flow_left
SI.MassFlowRatem_flow_right
SI.Pressurer_left_port
SI.Pressurer_right_port
SI.Pressurer_left_internThermofluidStream.Undirected.Internal.regStep(m_flow_left, medium_left.p - Medium.pressure(state_in_left), 0, m_flow_reg)
SI.Pressurer_right_internThermofluidStream.Undirected.Internal.regStep(m_flow_right, medium_right.p - Medium.pressure(state_in_right), 0, m_flow_reg)
Medium.EnthalpyFlowRateH_flow_left(if noEvent(m_flow_left >= 0) then Medium.specificEnthalpy(state_in_left) else medium_left.h)*m_flow_left
Medium.EnthalpyFlowRateH_flow_right(if noEvent(m_flow_right >= 0) then Medium.specificEnthalpy(state_in_right) else medium_right.h)*m_flow_right
SI.MassFlowRate[Medium.nXi]Xi_flow_left(if noEvent(m_flow_left >= 0) then Medium.massFraction(state_in_left) else medium_left.Xi)*m_flow_left
SI.MassFlowRate[Medium.nXi]Xi_flow_right(if noEvent(m_flow_right >= 0) then Medium.massFraction(state_in_right) else medium_right.Xi)*m_flow_left
SI.MassM_left
SI.MassM_right
Medium.BasePropertiesmedium_left
Medium.BasePropertiesmedium_right
Realx
SI.Lengthlx*l_stroke

Contents

NameDescription
MediumMedium model