Class OperatingEnvelope
java.lang.Object
neqsim.process.equipment.compressor.OperatingEnvelope
- All Implemented Interfaces:
Serializable
Operating envelope for compressor performance tracking.
This class defines and tracks the safe operating region for a compressor including:
- Surge line - minimum stable flow at each speed
- Stonewall line - maximum flow (choked flow) at each speed
- Speed limits - minimum and maximum operating speeds
- Power limits - driver power constraints
- Head limits - maximum and minimum head at each speed
Envelope Definition
The operating envelope is typically defined by arrays of flow and head values at different speeds. The surge line represents the minimum flow below which the compressor becomes unstable. The stonewall (choke) line represents the maximum flow where the compressor can no longer increase flow regardless of head.
Example Usage
OperatingEnvelope envelope = new OperatingEnvelope(); envelope.setSurgeLine(surgeFlows, surgeHeads, surgeSpeeds); envelope.setStonewallLine(stonewallFlows, stonewallHeads, stonewallSpeeds); envelope.setMinSpeed(7000); envelope.setMaxSpeed(10500); boolean inEnvelope = envelope.isWithinEnvelope(currentFlow, currentHead, currentSpeed); double surgeMargin = envelope.getSurgeMargin(currentFlow, currentHead, currentSpeed);
- Version:
- 1.0
- Author:
- NeqSim Development Team
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleMaximum discharge temperature (Kelvin).private doubleMaximum head (kJ/kg).private doubleMaximum power (kW).private doubleMaximum operating speed (RPM).private doubleMinimum power for stable operation (kW).private doubleMinimum operating speed (RPM).private doubleRated speed (RPM).private static final longSerialization version UID.private double[]Stonewall line flow points (m3/h).private double[]Stonewall line head points (kJ/kg).private double[]Stonewall polynomial coefficients.private double[]Stonewall line speed points (RPM).private double[]Surge line flow points (m3/h).private double[]Surge line head points (kJ/kg).private double[]Surge line polynomial coefficients (head = a0 + a1*Q + a2*Q^2 + ...).private double[]Surge line speed points (RPM).private booleanUse polynomial fit for surge line. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.OperatingEnvelope(double minSpeed, double maxSpeed) Constructor with speed limits. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDistanceToEnvelope(double flow, double head, double speed) Gets the distance to the nearest envelope boundary.getLimitingConstraint(double flow, double head, double speed) Gets the limiting constraint at an operating point.doubleGets the maximum discharge temperature.doubleGets the maximum head.doubleGets the maximum power.doubleGets the maximum speed.doubleGets the minimum power.doubleGets the minimum speed.doubleGets the rated speed.doublegetSpeedMargin(double speed) Gets the speed margin.doublegetStonewallFlowAtHead(double head, double speed) Gets the stonewall flow at a given head and speed.private doublegetStonewallFlowFromPolynomial(double head) Gets stonewall flow from polynomial fit.double[]Gets the stonewall flow array.double[]Gets the stonewall head array.doublegetStonewallMargin(double flow, double head, double speed) Gets the stonewall margin for an operating point.doublegetSurgeFlowAtHead(double head, double speed) Gets the surge flow at a given head and speed.private doublegetSurgeFlowFromPolynomial(double head) Gets surge flow from polynomial fit.double[]Gets the surge flow array.double[]Gets the surge head array.doublegetSurgeMargin(double flow, double head, double speed) Gets the surge margin for an operating point.private doubleinterpolateStonewallFlow(double head) Interpolates stonewall flow from the stonewall curve.private doubleinterpolateSurgeFlow(double head) Interpolates surge flow from the surge curve.booleanisWithinEnvelope(double flow, double head, double speed) Checks if an operating point is within the envelope.voidsetMaxDischargeTemperature(double temp) Sets the maximum discharge temperature.voidsetMaxHead(double head) Sets the maximum head.voidsetMaxPower(double power) Sets the maximum power.voidsetMaxSpeed(double speed) Sets the maximum speed.voidsetMinPower(double power) Sets the minimum power.voidsetMinSpeed(double speed) Sets the minimum speed.voidsetRatedSpeed(double speed) Sets the rated speed.voidsetStonewallLine(double[] flows, double[] heads, double[] speeds) Sets the stonewall line from discrete points.voidsetStonewallLinePolynomial(double[] coefficients) Sets the stonewall line from a polynomial.voidsetSurgeLine(double[] flows, double[] heads, double[] speeds) Sets the surge line from discrete points.voidsetSurgeLinePolynomial(double[] coefficients) Sets the surge line from a polynomial.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
surgeFlows
private double[] surgeFlowsSurge line flow points (m3/h). -
surgeHeads
private double[] surgeHeadsSurge line head points (kJ/kg). -
surgeSpeeds
private double[] surgeSpeedsSurge line speed points (RPM). -
stonewallFlows
private double[] stonewallFlowsStonewall line flow points (m3/h). -
stonewallHeads
private double[] stonewallHeadsStonewall line head points (kJ/kg). -
stonewallSpeeds
private double[] stonewallSpeedsStonewall line speed points (RPM). -
minSpeed
private double minSpeedMinimum operating speed (RPM). -
maxSpeed
private double maxSpeedMaximum operating speed (RPM). -
ratedSpeed
private double ratedSpeedRated speed (RPM). -
maxPower
private double maxPowerMaximum power (kW). -
minPower
private double minPowerMinimum power for stable operation (kW). -
maxHead
private double maxHeadMaximum head (kJ/kg). -
maxDischargeTemperature
private double maxDischargeTemperatureMaximum discharge temperature (Kelvin). -
usePolynomialFit
private boolean usePolynomialFitUse polynomial fit for surge line. -
surgePolynomialCoeffs
private double[] surgePolynomialCoeffsSurge line polynomial coefficients (head = a0 + a1*Q + a2*Q^2 + ...). -
stonewallPolynomialCoeffs
private double[] stonewallPolynomialCoeffsStonewall polynomial coefficients.
-
-
Constructor Details
-
OperatingEnvelope
public OperatingEnvelope()Default constructor. -
OperatingEnvelope
public OperatingEnvelope(double minSpeed, double maxSpeed) Constructor with speed limits.- Parameters:
minSpeed- minimum operating speed in RPMmaxSpeed- maximum operating speed in RPM
-
-
Method Details
-
setSurgeLine
public void setSurgeLine(double[] flows, double[] heads, double[] speeds) Sets the surge line from discrete points.- Parameters:
flows- flow values in m3/hheads- head values in kJ/kgspeeds- speed values in RPM
-
setSurgeLinePolynomial
public void setSurgeLinePolynomial(double[] coefficients) Sets the surge line from a polynomial.Head at surge = a0 + a1*Q + a2*Q^2 + ...
- Parameters:
coefficients- polynomial coefficients
-
setStonewallLine
public void setStonewallLine(double[] flows, double[] heads, double[] speeds) Sets the stonewall line from discrete points.- Parameters:
flows- flow values in m3/hheads- head values in kJ/kgspeeds- speed values in RPM
-
setStonewallLinePolynomial
public void setStonewallLinePolynomial(double[] coefficients) Sets the stonewall line from a polynomial.- Parameters:
coefficients- polynomial coefficients
-
isWithinEnvelope
public boolean isWithinEnvelope(double flow, double head, double speed) Checks if an operating point is within the envelope.- Parameters:
flow- actual flow in m3/hhead- actual head in kJ/kgspeed- actual speed in RPM- Returns:
- true if within envelope
-
getSurgeMargin
public double getSurgeMargin(double flow, double head, double speed) Gets the surge margin for an operating point.Surge margin = (Q_actual - Q_surge) / Q_surge
- Parameters:
flow- actual flow in m3/hhead- actual head in kJ/kgspeed- actual speed in RPM- Returns:
- surge margin as fraction (positive = safe, negative = in surge)
-
getStonewallMargin
public double getStonewallMargin(double flow, double head, double speed) Gets the stonewall margin for an operating point.Stonewall margin = (Q_stonewall - Q_actual) / Q_stonewall
- Parameters:
flow- actual flow in m3/hhead- actual head in kJ/kgspeed- actual speed in RPM- Returns:
- stonewall margin as fraction (positive = safe, negative = choked)
-
getSurgeFlowAtHead
public double getSurgeFlowAtHead(double head, double speed) Gets the surge flow at a given head and speed.- Parameters:
head- polytropic head in kJ/kgspeed- shaft speed in RPM- Returns:
- surge flow in m3/h
-
getStonewallFlowAtHead
public double getStonewallFlowAtHead(double head, double speed) Gets the stonewall flow at a given head and speed.- Parameters:
head- polytropic head in kJ/kgspeed- shaft speed in RPM- Returns:
- stonewall flow in m3/h
-
getDistanceToEnvelope
public double getDistanceToEnvelope(double flow, double head, double speed) Gets the distance to the nearest envelope boundary.- Parameters:
flow- actual flow in m3/hhead- actual head in kJ/kgspeed- actual speed in RPM- Returns:
- distance as fraction (positive = inside, negative = outside)
-
getSpeedMargin
public double getSpeedMargin(double speed) Gets the speed margin.- Parameters:
speed- actual speed in RPM- Returns:
- margin as fraction of operating range
-
getLimitingConstraint
Gets the limiting constraint at an operating point.- Parameters:
flow- actual flow in m3/hhead- actual head in kJ/kgspeed- actual speed in RPM- Returns:
- string describing the limiting constraint, or null if within envelope
-
interpolateSurgeFlow
private double interpolateSurgeFlow(double head) Interpolates surge flow from the surge curve.- Parameters:
head- the polytropic head value- Returns:
- the interpolated surge flow rate
-
interpolateStonewallFlow
private double interpolateStonewallFlow(double head) Interpolates stonewall flow from the stonewall curve.- Parameters:
head- the polytropic head value- Returns:
- the interpolated stonewall flow rate
-
getSurgeFlowFromPolynomial
private double getSurgeFlowFromPolynomial(double head) Gets surge flow from polynomial fit.- Parameters:
head- the polytropic head value- Returns:
- the calculated surge flow from polynomial coefficients
-
getStonewallFlowFromPolynomial
private double getStonewallFlowFromPolynomial(double head) Gets stonewall flow from polynomial fit.- Parameters:
head- the polytropic head value- Returns:
- the calculated stonewall flow from polynomial coefficients
-
getMinSpeed
public double getMinSpeed()Gets the minimum speed.- Returns:
- minimum speed in RPM
-
setMinSpeed
public void setMinSpeed(double speed) Sets the minimum speed.- Parameters:
speed- minimum speed in RPM
-
getMaxSpeed
public double getMaxSpeed()Gets the maximum speed.- Returns:
- maximum speed in RPM
-
setMaxSpeed
public void setMaxSpeed(double speed) Sets the maximum speed.- Parameters:
speed- maximum speed in RPM
-
getRatedSpeed
public double getRatedSpeed()Gets the rated speed.- Returns:
- rated speed in RPM
-
setRatedSpeed
public void setRatedSpeed(double speed) Sets the rated speed.- Parameters:
speed- rated speed in RPM
-
getMaxPower
public double getMaxPower()Gets the maximum power.- Returns:
- max power in kW
-
setMaxPower
public void setMaxPower(double power) Sets the maximum power.- Parameters:
power- max power in kW
-
getMinPower
public double getMinPower()Gets the minimum power.- Returns:
- min power in kW
-
setMinPower
public void setMinPower(double power) Sets the minimum power.- Parameters:
power- min power in kW
-
getMaxHead
public double getMaxHead()Gets the maximum head.- Returns:
- max head in kJ/kg
-
setMaxHead
public void setMaxHead(double head) Sets the maximum head.- Parameters:
head- max head in kJ/kg
-
getMaxDischargeTemperature
public double getMaxDischargeTemperature()Gets the maximum discharge temperature.- Returns:
- max discharge temp in Kelvin
-
setMaxDischargeTemperature
public void setMaxDischargeTemperature(double temp) Sets the maximum discharge temperature.- Parameters:
temp- max discharge temp in Kelvin
-
getSurgeFlows
public double[] getSurgeFlows()Gets the surge flow array.- Returns:
- surge flow array
-
getSurgeHeads
public double[] getSurgeHeads()Gets the surge head array.- Returns:
- surge head array
-
getStonewallFlows
public double[] getStonewallFlows()Gets the stonewall flow array.- Returns:
- stonewall flow array
-
getStonewallHeads
public double[] getStonewallHeads()Gets the stonewall head array.- Returns:
- stonewall head array
-