Class PumpChart
- All Implemented Interfaces:
Serializable, Cloneable, PumpChartInterface
This class manages manufacturer pump curves and provides interpolation/extrapolation of pump performance data. It supports:
Performance Curves
- Head vs Flow (H-Q): Pump head at various flow rates
- Efficiency vs Flow (η-Q): Pump efficiency variation
- NPSH vs Flow: Net Positive Suction Head required
Affinity Laws
Performance scaling with speed using reduced variables:
- Reduced flow: Q_red = Q / N
- Reduced head: H_red = H / N²
- NPSH scaling: NPSH ∝ N²
Density Correction
Pump curves are typically measured with water (~998 kg/m³). When pumping different fluids, head is corrected using: H_actual = H_chart × (ρ_chart / ρ_actual)
Set reference density via:
- 5th element of chartConditions array:
[refMW, refT, refP, refZ, refDensity] - Direct setter:
setReferenceDensity(double)
Operating Status
Monitors for abnormal conditions:
- Surge: Low flow instability (dH/dQ > 0)
- Stonewall: Maximum flow limit exceeded
- Low Efficiency: Operating far from BEP
Usage Example
PumpChart chart = new PumpChart();
double[] speed = {1000.0};
double[][] flow = {{10, 20, 30, 40, 50}};
double[][] head = {{120, 115, 108, 98, 85}};
double[][] efficiency = {{65, 75, 82, 80, 72}};
double[] conditions = {18.0, 298.15, 1.0, 1.0, 998.0};
chart.setCurves(conditions, speed, flow, head, efficiency);
chart.setHeadUnit("meter");
// Get performance at operating point
double headAtPoint = chart.getCorrectedHead(35.0, 1200.0, 850.0);
double effAtPoint = chart.getEfficiency(35.0, 1200.0);
String status = chart.getOperatingStatus(35.0, 1200.0);
- Version:
- $Id: $Id
- Author:
- asmund
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate double(package private) double[]private double(package private) double[][](package private) final org.apache.commons.math3.fitting.WeightedObservedPoints(package private) org.apache.commons.math3.analysis.polynomials.PolynomialFunction(package private) double[][](package private) boolean(package private) double[][]private String(package private) booleanprivate double(package private) static org.apache.logging.log4j.LoggerLogger object for class.(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double[][](package private) double[][](package private) double[][](package private) double[][](package private) double[][](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) 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 double(package private) doubleprivate double(package private) double(package private) double(package private) double(package private) doubleprivate static final longSerialization version UID.(package private) double[]private booleanprivate booleanprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCurve(double speed, double[] flow, double[] head, double[] efficiency) This method is used add a curve to the CompressorChart object.voidcalculateViscosityCorrection(double viscosity, double flowBEP, double headBEP, double speed) Calculate viscosity correction factors using the Hydraulic Institute (HI) method.booleancheckStoneWall(double flow, double speed) checkStoneWall.booleancheckSurge1(double flow, double head) checkSurge1.booleancheckSurge2(double flow, double speed) checkSurge2.doubleefficiency(double flow, double speed) efficiency.private voidFit polynomial function to reduced NPSH data.voidfitReducedCurve.doubleGet the best efficiency point (BEP) flow rate.doublegetCorrectedEfficiency(double flow, double speed, double actualViscosity) Get efficiency with viscosity correction applied.doublegetCorrectedHead(double flow, double speed, double actualDensity) Get density-corrected head for a given flow, speed, and actual fluid density.doublegetEfficiency(double flow, double speed) Get method for efficiency from reference curves.doubleGet the current efficiency correction factor (Cη).doubleGet the current flow correction factor (Cq).doublegetFullyCorrectedHead(double flow, double speed, double actualDensity, double actualViscosity) Get head with both viscosity and density corrections applied.doublegetHead(double flow, double speed) Get method for polytropic head from reference curves.doubleGet the current head correction factor (Ch).Get the selected unit of head.doublegetNPSHRequired(double flow, double speed) Get NPSH required at specified flow and speed.getOperatingStatus(double flow, double speed) Check operating status of pump at given flow and speed.doubleGet the reference density used for density correction.doubleGet the reference viscosity.doubleCalculate pump specific speed at best efficiency point.intgetSpeed(double flow, double head) getSpeed.doublegetViscosityCorrectedEfficiency(double efficiencyWater) Get the viscosity-corrected efficiency.doublegetViscosityCorrectedFlow(double flowWater) Get the viscosity-corrected flow rate.doublegetViscosityCorrectedHead(double headWater) Get the viscosity-corrected head.booleanCheck if density correction is enabled.booleanCheck if pump chart has NPSH curve data.booleanChecks if set to use compressor chart for compressor calculations (chart is set for compressor).booleanCheck if viscosity correction is enabled.static voidmain.voidplot()plot.voidsetCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head, double[][] efficiency) This method is used add a set of curves to the CompressorChart object.voidsetHeadUnit(String headUnit) Set unit of head.voidsetNPSHCurve(double[][] npshRequired) Set NPSH (Net Positive Suction Head) required curves for the pump.voidsetReferenceConditions(double refMW, double refTemperature, double refPressure, double refZ) Set method for the reference conditions of the compressor chart.voidsetReferenceDensity(double referenceDensity) Set the reference density for density correction.voidsetReferenceViscosity(double referenceViscosity) Set the reference viscosity for viscosity correction.voidsetUsePumpChart(boolean usePumpChart) Set compressor calculations to use compressor chart.voidsetUseRealKappa(boolean useRealKappa) set method for kappa setting. true = real kappa is used, false = ideal kappa is usedvoidsetUseViscosityCorrection(boolean useViscosityCorrection) Enable or disable viscosity correction.booleanget method for kappa setting. true = real kappa is used, false = ideal kappa is used
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
chartValues
-
isSurge
boolean isSurge -
maxSpeedCurve
double maxSpeedCurve -
minSpeedCurve
double minSpeedCurve -
refMW
double refMW -
headUnit
-
usePumpChart
private boolean usePumpChart -
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 -
reducedEfficiencyFitter
final org.apache.commons.math3.fitting.WeightedObservedPoints reducedEfficiencyFitter -
reducedHeadFitterFunc
org.apache.commons.math3.analysis.polynomials.PolynomialFunction reducedHeadFitterFunc -
reducedEfficiencyFunc
org.apache.commons.math3.analysis.polynomials.PolynomialFunction reducedEfficiencyFunc -
fanLawCorrectionFunc
org.apache.commons.math3.analysis.polynomials.PolynomialFunction fanLawCorrectionFunc -
speed
double[] speed -
flow
double[][] flow -
head
double[][] head -
efficiency
double[][] efficiency -
redflow
double[][] redflow -
redhead
double[][] redhead -
redEfficiency
double[][] redEfficiency -
minFlow
double minFlow -
maxFlow
double maxFlow -
minReducedFlow
double minReducedFlow -
maxReducedFlow
double maxReducedFlow -
npsh
double[][] npsh -
redNPSH
double[][] redNPSH -
reducedNPSHFitter
final org.apache.commons.math3.fitting.WeightedObservedPoints reducedNPSHFitter -
reducedNPSHFunc
org.apache.commons.math3.analysis.polynomials.PolynomialFunction reducedNPSHFunc -
hasNPSHCurve
boolean hasNPSHCurve -
referenceDensity
private double referenceDensity -
referenceViscosity
private double referenceViscosity -
useViscosityCorrection
private boolean useViscosityCorrection -
cQ
private double cQ -
cH
private double cH -
cEta
private double cEta -
lastViscosity
private double lastViscosity
-
-
Constructor Details
-
PumpChart
public PumpChart()Constructor for PumpChart.
-
-
Method Details
-
addCurve
public void addCurve(double speed, double[] flow, double[] head, double[] efficiency) This method is used add a curve to the CompressorChart object.- Specified by:
addCurvein interfacePumpChartInterface- Parameters:
speed- a doubleflow- an array of type doublehead- an array of type doubleefficiency- an array of type double
-
setCurves
public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head, double[][] efficiency) This method is used add a set of curves to the CompressorChart object.- Specified by:
setCurvesin interfacePumpChartInterface- Parameters:
chartConditions- an array of type doublespeed- an array of type doubleflow- an array of type doublehead- an array of type doubleefficiency- an array of type double
-
setNPSHCurve
public void setNPSHCurve(double[][] npshRequired) Set NPSH (Net Positive Suction Head) required curves for the pump.NPSH required is the minimum suction head needed to prevent cavitation. It varies with flow rate and follows affinity laws: NPSH ∝ N² (where N is speed).
The NPSH data should correspond to the same speed and flow points as the performance curves set by setCurves(). If dimensions don't match, an exception is thrown.
- Specified by:
setNPSHCurvein interfacePumpChartInterface- Parameters:
npshRequired- 2D array of NPSH required values [speed index][flow index] in meters- Throws:
IllegalArgumentException- if dimensions don't match flow/speed arrays
-
fitNPSHCurve
private void fitNPSHCurve()Fit polynomial function to reduced NPSH data. -
getNPSHRequired
public double getNPSHRequired(double flow, double speed) Get NPSH required at specified flow and speed.Uses affinity law scaling: NPSH = NPSH_reduced × N²
- Specified by:
getNPSHRequiredin interfacePumpChartInterface- Parameters:
flow- flow rate in m³/hrspeed- pump speed in rpm- Returns:
- NPSH required in meters, or 0.0 if no NPSH curve is available
-
hasNPSHCurve
public boolean hasNPSHCurve()Check if pump chart has NPSH curve data.- Specified by:
hasNPSHCurvein interfacePumpChartInterface- Returns:
- true if NPSH curve is available
-
fitReducedCurve
public void fitReducedCurve()fitReducedCurve.
-
getHead
public double getHead(double flow, double speed) Get method for polytropic head from reference curves.- Specified by:
getHeadin interfacePumpChartInterface- Parameters:
flow- [m3/h], speed in [rpm].speed- a double- Returns:
- polytropic head in unit [getHeadUnit]
-
getEfficiency
public double getEfficiency(double flow, double speed) Get method for efficiency from reference curves.- Specified by:
getEfficiencyin interfacePumpChartInterface- Parameters:
flow- [m3/h], speed in [rpm].speed- a double- Returns:
- efficiency [%].
-
getSpeed
public int getSpeed(double flow, double head) getSpeed.
- Specified by:
getSpeedin interfacePumpChartInterface- Parameters:
flow- a doublehead- a double- Returns:
- a int
-
efficiency
public double efficiency(double flow, double speed) efficiency.
- 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
-
getBestEfficiencyFlowRate
public double getBestEfficiencyFlowRate()Get the best efficiency point (BEP) flow rate.- Specified by:
getBestEfficiencyFlowRatein interfacePumpChartInterface- Returns:
- flow rate at BEP in m³/hr at reference speed
-
getSpecificSpeed
public double getSpecificSpeed()Calculate pump specific speed at best efficiency point.Ns = N·√Q / H^(3/4) where N is in rpm, Q in m³/s, H in m
Used to classify pump type:
- Ns < 1000: Radial flow (centrifugal)
- 1000 < Ns < 4000: Mixed flow
- Ns > 4000: Axial flow
- Specified by:
getSpecificSpeedin interfacePumpChartInterface- Returns:
- specific speed (dimensionless)
-
getOperatingStatus
Check operating status of pump at given flow and speed.- Specified by:
getOperatingStatusin interfacePumpChartInterface- Parameters:
flow- flow rate in m³/hrspeed- pump speed in rpm- Returns:
- operating status string
-
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 interfacePumpChartInterface- Parameters:
refMW- a doublerefTemperature- a doublerefPressure- a doublerefZ- a double
-
main
-
isUsePumpChart
public boolean isUsePumpChart()Checks if set to use compressor chart for compressor calculations (chart is set for compressor).- Specified by:
isUsePumpChartin interfacePumpChartInterface- Returns:
- a boolean
-
setUsePumpChart
public void setUsePumpChart(boolean usePumpChart) Set compressor calculations to use compressor chart.- Specified by:
setUsePumpChartin interfacePumpChartInterface- Parameters:
usePumpChart- a boolean
-
getHeadUnit
Get the selected unit of head.- Specified by:
getHeadUnitin interfacePumpChartInterface- Returns:
- unit of head
-
getReferenceDensity
public double getReferenceDensity()Get the reference density used for density correction.- Specified by:
getReferenceDensityin interfacePumpChartInterface- Returns:
- reference density in kg/m³, or -1.0 if not set
-
setReferenceDensity
public void setReferenceDensity(double referenceDensity) Set the reference density for density correction.Pump curves are typically measured with water at standard conditions (~998 kg/m³). When pumping fluids with different densities, the head must be corrected:
H_actual = H_chart × (ρ_chart / ρ_actual)
- Specified by:
setReferenceDensityin interfacePumpChartInterface- Parameters:
referenceDensity- reference fluid density in kg/m³ (use -1.0 to disable correction)
-
hasDensityCorrection
public boolean hasDensityCorrection()Check if density correction is enabled.- Specified by:
hasDensityCorrectionin interfacePumpChartInterface- Returns:
- true if reference density is set and correction will be applied
-
getCorrectedHead
public double getCorrectedHead(double flow, double speed, double actualDensity) Get density-corrected head for a given flow, speed, and actual fluid density.Applies the correction: H_actual = H_chart × (ρ_chart / ρ_actual)
If no reference density is set, returns the uncorrected head.
- Specified by:
getCorrectedHeadin interfacePumpChartInterface- Parameters:
flow- flow rate in m³/hrspeed- pump speed in rpmactualDensity- actual fluid density in kg/m³- Returns:
- corrected head in the unit specified by getHeadUnit()
-
calculateViscosityCorrection
public void calculateViscosityCorrection(double viscosity, double flowBEP, double headBEP, double speed) Calculate viscosity correction factors using the Hydraulic Institute (HI) method.The HI method provides correction factors for flow, head, and efficiency when pumping viscous fluids. The method is valid for:
- Kinematic viscosity: 4 to 4000 cSt
- Flow rate at BEP: up to ~760 m³/hr
- Head per stage: up to ~180 m
- Single-stage and first-stage of multistage pumps
Reference: ANSI/HI 9.6.7-2021 "Effects of Liquid Viscosity on Rotodynamic Pump Performance"
- Specified by:
calculateViscosityCorrectionin interfacePumpChartInterface- Parameters:
viscosity- kinematic viscosity in cSt (centistokes)flowBEP- flow at best efficiency point in m³/hrheadBEP- head at best efficiency point in metersspeed- pump speed in rpm
-
getViscosityCorrectedFlow
public double getViscosityCorrectedFlow(double flowWater) Get the viscosity-corrected flow rate.Q_viscous = Q_water × Cq
- Parameters:
flowWater- flow rate from water test in m³/hr- Returns:
- corrected flow rate in m³/hr
-
getViscosityCorrectedHead
public double getViscosityCorrectedHead(double headWater) Get the viscosity-corrected head.H_viscous = H_water × Ch
- Parameters:
headWater- head from water test in meters- Returns:
- corrected head in meters
-
getViscosityCorrectedEfficiency
public double getViscosityCorrectedEfficiency(double efficiencyWater) Get the viscosity-corrected efficiency.η_viscous = η_water × Cη
- Parameters:
efficiencyWater- efficiency from water test in percent- Returns:
- corrected efficiency in percent
-
getFullyCorrectedHead
public double getFullyCorrectedHead(double flow, double speed, double actualDensity, double actualViscosity) Get head with both viscosity and density corrections applied.- Specified by:
getFullyCorrectedHeadin interfacePumpChartInterface- Parameters:
flow- flow rate in m³/hrspeed- pump speed in rpmactualDensity- actual fluid density in kg/m³actualViscosity- actual kinematic viscosity in cSt- Returns:
- fully corrected head
-
getCorrectedEfficiency
public double getCorrectedEfficiency(double flow, double speed, double actualViscosity) Get efficiency with viscosity correction applied.- Specified by:
getCorrectedEfficiencyin interfacePumpChartInterface- Parameters:
flow- flow rate in m³/hrspeed- pump speed in rpmactualViscosity- actual kinematic viscosity in cSt- Returns:
- corrected efficiency in percent
-
setReferenceViscosity
public void setReferenceViscosity(double referenceViscosity) Set the reference viscosity for viscosity correction.- Specified by:
setReferenceViscosityin interfacePumpChartInterface- Parameters:
referenceViscosity- reference kinematic viscosity in cSt (typically 1.0 for water)
-
getReferenceViscosity
public double getReferenceViscosity()Get the reference viscosity.- Specified by:
getReferenceViscosityin interfacePumpChartInterface- Returns:
- reference viscosity in cSt
-
setUseViscosityCorrection
public void setUseViscosityCorrection(boolean useViscosityCorrection) Enable or disable viscosity correction.- Specified by:
setUseViscosityCorrectionin interfacePumpChartInterface- Parameters:
useViscosityCorrection- true to enable viscosity correction
-
isUseViscosityCorrection
public boolean isUseViscosityCorrection()Check if viscosity correction is enabled.- Specified by:
isUseViscosityCorrectionin interfacePumpChartInterface- Returns:
- true if viscosity correction is active
-
getFlowCorrectionFactor
public double getFlowCorrectionFactor()Get the current flow correction factor (Cq).- Specified by:
getFlowCorrectionFactorin interfacePumpChartInterface- Returns:
- flow correction factor
-
getHeadCorrectionFactor
public double getHeadCorrectionFactor()Get the current head correction factor (Ch).- Specified by:
getHeadCorrectionFactorin interfacePumpChartInterface- Returns:
- head correction factor
-
getEfficiencyCorrectionFactor
public double getEfficiencyCorrectionFactor()Get the current efficiency correction factor (Cη).- Specified by:
getEfficiencyCorrectionFactorin interfacePumpChartInterface- Returns:
- efficiency correction factor
-
setHeadUnit
Set unit of head.- Specified by:
setHeadUnitin interfacePumpChartInterface- 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 interfacePumpChartInterface- 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 interfacePumpChartInterface- Parameters:
useRealKappa- a boolean
-
plot
-