Class SafeSplineSurgeCurve
java.lang.Object
neqsim.process.equipment.compressor.BoundaryCurve
neqsim.process.equipment.compressor.SurgeCurve
neqsim.process.equipment.compressor.SafeSplineSurgeCurve
- All Implemented Interfaces:
Serializable, BoundaryCurveInterface
Spline based implementation of the surge curve with safe extrapolation.
- Author:
- esol
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.commons.math3.analysis.UnivariateFunctionprivate org.apache.commons.math3.analysis.UnivariateFunctionprivate booleanFlag indicating single-point surge (for single-speed compressors).(package private) static org.apache.logging.log4j.Loggerprivate static final longprivate doubleSingle surge flow value used when isSinglePoint is true.private doubleSingle surge head value used when isSinglePoint is true.private double[]private double[]Fields inherited from class BoundaryCurve
chartConditions, flow, flowFitter, flowFitterFunc, head, isActive -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SafeSplineSurgeCurve(double[] flow, double[] head) Create a spline based surge curve from flow and head arrays. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetFlow(double headValue) Get the flow corresponding to a given head value on the curve.doubleGet the single surge flow value for single-speed compressors.doubleGet the single surge head value for single-speed compressors.double[]Getter for the fieldsortedFlow.double[]Getter for the fieldsortedHead.doublegetSurgeFlow(double headValue) Get the surge flow for a given head.doublegetSurgeHead(double flowValue) Get head value corresponding to a given flow.booleanCheck if this surge curve represents a single-point surge (for single-speed compressors).booleanisSurge(double headValue, double flowValue) Check if the given point is in surge.voidsetCurve(double[] chartConditions, double[] flow, double[] head) Define the curve from arrays of flow and head values with optional chart conditions.Methods inherited from class SurgeCurve
isLimit
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
logger
static org.apache.logging.log4j.Logger logger -
sortedHead
private double[] sortedHead -
sortedFlow
private double[] sortedFlow -
headFromFlow
private transient org.apache.commons.math3.analysis.UnivariateFunction headFromFlow -
flowFromHead
private transient org.apache.commons.math3.analysis.UnivariateFunction flowFromHead -
isSinglePoint
private boolean isSinglePointFlag indicating single-point surge (for single-speed compressors). When true, surge flow is constant regardless of head. -
singleSurgeFlow
private double singleSurgeFlowSingle surge flow value used when isSinglePoint is true. -
singleSurgeHead
private double singleSurgeHeadSingle surge head value used when isSinglePoint is true.
-
-
Constructor Details
-
SafeSplineSurgeCurve
public SafeSplineSurgeCurve()Default constructor. -
SafeSplineSurgeCurve
public SafeSplineSurgeCurve(double[] flow, double[] head) Create a spline based surge curve from flow and head arrays.- Parameters:
flow- array of flow valueshead- array of head values
-
-
Method Details
-
getSortedHead
public double[] getSortedHead()Getter for the field
sortedHead.- Returns:
- an array of
objects
invalid reference
double
-
getSortedFlow
public double[] getSortedFlow()Getter for the field
sortedFlow.- Returns:
- an array of
objects
invalid reference
double
-
setCurve
public void setCurve(double[] chartConditions, double[] flow, double[] head) Define the curve from arrays of flow and head values with optional chart conditions.- Specified by:
setCurvein interfaceBoundaryCurveInterface- Overrides:
setCurvein classBoundaryCurve- Parameters:
chartConditions- conditions for the reference curve, or nullflow- array of flow valueshead- array of head values
-
getFlow
public double getFlow(double headValue) Get the flow corresponding to a given head value on the curve.- Specified by:
getFlowin interfaceBoundaryCurveInterface- Overrides:
getFlowin classBoundaryCurve- Parameters:
headValue- the head value- Returns:
- the corresponding flow
-
getSurgeFlow
public double getSurgeFlow(double headValue) Get the surge flow for a given head.Wrapper retaining old API.
- Overrides:
getSurgeFlowin classSurgeCurve- Parameters:
headValue- head value- Returns:
- surge flow
-
getSurgeHead
public double getSurgeHead(double flowValue) Get head value corresponding to a given flow.- Parameters:
flowValue- flow value- Returns:
- corresponding head
-
isSurge
public boolean isSurge(double headValue, double flowValue) Check if the given point is in surge.Wrapper retaining old API.
- Overrides:
isSurgein classSurgeCurve- Parameters:
headValue- head valueflowValue- flow value- Returns:
- true if the point is in surge
-
isSinglePointSurge
public boolean isSinglePointSurge()Check if this surge curve represents a single-point surge (for single-speed compressors).- Returns:
- true if this is a single-point surge curve
-
getSingleSurgeFlow
public double getSingleSurgeFlow()Get the single surge flow value for single-speed compressors.- Returns:
- the single surge flow value, or 0.0 if not a single-point surge
-
getSingleSurgeHead
public double getSingleSurgeHead()Get the single surge head value for single-speed compressors.- Returns:
- the single surge head value, or 0.0 if not a single-point surge
-