Class CompressorChartAlternativeMapLookupExtrapolate
- All Implemented Interfaces:
Serializable, Cloneable, CompressorChartInterface
- Direct Known Subclasses:
CompressorChartKhader2015, PumpChartAlternativeMapLookupExtrapolate
CompressorChartAlternativeMapLookupExtrapolate class.
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static org.apache.logging.log4j.LoggerLogger object for class.private static final longSerialization version UID.Fields inherited from class CompressorChartAlternativeMapLookup
chartConditions, fanLawCorrectionFunc, gearRatio, isStoneWall, isSurge, reducedHeadFitterFunc, reducedPolytropicEfficiencyFunc, referenceSpeed, refMW, refPressure, refTemperature, refZFields inherited from class CompressorChart
chartSpeeds, chartValues, fanLawCorrectionFitter, flow, flowPolytropicEfficiency, head, maxSpeedCurve, minSpeedCurve, polytropicEfficiency, redflow, redflowPolytropicEfficiency, redhead, redpolytropicEfficiency, reducedFlowFitter, reducedHeadFitter, reducedPolytropicEfficiencyFitter, speed, stoneWallCurve, surgeCurve -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate doubleextrapolateOrInterpolate(double flow, double[] flowData, double[] valueData, org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction spline) Extrapolates or interpolates a value based on the given flow using the provided flow data, value data, and polynomial spline function.private doubleextrapolateOrInterpolateSpeed(double speed, double speed1, double speed2, double value1, double value2) Extrapolates or interpolates a value based on the given speed and two reference speeds with their corresponding values.getClosestRefSpeeds(double speed) getClosestRefSpeeds.doublegetPolytropicEfficiency(double flow, double speed) Get method for polytropic efficiency from reference curves.doublegetPolytropicHead(double flow, double speed) Get method for polytropic head from reference curves.private doublelinearInterpolate(double x, double x1, double x2, double y1, double y2) Performs linear interpolation to estimate the value of y at a given x, based on two known points (x1, y1) and (x2, y2).Methods inherited from class CompressorChartAlternativeMapLookup
addCurve, addCurve, addSurgeCurve, bisect_left, bisect_left, checkStoneWall, checkSurge1, checkSurge2, getChartConditions, getChartValues, getCurveAtRefSpeed, getFlow, getFlows, getGearRatio, getHeads, getHeadUnit, getMaxSpeedCurve, getMinSpeedCurve, getPolytropicEfficiencies, getSpeed, getSpeeds, getSpeedValue, getStoneWallCurve, getSurgeCurve, isUseCompressorChart, main, plot, polytropicEfficiency, prettyPrintChartValues, setCurves, setCurves, setGearRatio, setHeadUnit, setReferenceConditions, setStoneWallCurve, setSurgeCurve, setUseCompressorChart, setUseRealKappa, useRealKappaMethods inherited from class CompressorChart
equals, fitReducedCurve, generateStoneWallCurve, generateSurgeCurve, getDischargeTemperatures, getGamma, getInletPressure, getInletTemperature, getPolytropicExponent, getPowers, getPressureRatios, getReferenceDensity, getStoneWallFlowAtSpeed, getStoneWallHeadAtSpeed, getSurgeFlowAtSpeed, getSurgeHeadAtSpeed, hashCode, setGamma, setInletPressure, setInletTemperature, setMaxSpeedCurve, setMinSpeedCurve, setPolytropicExponent, setReferenceDensityMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CompressorChartInterface
equals, generateStoneWallCurve, generateSurgeCurve, getDischargeTemperatures, getGamma, getInletPressure, getInletStream, getInletTemperature, getOperatingMW, getPolytropicExponent, getPowers, getPressureRatios, getRatioToMaxSpeed, getRatioToMinSpeed, getReferenceDensity, getStoneWallFlowAtSpeed, getStoneWallHeadAtSpeed, getSurgeFlowAtSpeed, getSurgeHeadAtSpeed, hashCode, isHigherThanMaxSpeed, isLowerThanMinSpeed, isSpeedWithinRange, setGamma, setInletPressure, setInletStream, setInletTemperature, setOperatingMW, setPolytropicExponent, setReferenceDensity
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class.
-
-
Constructor Details
-
CompressorChartAlternativeMapLookupExtrapolate
public CompressorChartAlternativeMapLookupExtrapolate()
-
-
Method Details
-
getClosestRefSpeeds
getClosestRefSpeeds.
Retrieves the closest reference speeds to the given speed from the compressor chart values. The method returns a list containing one or two speeds: - If the given speed matches a reference speed, the list contains only that speed. - If the given speed is between two reference speeds, the list contains both speeds. - If the given speed is less than the lowest reference speed, the list contains the lowest reference speed. - If the given speed is greater than the highest reference speed, the list contains the highest reference speed.
- Overrides:
getClosestRefSpeedsin classCompressorChartAlternativeMapLookup- Parameters:
speed- the speed to find the closest reference speeds for- Returns:
- a
ArrayListof the closest reference speeds
-
getPolytropicHead
public double getPolytropicHead(double flow, double speed) Get method for polytropic head from reference curves.This method interpolates the polytropic head values from reference speeds closest to the given speed and averages them to estimate the polytropic head at the specified flow and speed.
Calculates the polytropic head for a given flow and speed by interpolating or extrapolating between reference compressor curves.
- Specified by:
getPolytropicHeadin interfaceCompressorChartInterface- Overrides:
getPolytropicHeadin classCompressorChartAlternativeMapLookup- Parameters:
flow- [m3/h], speed in [rpm].speed- a double- Returns:
- polytropic head in unit [getHeadUnit]
-
getPolytropicEfficiency
public double getPolytropicEfficiency(double flow, double speed) Get method for polytropic efficiency from reference curves.Calculates the polytropic efficiency of the compressor for a given flow and speed. The method interpolates the efficiency values from reference speed curves and averages them to estimate the efficiency at the specified conditions.
Calculates the polytropic efficiency for a given flow and speed by interpolating or extrapolating between reference compressor curves.
- Specified by:
getPolytropicEfficiencyin interfaceCompressorChartInterface- Overrides:
getPolytropicEfficiencyin classCompressorChartAlternativeMapLookup- Parameters:
flow- [m3/h], speed in [rpm].speed- a double- Returns:
- polytropic efficiency [%].
-
extrapolateOrInterpolate
private double extrapolateOrInterpolate(double flow, double[] flowData, double[] valueData, org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction spline) Extrapolates or interpolates a value based on the given flow using the provided flow data, value data, and polynomial spline function.- Parameters:
flow- the flow value for which the corresponding value needs to be determinedflowData- an array of flow data pointsvalueData- an array of value data points corresponding to the flow data pointsspline- a polynomial spline function created from the flow and value data points- Returns:
- the extrapolated or interpolated value corresponding to the given flow
-
extrapolateOrInterpolateSpeed
private double extrapolateOrInterpolateSpeed(double speed, double speed1, double speed2, double value1, double value2) Extrapolates or interpolates a value based on the given speed and two reference speeds with their corresponding values.- Parameters:
speed- the speed at which to extrapolate or interpolate the valuespeed1- the first reference speedspeed2- the second reference speedvalue1- the value corresponding to the first reference speedvalue2- the value corresponding to the second reference speed- Returns:
- the extrapolated or interpolated value at the given speed
-
linearInterpolate
private double linearInterpolate(double x, double x1, double x2, double y1, double y2) Performs linear interpolation to estimate the value of y at a given x, based on two known points (x1, y1) and (x2, y2).- Parameters:
x- the x-value at which to interpolatex1- the x-value of the first known pointx2- the x-value of the second known pointy1- the y-value of the first known pointy2- the y-value of the second known point- Returns:
- the interpolated y-value at the given x
-