VirtualFCS.Fluid.Compressor

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);
QuantityDescription
RPMActual rounds per minute
m_flowMass flow through the unit
HinEnthalpy inflow at inlet
HoutEnthalpy inflow at outlet (mind the sign)
m_flow_relaxRelaxation constant for mass flow, time scale << 1 s

Parameters

NameTypeUnitDefaultDescription
allowFlowReversalBoolean1system.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b) (inherited)
useHeatPortBoolean1false= true, if heatPort is enabled (inherited)
TModelica.Units.SI.TemperatureK293.15Fixed device temperature if useHeatPort = false (inherited)
etaModelica.Units.SI.Efficiency10.8Isoentropic efficiency
P_nomModelica.Units.SI.PowerW40000Nominal compressor power
RPM_nomModelica.Units.SI.AngularVelocityrad/s8377.580409572781Nominal rounds per minute

Interfaces and Connections

NameKindTypeUnitDescription
port_aConnectionModelica.Fluid.Interfaces.FluidPort_aPa; kg/s; J/kgFluid connector a (positive design flow direction is from port_a to port_b)
port_bConnectionModelica.Fluid.Interfaces.FluidPort_bPa; kg/s; J/kgFluid connector b (positive design flow direction is from port_a to port_b)
heatPortConnectionModelica.Thermal.HeatTransfer.Interfaces.HeatPort_aK; WOptional port to which dissipated losses are transported in form of heat
flange_aConnectionModelica.Mechanics.Rotational.Interfaces.Flange_arad; N.mFlange of left shaft
flange_bConnectionModelica.Mechanics.Rotational.Interfaces.Flange_brad; N.mFlange of right shaft