Compressor with constant isentropic efficiency
Model Description and References
This compressor model takes a set isentropic efficiency, nominal power and RPM, and calculates the change in flow properties from inlet to outlet.The unit does not implement any fluid holdup, but has an adjustable mechanical inertia.J.
Outlet conditions are calculated using the isentropicEnthalpy function of the Medium, which will need to have been implemented: this allows to handle non-ideal gases (e.g. water vapour, ammonia, or any gases at high pressures).
By default, heatport is enabled, which will result in an adiabatic compressor if nothing is connected to it; this is usually the normal case.
If heatport is not enabled, the outlet of the compressor will be set at parameter T, which may simulate e.g. an ideal cooler downstream a compressor, whose duty will be given by lossPower.
Governing Equations
Hin = port_a.m_flow * inStream(port_a.h_outflow);
Hout = port_b.m_flow * port_b.h_outflow;
state_in = Medium.setState_phX(port_a.p, inStream(port_a.h_outflow), inStream(port_a.Xi_outflow));
state_out = Medium.setState_phX(port_b.p, port_b.h_outflow, port_b.Xi_outflow);
m_flow_relax = 1;
port_a.m_flow = m_flow;
port_b.m_flow = -m_flow;
port_a.Xi_outflow = inStream(port_a.Xi_outflow);
port_b.Xi_outflow = port_a.Xi_outflow;
port_a.h_outflow = inStream(port_a.h_outflow);
if noEvent(abs(port_b.m_flow) > eps) then Hin + Hout + sensor.power - lossPower = 0;
else port_b.h_outflow = port_a.h_outflow;
end if;
TheatPort = Medium.temperature(state_out)";
m_flow_relax * der(m_flow) = Hin + sensor.power*eta - m_flow*Medium.isentropicEnthalpy(port_b.p, state_in);
| Quantity | Description |
RPM | Actual rounds per minute |
m_flow | Mass flow through the unit |
Hin | Enthalpy inflow at inlet |
Hout | Enthalpy inflow at outlet (mind the sign) |
m_flow_relax | Relaxation constant for mass flow, time scale << 1 s |
Parameters
| Name | Type | Unit | Default | Description |
allowFlowReversal | Boolean | 1 | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) (inherited) |
useHeatPort | Boolean | 1 | false | = true, if heatPort is enabled (inherited) |
T | Modelica.Units.SI.Temperature | K | 293.15 | Fixed device temperature if useHeatPort = false (inherited) |
eta | Modelica.Units.SI.Efficiency | 1 | 0.8 | Isoentropic efficiency |
P_nom | Modelica.Units.SI.Power | W | 40000 | Nominal compressor power |
RPM_nom | Modelica.Units.SI.AngularVelocity | rad/s | 8377.580409572781 | Nominal rounds per minute |
Interfaces and Connections
| Name | Kind | Type | Unit | Description |
port_a | Connection | Modelica.Fluid.Interfaces.FluidPort_a | Pa; kg/s; J/kg | Fluid connector a (positive design flow direction is from port_a to port_b) |
port_b | Connection | Modelica.Fluid.Interfaces.FluidPort_b | Pa; kg/s; J/kg | Fluid connector b (positive design flow direction is from port_a to port_b) |
heatPort | Connection | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | K; W | Optional port to which dissipated losses are transported in form of heat |
flange_a | Connection | Modelica.Mechanics.Rotational.Interfaces.Flange_a | rad; N.m | Flange of left shaft |
flange_b | Connection | Modelica.Mechanics.Rotational.Interfaces.Flange_b | rad; N.m | Flange of right shaft |