Class SafeSplineStoneWallCurve
java.lang.Object
neqsim.process.equipment.compressor.BoundaryCurve
neqsim.process.equipment.compressor.StoneWallCurve
neqsim.process.equipment.compressor.SafeSplineStoneWallCurve
- All Implemented Interfaces:
Serializable, BoundaryCurveInterface
Spline based representation of the stone wall 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 stone wall (for single-speed compressors).(package private) static org.apache.logging.log4j.Loggerprivate static final longprivate doubleSingle stone wall flow value used when isSinglePoint is true.private doubleSingle stone wall 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.SafeSplineStoneWallCurve(double[] flow, double[] head) Create a spline based stone wall 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 stone wall flow value for single-speed compressors.doubleGet the single stone wall head value for single-speed compressors.double[]Getter for the fieldsortedFlow.double[]Getter for the fieldsortedHead.doublegetStoneWallFlow(double headValue) Get the stone wall flow for a given head.doublegetStoneWallHead(double flowValue) Get head value corresponding to a given flow.booleanCheck if this stone wall curve represents a single-point (for single-speed compressors).booleanisStoneWall(double headValue, double flowValue) Check if the given point is beyond the stone wall limit.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 StoneWallCurve
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 stone wall (for single-speed compressors). When true, stone wall flow is constant regardless of head. -
singleStoneWallFlow
private double singleStoneWallFlowSingle stone wall flow value used when isSinglePoint is true. -
singleStoneWallHead
private double singleStoneWallHeadSingle stone wall head value used when isSinglePoint is true.
-
-
Constructor Details
-
SafeSplineStoneWallCurve
public SafeSplineStoneWallCurve()Default constructor. -
SafeSplineStoneWallCurve
public SafeSplineStoneWallCurve(double[] flow, double[] head) Create a spline based stone wall 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
-
getStoneWallFlow
public double getStoneWallFlow(double headValue) Get the stone wall flow for a given head.Wrapper retaining old API.
- Overrides:
getStoneWallFlowin classStoneWallCurve- Parameters:
headValue- head value- Returns:
- stone wall flow
-
getStoneWallHead
public double getStoneWallHead(double flowValue) Get head value corresponding to a given flow.- Parameters:
flowValue- flow value- Returns:
- corresponding head
-
isStoneWall
public boolean isStoneWall(double headValue, double flowValue) Check if the given point is beyond the stone wall limit.Wrapper retaining old API.
- Overrides:
isStoneWallin classStoneWallCurve- Parameters:
headValue- head valueflowValue- flow value- Returns:
- true if the point is beyond the stone wall limit
-
isSinglePointStoneWall
public boolean isSinglePointStoneWall()Check if this stone wall curve represents a single-point (for single-speed compressors).- Returns:
- true if this is a single-point stone wall curve
-
getSingleStoneWallFlow
public double getSingleStoneWallFlow()Get the single stone wall flow value for single-speed compressors.- Returns:
- the single stone wall flow value, or 0.0 if not a single-point stone wall
-
getSingleStoneWallHead
public double getSingleStoneWallHead()Get the single stone wall head value for single-speed compressors.- Returns:
- the single stone wall head value, or 0.0 if not a single-point stone wall
-