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
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Area | A | Area of piston | |
| SI.Length | l_stroke | Stroke length of motion | |
| SI.Volume | V_dead | Dead volume at both ends | |
| Boolean | outputX | false | Enable piston position output |
| Advanced | |||
| ThermofluidStream.Utilities.Units.Inertance | L | dropOfCommons.L | Inertance at inlet and outlet |
| SI.MassFlowRate | m_flow_reg | dropOfCommons.m_flow_reg | Regularization threshold of mass flow rate |
| Initials | |||
| Boolean | initializeX | true | Initialize piston position |
| Medium.AbsolutePressure | p0_left | 1e5 | Left side initial pressure |
| Medium.AbsolutePressure | p0_right | 1e5 | Right side initial pressure |
| SI.Mass | m0_left | 2 | Left side initial mass |
| SI.Mass | m0_right | 2 | Right side initial mass |
| SI.Length | x0 | 0.5 | Initial piston position |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Undirected.Interfaces.Rear | port_left | ||
| Undirected.Interfaces.Rear | port_right | ||
| Modelica.Mechanics.Translational.Interfaces.Flange_a | flange | ||
| Modelica.Blocks.Interfaces.RealOutput | x_out | x | Unitless piston position [] |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium.ThermodynamicState | state_in_left | ||
| Medium.ThermodynamicState | state_in_right | ||
| SI.MassFlowRate | m_flow_left | ||
| SI.MassFlowRate | m_flow_right | ||
| SI.Pressure | r_left_port | ||
| SI.Pressure | r_right_port | ||
| SI.Pressure | r_left_intern | ThermofluidStream.Undirected.Internal.regStep(m_flow_left, medium_left.p - Medium.pressure(state_in_left), 0, m_flow_reg) | |
| SI.Pressure | r_right_intern | ThermofluidStream.Undirected.Internal.regStep(m_flow_right, medium_right.p - Medium.pressure(state_in_right), 0, m_flow_reg) | |
| Medium.EnthalpyFlowRate | H_flow_left | (if noEvent(m_flow_left >= 0) then Medium.specificEnthalpy(state_in_left) else medium_left.h)*m_flow_left | |
| Medium.EnthalpyFlowRate | H_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.Mass | M_left | ||
| SI.Mass | M_right | ||
| Medium.BaseProperties | medium_left | ||
| Medium.BaseProperties | medium_right | ||
| Real | x | ||
| SI.Length | l | x*l_stroke |
Contents
| Name | Description |
|---|---|
| Medium model |