Class CompressorChart
- All Implemented Interfaces:
Serializable, Cloneable, CompressorChartInterface
- Direct Known Subclasses:
CompressorChartAlternativeMapLookup, CompressorChartMWInterpolation
CompressorChart class.
- Version:
- $Id: $Id
- Author:
- asmund
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) double[](package private) ArrayList<CompressorCurve> private double[][]Calculated discharge temperature curves [speed][points] in Kelvin.(package private) final org.apache.commons.math3.fitting.WeightedObservedPoints(package private) org.apache.commons.math3.analysis.polynomials.PolynomialFunction(package private) double[][](package private) double[][]private doubleHeat capacity ratio (gamma = Cp/Cv) for temperature calculations.(package private) double[][]private Stringprivate doubleInlet pressure in bara for pressure ratio calculations.private doubleInlet temperature in Kelvin for discharge temperature calculations.(package private) boolean(package private) boolean(package private) static org.apache.logging.log4j.LoggerLogger object for class.(package private) double(package private) double(package private) double[][]private doublePolytropic exponent for pressure ratio calculations.private double[][]Calculated power curves [speed][points] in kW.private double[][]Calculated pressure ratio curves [speed][points].(package private) double[][](package private) double[][](package private) double[][](package private) double[][](package private) final org.apache.commons.math3.fitting.WeightedObservedPoints(package private) final org.apache.commons.math3.fitting.WeightedObservedPoints(package private) org.apache.commons.math3.analysis.polynomials.PolynomialFunction(package private) final org.apache.commons.math3.fitting.WeightedObservedPoints(package private) org.apache.commons.math3.analysis.polynomials.PolynomialFunctionprivate doubleReference gas density in kg/m3 for power calculations.(package private) double(package private) double(package private) double(package private) double(package private) doubleprivate static final longSerialization version UID.(package private) double[](package private) StoneWallCurve(package private) SafeSplineSurgeCurveprivate booleanprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCurve(double speed, double[] flow, double[] head, double[] polytropicEfficiency) This method is used add a curve to the CompressorChart object.voidaddCurve(double speed, double[] flow, double[] head, double[] flowPolytropicEfficiency, double[] polytropicEfficiency) This method is used add a curve to the CompressorChart object.voidaddSurgeCurve(double[] flow, double[] head) addSurgeCurve.private voidCalculate discharge temperature curves from pressure ratio and gas properties.private voidCalculate power curves from flow, head, and efficiency.private voidCalculate pressure ratio curves from head and gas properties.booleancheckStoneWall(double flow, double speed) checkStoneWall.booleancheckSurge1(double flow, double head) checkSurge1.booleancheckSurge2(double flow, double speed) checkSurge2.booleanvoidfitReducedCurve.voidgenerateStoneWallCurve.voidGenerates the surge curve by taking the head value at the lowest flow for each speed from the compressor chart values.double[]Get the chart conditions (e.g., reference molecular weight).double[][]Get the discharge temperature values for all compressor curves.doublegetFlow(double head, double speed, double guessFlow) getFlow.double[][]getFlows()Get the flow values for all compressor curves.doublegetGamma()Get the heat capacity ratio.double[][]getHeads()Get the head values for all compressor curves.get the selected unit of head.doubleGet the inlet pressure.doubleGet the inlet temperature.doubleGetter for the fieldmaxSpeedCurve.doubleGetter for the fieldminSpeedCurve.double[][]Get the polytropic efficiency values for all compressor curves.doublegetPolytropicEfficiency(double flow, double speed) Get method for polytropic efficiency from reference curves.doubleGet the polytropic exponent.doublegetPolytropicHead(double flow, double speed) Get method for polytropic head from reference curves.double[][]Get the power values for all compressor curves.double[][]Get the pressure ratio values for all compressor curves.doubleGet the reference density used for calculations.intgetSpeed(double flow, double head) getSpeed.double[]Get the speed values for all compressor curves.doublegetSpeedValue(double flow, double head) Calculate the speed required to achieve a given head at a given flow rate.getStoneWallCurve.doublegetStoneWallFlowAtSpeed(double speed) Get the stone wall flow (maximum flow) at a specific speed.doublegetStoneWallHeadAtSpeed(double speed) Get the stone wall head (polytropic head at maximum flow) at a specific speed.getSurgeCurve.doublegetSurgeFlowAtSpeed(double speed) Get the surge flow (minimum flow) at a specific speed.doublegetSurgeHeadAtSpeed(double speed) Get the surge head (polytropic head at minimum flow) at a specific speed.inthashCode()booleanChecks if set to use compressor chart for compressor calculations (chart is set for compressor).voidplot()plot.doublepolytropicEfficiency(double flow, double speed) polytropicEfficiency.voidsetCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head, double[][] polyEff) This method is used add a set of curves to the CompressorChart object.voidsetCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head, double[][] flowPolyEff, double[][] polyEff) This method is used add a set of curves to the CompressorChart object.voidsetGamma(double gamma) Set the heat capacity ratio (gamma = Cp/Cv) for temperature calculations.voidsetHeadUnit(String headUnit) set unit of head.voidsetInletPressure(double pressure) Set the inlet pressure for pressure ratio calculations.voidsetInletTemperature(double temperature) Set the inlet temperature for discharge temperature calculations.voidsetMaxSpeedCurve(double maxSpeedCurve) Setter for the fieldmaxSpeedCurve.voidsetMinSpeedCurve(double minSpeedCurve) Setter for the fieldminSpeedCurve.voidsetPolytropicExponent(double exponent) Set the polytropic exponent for pressure ratio calculations.voidsetReferenceConditions(double refMW, double refTemperature, double refPressure, double refZ) Set method for the reference conditions of the compressor chart.voidsetReferenceDensity(double density) Set the reference density for power and pressure ratio calculations.voidsetStoneWallCurve(StoneWallCurve stoneWallCurve) setStoneWallCurve.voidsetSurgeCurve(SafeSplineSurgeCurve surgeCurve) setSurgeCurve.voidsetUseCompressorChart(boolean useCompressorChart) Set compressor calculations to use compressor chart.voidsetUseRealKappa(boolean useRealKappa) set method for kappa setting. true = real kappa is used, false = ideal kappa is usedbooleanget method for kappa setting. true = real kappa is used, false = ideal kappa is usedMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CompressorChartInterface
getInletStream, getOperatingMW, getRatioToMaxSpeed, getRatioToMinSpeed, isHigherThanMaxSpeed, isLowerThanMinSpeed, isSpeedWithinRange, setInletStream, setOperatingMW
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
referenceDensity
private double referenceDensityReference gas density in kg/m3 for power calculations. -
inletPressure
private double inletPressureInlet pressure in bara for pressure ratio calculations. -
polytropicExponent
private double polytropicExponentPolytropic exponent for pressure ratio calculations. -
inletTemperature
private double inletTemperatureInlet temperature in Kelvin for discharge temperature calculations. -
gamma
private double gammaHeat capacity ratio (gamma = Cp/Cv) for temperature calculations. -
powerCurves
private double[][] powerCurvesCalculated power curves [speed][points] in kW. -
pressureRatioCurves
private double[][] pressureRatioCurvesCalculated pressure ratio curves [speed][points]. -
dischargeTemperatureCurves
private double[][] dischargeTemperatureCurvesCalculated discharge temperature curves [speed][points] in Kelvin. -
chartValues
ArrayList<CompressorCurve> chartValues -
chartSpeeds
-
surgeCurve
SafeSplineSurgeCurve surgeCurve -
stoneWallCurve
StoneWallCurve stoneWallCurve -
isSurge
boolean isSurge -
maxSpeedCurve
double maxSpeedCurve -
minSpeedCurve
double minSpeedCurve -
isStoneWall
boolean isStoneWall -
refMW
double refMW -
headUnit
-
useCompressorChart
private boolean useCompressorChart -
refTemperature
double refTemperature -
refPressure
double refPressure -
referenceSpeed
double referenceSpeed -
refZ
double refZ -
useRealKappa
private boolean useRealKappa -
chartConditions
double[] chartConditions -
reducedHeadFitter
final org.apache.commons.math3.fitting.WeightedObservedPoints reducedHeadFitter -
reducedFlowFitter
final org.apache.commons.math3.fitting.WeightedObservedPoints reducedFlowFitter -
fanLawCorrectionFitter
final org.apache.commons.math3.fitting.WeightedObservedPoints fanLawCorrectionFitter -
reducedPolytropicEfficiencyFitter
final org.apache.commons.math3.fitting.WeightedObservedPoints reducedPolytropicEfficiencyFitter -
reducedHeadFitterFunc
org.apache.commons.math3.analysis.polynomials.PolynomialFunction reducedHeadFitterFunc -
reducedPolytropicEfficiencyFunc
org.apache.commons.math3.analysis.polynomials.PolynomialFunction reducedPolytropicEfficiencyFunc -
fanLawCorrectionFunc
org.apache.commons.math3.analysis.polynomials.PolynomialFunction fanLawCorrectionFunc -
speed
double[] speed -
flow
double[][] flow -
flowPolytropicEfficiency
double[][] flowPolytropicEfficiency -
head
double[][] head -
polytropicEfficiency
double[][] polytropicEfficiency -
redflow
double[][] redflow -
redflowPolytropicEfficiency
double[][] redflowPolytropicEfficiency -
redhead
double[][] redhead -
redpolytropicEfficiency
double[][] redpolytropicEfficiency
-
-
Constructor Details
-
CompressorChart
public CompressorChart()Constructor for CompressorChart.
-
-
Method Details
-
generateSurgeCurve
public void generateSurgeCurve()Generates the surge curve by taking the head value at the lowest flow for each speed from the compressor chart values.- Specified by:
generateSurgeCurvein interfaceCompressorChartInterface
-
generateStoneWallCurve
public void generateStoneWallCurve()generateStoneWallCurve.
Generates the stone wall curve by taking the head value at the highest flow for each speed from the compressor chart values.
- Specified by:
generateStoneWallCurvein interfaceCompressorChartInterface
-
addCurve
public void addCurve(double speed, double[] flow, double[] head, double[] polytropicEfficiency) This method is used add a curve to the CompressorChart object.- Specified by:
addCurvein interfaceCompressorChartInterface- Parameters:
speed- a doubleflow- an array of type doublehead- an array of type doublepolytropicEfficiency- an array of type double
-
addCurve
public void addCurve(double speed, double[] flow, double[] head, double[] flowPolytropicEfficiency, double[] polytropicEfficiency) This method is used add a curve to the CompressorChart object.- Specified by:
addCurvein interfaceCompressorChartInterface- Parameters:
speed- a doubleflow- an array of type doublehead- an array of type doubleflowPolytropicEfficiency- an array of type doublepolytropicEfficiency- an array of type double
-
setCurves
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head, double[][] polyEff) This method is used add a set of curves to the CompressorChart object.This method initializes the compressor performance curves, including speed, flow, head, and polytropic efficiency.
The method takes chart conditions and initializes internal variables for different performance parameters based on input arrays for speed, flow, head, and polytropic efficiency. It also normalizes these parameters by calculating reduced values based on speed.
- Specified by:
setCurvesin interfaceCompressorChartInterface- Parameters:
chartConditions- an array of type doublespeed- an array of type doubleflow- an array of type doublehead- an array of type doublepolyEff- an array of type double
-
setCurves
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head, double[][] flowPolyEff, double[][] polyEff) This method is used add a set of curves to the CompressorChart object.This method initializes the compressor performance curves, including speed, flow, head, and polytropic efficiency.
The method takes chart conditions and initializes internal variables for different performance parameters based on input arrays for speed, flow, head, and polytropic efficiency. It also normalizes these parameters by calculating reduced values based on speed.
- Specified by:
setCurvesin interfaceCompressorChartInterface- Parameters:
chartConditions- an array of type doublespeed- an array of type doubleflow- an array of type doublehead- an array of type doubleflowPolyEff- an array of type doublepolyEff- an array of type double
-
fitReducedCurve
public void fitReducedCurve()fitReducedCurve.
-
getPolytropicHead
public double getPolytropicHead(double flow, double speed) Get method for polytropic head from reference curves.- Specified by:
getPolytropicHeadin interfaceCompressorChartInterface- 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.- Specified by:
getPolytropicEfficiencyin interfaceCompressorChartInterface- Parameters:
flow- [m3/h], speed in [rpm].speed- a double- Returns:
- polytropic efficiency [%].
-
getSpeed
public int getSpeed(double flow, double head) getSpeed.
- Specified by:
getSpeedin interfaceCompressorChartInterface- Parameters:
flow- a doublehead- a double- Returns:
- a int
-
getSpeedValue
public double getSpeedValue(double flow, double head) Calculate the speed required to achieve a given head at a given flow rate.This method uses fan law relationships: Head ∝ Speed². The algorithm uses a robust Newton-Raphson method with:
- Fan-law based initial guess for fast convergence
- Bounds protection to prevent divergence
- Damped updates for stability
- Bisection fallback if Newton-Raphson fails
The method works both within and outside the defined speed curve range by using the underlying fan law extrapolation of the compressor map.
- Specified by:
getSpeedValuein interfaceCompressorChartInterface- Parameters:
flow- the volumetric flow rate in m³/hrhead- the required polytropic head in the chart's head unit (kJ/kg or meter)- Returns:
- the calculated speed in RPM (as double for precision)
-
getFlow
public double getFlow(double head, double speed, double guessFlow) getFlow.
- Specified by:
getFlowin interfaceCompressorChartInterface- Parameters:
head- a doublespeed- a doubleguessFlow- a double- Returns:
- a double
-
addSurgeCurve
public void addSurgeCurve(double[] flow, double[] head) addSurgeCurve.
- Parameters:
flow- an array of type doublehead- an array of type double
-
polytropicEfficiency
public double polytropicEfficiency(double flow, double speed) polytropicEfficiency.
- Parameters:
flow- a doublespeed- a double- Returns:
- a double
-
checkSurge1
public boolean checkSurge1(double flow, double head) checkSurge1.
- Parameters:
flow- a doublehead- a double- Returns:
- a boolean
-
checkSurge2
public boolean checkSurge2(double flow, double speed) checkSurge2.
- Parameters:
flow- a doublespeed- a double- Returns:
- a boolean
-
checkStoneWall
public boolean checkStoneWall(double flow, double speed) checkStoneWall.
- Parameters:
flow- a doublespeed- a double- Returns:
- a boolean
-
setReferenceConditions
public void setReferenceConditions(double refMW, double refTemperature, double refPressure, double refZ) Set method for the reference conditions of the compressor chart.- Specified by:
setReferenceConditionsin interfaceCompressorChartInterface- Parameters:
refMW- a doublerefTemperature- a doublerefPressure- a doublerefZ- a double
-
getSurgeCurve
getSurgeCurve.
- Specified by:
getSurgeCurvein interfaceCompressorChartInterface- Returns:
- a
SafeSplineSurgeCurveobject
-
setSurgeCurve
setSurgeCurve.
- Specified by:
setSurgeCurvein interfaceCompressorChartInterface- Parameters:
surgeCurve- aSafeSplineSurgeCurveobject
-
getStoneWallCurve
getStoneWallCurve.
- Specified by:
getStoneWallCurvein interfaceCompressorChartInterface- Returns:
- a
StoneWallCurveobject
-
setStoneWallCurve
setStoneWallCurve.
- Specified by:
setStoneWallCurvein interfaceCompressorChartInterface- Parameters:
stoneWallCurve- aStoneWallCurveobject
-
isUseCompressorChart
public boolean isUseCompressorChart()Checks if set to use compressor chart for compressor calculations (chart is set for compressor).- Specified by:
isUseCompressorChartin interfaceCompressorChartInterface- Returns:
- a boolean
-
setUseCompressorChart
public void setUseCompressorChart(boolean useCompressorChart) Set compressor calculations to use compressor chart.- Specified by:
setUseCompressorChartin interfaceCompressorChartInterface- Parameters:
useCompressorChart- a boolean
-
getHeadUnit
get the selected unit of head.- Specified by:
getHeadUnitin interfaceCompressorChartInterface- Returns:
- unit of head
-
setHeadUnit
set unit of head.- Specified by:
setHeadUnitin interfaceCompressorChartInterface- Parameters:
headUnit- aStringobject
-
useRealKappa
public boolean useRealKappa()get method for kappa setting. true = real kappa is used, false = ideal kappa is used- Specified by:
useRealKappain interfaceCompressorChartInterface- Returns:
- true/false flag
-
setUseRealKappa
public void setUseRealKappa(boolean useRealKappa) set method for kappa setting. true = real kappa is used, false = ideal kappa is used- Specified by:
setUseRealKappain interfaceCompressorChartInterface- Parameters:
useRealKappa- a boolean
-
plot
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCompressorChartInterface- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCompressorChartInterface- Overrides:
equalsin classObject
-
getMaxSpeedCurve
public double getMaxSpeedCurve()Getter for the field
maxSpeedCurve.- Specified by:
getMaxSpeedCurvein interfaceCompressorChartInterface- Returns:
- a double
-
setMaxSpeedCurve
public void setMaxSpeedCurve(double maxSpeedCurve) Setter for the field
maxSpeedCurve.- Parameters:
maxSpeedCurve- a double
-
getMinSpeedCurve
public double getMinSpeedCurve()Getter for the field
minSpeedCurve.- Specified by:
getMinSpeedCurvein interfaceCompressorChartInterface- Returns:
- the minimum speed curve value in RPM
-
setMinSpeedCurve
public void setMinSpeedCurve(double minSpeedCurve) Setter for the field
minSpeedCurve.- Parameters:
minSpeedCurve- a double
-
getSurgeFlowAtSpeed
public double getSurgeFlowAtSpeed(double speed) Get the surge flow (minimum flow) at a specific speed.
This method finds the compressor curve closest to the specified speed and returns the minimum flow on that curve. This is useful for single speed compressors where the surge curve is not active, as well as for multi-speed compressors to get the surge point at a specific speed.
- Specified by:
getSurgeFlowAtSpeedin interfaceCompressorChartInterface- Parameters:
speed- The compressor speed in RPM- Returns:
- The surge flow (minimum flow) at the specified speed in m3/hr, or Double.NaN if no curves exist
-
getSurgeHeadAtSpeed
public double getSurgeHeadAtSpeed(double speed) Get the surge head (polytropic head at minimum flow) at a specific speed.
This method finds the compressor curve closest to the specified speed and returns the polytropic head at the minimum flow point (surge point) on that curve.
- Specified by:
getSurgeHeadAtSpeedin interfaceCompressorChartInterface- Parameters:
speed- The compressor speed in RPM- Returns:
- The surge head at the specified speed in kJ/kg or meter (depending on headUnit), or Double.NaN if no curves exist
-
getStoneWallFlowAtSpeed
public double getStoneWallFlowAtSpeed(double speed) Get the stone wall flow (maximum flow) at a specific speed.
This method finds the compressor curve closest to the specified speed and returns the maximum flow on that curve (choke limit). This is useful for single speed compressors where the stone wall curve is not active.
- Specified by:
getStoneWallFlowAtSpeedin interfaceCompressorChartInterface- Parameters:
speed- The compressor speed in RPM- Returns:
- The stone wall flow (maximum flow) at the specified speed in m3/hr, or Double.NaN if no curves exist
-
getStoneWallHeadAtSpeed
public double getStoneWallHeadAtSpeed(double speed) Get the stone wall head (polytropic head at maximum flow) at a specific speed.
This method finds the compressor curve closest to the specified speed and returns the polytropic head at the maximum flow point (choke limit) on that curve.
- Specified by:
getStoneWallHeadAtSpeedin interfaceCompressorChartInterface- Parameters:
speed- The compressor speed in RPM- Returns:
- The stone wall head at the specified speed in kJ/kg or meter (depending on headUnit), or Double.NaN if no curves exist
-
getSpeeds
public double[] getSpeeds()Get the speed values for all compressor curves.- Specified by:
getSpeedsin interfaceCompressorChartInterface- Returns:
- an array of speed values in RPM, or null if not set
-
getFlows
public double[][] getFlows()Get the flow values for all compressor curves.- Specified by:
getFlowsin interfaceCompressorChartInterface- Returns:
- a 2D array where each row corresponds to a speed and contains flow values in m3/hr, or null if not set
-
getHeads
public double[][] getHeads()Get the head values for all compressor curves.- Specified by:
getHeadsin interfaceCompressorChartInterface- Returns:
- a 2D array where each row corresponds to a speed and contains head values in the unit specified by getHeadUnit(), or null if not set
-
getPolytropicEfficiencies
public double[][] getPolytropicEfficiencies()Get the polytropic efficiency values for all compressor curves.- Specified by:
getPolytropicEfficienciesin interfaceCompressorChartInterface- Returns:
- a 2D array where each row corresponds to a speed and contains polytropic efficiency values in %, or null if not set
-
getChartConditions
public double[] getChartConditions()Get the chart conditions (e.g., reference molecular weight).- Specified by:
getChartConditionsin interfaceCompressorChartInterface- Returns:
- an array of chart condition values, or null if not set
-
setReferenceDensity
public void setReferenceDensity(double density) Set the reference density for power and pressure ratio calculations.- Specified by:
setReferenceDensityin interfaceCompressorChartInterface- Parameters:
density- the reference gas density in kg/m3
-
getReferenceDensity
public double getReferenceDensity()Get the reference density used for calculations.- Specified by:
getReferenceDensityin interfaceCompressorChartInterface- Returns:
- the reference density in kg/m3, or NaN if not set
-
setInletPressure
public void setInletPressure(double pressure) Set the inlet pressure for pressure ratio calculations.- Specified by:
setInletPressurein interfaceCompressorChartInterface- Parameters:
pressure- the inlet pressure in bara
-
getInletPressure
public double getInletPressure()Get the inlet pressure.- Specified by:
getInletPressurein interfaceCompressorChartInterface- Returns:
- the inlet pressure in bara, or NaN if not set
-
setPolytropicExponent
public void setPolytropicExponent(double exponent) Set the polytropic exponent for pressure ratio calculations.- Specified by:
setPolytropicExponentin interfaceCompressorChartInterface- Parameters:
exponent- the polytropic exponent (n)
-
getPolytropicExponent
public double getPolytropicExponent()Get the polytropic exponent.- Specified by:
getPolytropicExponentin interfaceCompressorChartInterface- Returns:
- the polytropic exponent, or NaN if not set
-
getPowers
public double[][] getPowers()Get the power values for all compressor curves.Power is calculated from: P = mass_flow * head / efficiency. This curve is critical for driver selection and energy analysis.
- Specified by:
getPowersin interfaceCompressorChartInterface- Returns:
- a 2D array where each row corresponds to a speed and contains power values in kW, or null if not available
-
getPressureRatios
public double[][] getPressureRatios()Get the pressure ratio values for all compressor curves.Pressure ratio is calculated from polytropic head and gas properties. Useful for process design and control system configuration.
- Specified by:
getPressureRatiosin interfaceCompressorChartInterface- Returns:
- a 2D array where each row corresponds to a speed and contains pressure ratio values (dimensionless), or null if not available
-
calculatePowerCurves
private void calculatePowerCurves()Calculate power curves from flow, head, and efficiency.Power is calculated as: P = (density * volumeFlow * head) / efficiency where volumeFlow is in m3/hr, head is in kJ/kg (or converted from meters), and efficiency is in fraction (0-1).
-
calculatePressureRatioCurves
private void calculatePressureRatioCurves()Calculate pressure ratio curves from head and gas properties.Pressure ratio is calculated from polytropic head using: PR = [1 + (n-1)/n * H / (Z*R*T/MW)]^(n/(n-1)) Simplified: PR = exp(n/(n-1) * ln(1 + (n-1)/n * H * MW / (Z*R*T)))
-
setInletTemperature
public void setInletTemperature(double temperature) Set the inlet temperature for discharge temperature calculations.- Specified by:
setInletTemperaturein interfaceCompressorChartInterface- Parameters:
temperature- the inlet temperature in Kelvin
-
getInletTemperature
public double getInletTemperature()Get the inlet temperature.- Specified by:
getInletTemperaturein interfaceCompressorChartInterface- Returns:
- the inlet temperature in Kelvin, or NaN if not set
-
setGamma
public void setGamma(double gamma) Set the heat capacity ratio (gamma = Cp/Cv) for temperature calculations.- Specified by:
setGammain interfaceCompressorChartInterface- Parameters:
gamma- the heat capacity ratio (typically 1.2-1.4 for gases)
-
getGamma
public double getGamma()Get the heat capacity ratio.- Specified by:
getGammain interfaceCompressorChartInterface- Returns:
- the heat capacity ratio, or NaN if not set
-
getDischargeTemperatures
public double[][] getDischargeTemperatures()Get the discharge temperature values for all compressor curves.Discharge temperature is calculated from inlet temperature, pressure ratio, and polytropic efficiency using: T2 = T1 * PR^((n-1)/n) where n is related to efficiency and heat capacity ratio. This is important for downstream equipment design and material temperature limits.
- Specified by:
getDischargeTemperaturesin interfaceCompressorChartInterface- Returns:
- a 2D array where each row corresponds to a speed and contains discharge temperature values in Kelvin, or null if not available
-
calculateDischargeTemperatureCurves
private void calculateDischargeTemperatureCurves()Calculate discharge temperature curves from pressure ratio and gas properties.Discharge temperature is calculated using the polytropic process relation: T2 = T1 * PR^((n-1)/n) where PR is pressure ratio and n is polytropic exponent related to efficiency: (n-1)/n = (gamma-1)/gamma / eta_polytropic
This is critical for:
- Downstream equipment design
- Material temperature limits
- Intercooler requirements
-