Class CompressorCurveTemplate
- All Implemented Interfaces:
Serializable
This class stores compressor curves in a normalized (reduced) form that can be scaled to match any compressor's operating conditions using fan laws. The curves are normalized relative to a reference speed, so:
- Reduced flow = flow / speed
- Reduced head = head / speed²
- Efficiency remains unchanged (approximately independent of speed)
12 predefined templates are available in three categories:
Basic Centrifugal (3):
CENTRIFUGAL_STANDARD- Standard multi-stage, ~78% peak efficiencyCENTRIFUGAL_HIGH_FLOW- Wide flow range, flatter head curveCENTRIFUGAL_HIGH_HEAD- High head, narrower operating range
Application-Based (6):
PIPELINE- Gas transmission, high capacity, ~85% efficiencyEXPORT- Offshore gas export, high pressure, stable operationINJECTION- Gas injection/EOR, very high pressure ratioGAS_LIFT- Artificial lift, wide surge margin, robust designREFRIGERATION- LNG/process cooling, wide operating rangeBOOSTER- Process plant pressure boosting, balanced design
Compressor Type (4):
SINGLE_STAGE- Low pressure ratio (1.5-2.5), simple designMULTISTAGE_INLINE- High pressure ratio (5-15), barrel typeINTEGRALLY_GEARED- Flexible staging, ~82% efficiency, air separationOVERHUNG- Cantilever design, simple maintenance
Usage Example:
// Get template by name (flexible naming)
CompressorCurveTemplate template = CompressorCurveTemplate.getTemplate("pipeline");
// Scale to design point
CompressorChartInterface chart = template.scaleToDesignPoint(10000, // designSpeed (RPM)
5000, // designFlow (m³/hr)
85.0, // designHead (kJ/kg)
5 // numberOfSpeeds
);
// Or use with CompressorChartGenerator
CompressorChartGenerator generator = new CompressorChartGenerator(compressor);
CompressorChartInterface chart = generator.generateFromTemplate("EXPORT", 5);
// List available templates
String[] all = CompressorCurveTemplate.getAvailableTemplates();
String[] apps = CompressorCurveTemplate.getTemplatesByCategory("application");
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CompressorCurveTemplateBooster compressor template.static final CompressorCurveTemplateHigh flow centrifugal compressor template.static final CompressorCurveTemplateHigh head centrifugal compressor template.static final CompressorCurveTemplateStandard centrifugal compressor template.static final CompressorCurveTemplateExport compressor template.static final CompressorCurveTemplateGas lift compressor template.static final CompressorCurveTemplateInjection compressor template.static final CompressorCurveTemplateIntegrally geared compressor template.static final CompressorCurveTemplateMultistage inline (barrel) compressor template.private final StringName/identifier for this template.static final CompressorCurveTemplateOverhung impeller compressor template.static final CompressorCurveTemplatePipeline compressor template.private final double[][]Polytropic efficiency values (%) for each curve.private final double[][]Reduced flow values (flow/speed) for each curve.private final double[][]Reduced head values (head/speed²) for each curve.private final doubleReference speed used for normalization (RPM).static final CompressorCurveTemplateRefrigeration compressor template.private static final longstatic final CompressorCurveTemplateSingle-stage centrifugal compressor template.private final double[]Speed values for each curve (RPM). -
Constructor Summary
ConstructorsConstructorDescriptionCompressorCurveTemplate(String name, double referenceSpeed, double[] speeds, double[][] flows, double[][] heads, double[][] efficiencies) Constructor for CompressorCurveTemplate. -
Method Summary
Modifier and TypeMethodDescriptionprivate static CompressorCurveTemplateCreate the booster compressor template.private static CompressorCurveTemplateCreate the high flow centrifugal compressor template.private static CompressorCurveTemplateCreate the high head centrifugal compressor template.private static CompressorCurveTemplateCreate the standard centrifugal compressor template.(package private) static CompressorChartInterfacecreateChart(String chartType) Create a chart instance of the specified type.private static CompressorCurveTemplateCreate the export compressor template.private static CompressorCurveTemplateCreate the gas lift compressor template.private static CompressorCurveTemplateCreate the injection compressor template.private static CompressorCurveTemplateCreate the integrally geared compressor template.private static CompressorCurveTemplateCreate the multistage inline (barrel) compressor template.private static CompressorCurveTemplateCreate the overhung impeller compressor template.private static CompressorCurveTemplateCreate the pipeline compressor template.private static CompressorCurveTemplateCreate the refrigeration compressor template.private static CompressorCurveTemplateCreate the single-stage compressor template.private intfindClosestSpeedIndex(double targetRatio) Find the index of the template curve closest to the specified speed ratio.static String[]Get all available template names.getName()Get the template name.intGet the number of speed curves in this template.Get the original (unscaled) compressor chart from this template.getOriginalChart(String chartType) Get the original (unscaled) compressor chart from this template with specified chart type.doubleGet the reference speed used for normalization.double[]Get the speed ratios (speed/referenceSpeed) for all curves.double[]Get the original speeds from the template.static CompressorCurveTemplategetTemplate(String templateName) Get a template by name.static String[]getTemplatesByCategory(String category) Get templates by category.private static double[][]repeatEfficiency(int numSpeeds, double[] efficiencyProfile) Create efficiency array with same values for all speeds.scaleToDesignPoint(double designSpeed, double designFlow, double designHead, int numberOfSpeeds) Scale this template to match a specific compressor operating point.scaleToDesignPoint(double designSpeed, double designFlow, double designHead, int numberOfSpeeds, String chartType) Scale this template to match a specific compressor operating point with specified chart type.scaleToSpeed(double targetReferenceSpeed) Scale the template curves to match a target speed, preserving the relative curve shapes.scaleToSpeed(double targetReferenceSpeed, String chartType) Scale the template curves to match a target speed with specified chart type.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
Name/identifier for this template. -
referenceSpeed
private final double referenceSpeedReference speed used for normalization (RPM). -
speeds
private final double[] speedsSpeed values for each curve (RPM). -
reducedFlows
private final double[][] reducedFlowsReduced flow values (flow/speed) for each curve. Each row corresponds to a speed. -
reducedHeads
private final double[][] reducedHeadsReduced head values (head/speed²) for each curve. Each row corresponds to a speed. -
polytropicEfficiencies
private final double[][] polytropicEfficienciesPolytropic efficiency values (%) for each curve. Each row corresponds to a speed. -
CENTRIFUGAL_STANDARD
Standard centrifugal compressor template.Based on typical multi-stage centrifugal compressor characteristics with:
- 9 speed curves from ~67% to 100% of max speed
- 5-7 operating points per curve
- ~25-30% surge margin
- Peak efficiency ~78%
-
CENTRIFUGAL_HIGH_FLOW
High flow centrifugal compressor template.Compressor optimized for high volumetric flow with lower head per stage.
-
CENTRIFUGAL_HIGH_HEAD
High head centrifugal compressor template.Compressor optimized for high head with narrower operating range.
-
PIPELINE
Pipeline compressor template.Designed for natural gas transmission with high capacity, moderate pressure ratio, and wide operating range. Typical for long-distance gas pipelines.
- High volumetric flow capacity
- Moderate head (pressure ratio 1.3-1.6 per stage)
- Wide stable operating range (~40% turndown)
- Peak efficiency ~82-85%
-
EXPORT
Export compressor template.Designed for offshore gas export with high discharge pressure and stable operation. Optimized for efficiency at design point.
- High pressure ratio
- Multiple stages (typically 6-8)
- Narrow but efficient operating range
- Peak efficiency ~80%
-
INJECTION
Injection compressor template.Designed for gas injection/reinjection with very high discharge pressure. Used for enhanced oil recovery and reservoir pressure maintenance.
- Very high pressure ratio (overall 50-200)
- Lower volumetric capacity
- Multiple stages with intercooling
- Peak efficiency ~77%
-
GAS_LIFT
Gas lift compressor template.Designed for artificial lift applications with variable operating conditions. Must handle fluctuating inlet conditions and some liquid carryover.
- Variable pressure ratio capability
- Robust design for liquid tolerance
- Wide surge margin (~35%)
- Peak efficiency ~75%
-
REFRIGERATION
Refrigeration compressor template.Designed for process cooling and LNG applications with refrigerants. Optimized for wide operating range and varying loads.
- Wide operating range for varying cooling loads
- Adapted for high molecular weight refrigerants
- Good part-load efficiency
- Peak efficiency ~78%
-
BOOSTER
Booster compressor template.Designed for moderate pressure boosting in process plants. General-purpose design with good balance of capacity and head.
- Moderate pressure ratio (2-4)
- Medium capacity
- Balanced operating range
- Peak efficiency ~76%
-
SINGLE_STAGE
Single-stage centrifugal compressor template.Simple single impeller design for low pressure ratio applications. Common for utilities, blowers, and simple compression duty.
- Low pressure ratio (1.5-2.5 per stage)
- Simple, cost-effective design
- Wide flow range
- Peak efficiency ~75%
-
MULTISTAGE_INLINE
Multistage inline (barrel) compressor template.Multiple stages in series within a barrel casing for high pressure applications. Standard design for oil and gas industry.
- High pressure ratio (5-15 overall)
- 4-8 stages typical
- Compact design, good for high pressure
- Peak efficiency ~78%
-
INTEGRALLY_GEARED
Integrally geared compressor template.Multiple pinions with impellers driven by a bull gear. Flexible staging for air separation and process applications.
- Flexible pressure ratio per stage
- Good for air separation, process air
- High efficiency through optimized staging
- Peak efficiency ~82%
-
OVERHUNG
Overhung impeller compressor template.Cantilever design with impeller mounted on extended shaft. Simple maintenance access, common for smaller applications.
- Low to medium pressure
- Simple maintenance
- Cost-effective for smaller duties
- Peak efficiency ~74%
-
-
Constructor Details
-
CompressorCurveTemplate
public CompressorCurveTemplate(String name, double referenceSpeed, double[] speeds, double[][] flows, double[][] heads, double[][] efficiencies) Constructor for CompressorCurveTemplate.- Parameters:
name- Template name/identifierreferenceSpeed- Reference speed used for normalization (RPM)speeds- Speed values for each curve (RPM)flows- Flow values for each curve (m³/hr). Will be normalized internally.heads- Head values for each curve (kJ/kg). Will be normalized internally.efficiencies- Polytropic efficiency values (%) for each curve
-
-
Method Details
-
getName
-
getReferenceSpeed
public double getReferenceSpeed()Get the reference speed used for normalization.- Returns:
- reference speed in RPM
-
getNumberOfSpeedCurves
public int getNumberOfSpeedCurves()Get the number of speed curves in this template.- Returns:
- number of speed curves
-
getSpeedRatios
public double[] getSpeedRatios()Get the speed ratios (speed/referenceSpeed) for all curves.- Returns:
- array of speed ratios
-
scaleToDesignPoint
public CompressorChartInterface scaleToDesignPoint(double designSpeed, double designFlow, double designHead, int numberOfSpeeds) Scale this template to match a specific compressor operating point.The scaling uses fan laws to generate curves that pass through the specified design point (designFlow, designHead) at the design speed. Uses interpolate and extrapolate chart type by default.
- Parameters:
designSpeed- Design speed in RPMdesignFlow- Design flow rate in m³/hrdesignHead- Design polytropic head in kJ/kgnumberOfSpeeds- Number of speed curves to generate (uses evenly spaced speeds from template range)- Returns:
- A new CompressorChart with scaled curves
-
scaleToDesignPoint
public CompressorChartInterface scaleToDesignPoint(double designSpeed, double designFlow, double designHead, int numberOfSpeeds, String chartType) Scale this template to match a specific compressor operating point with specified chart type.The scaling uses fan laws to generate curves that pass through the specified design point (designFlow, designHead) at the design speed.
- Parameters:
designSpeed- Design speed in RPMdesignFlow- Design flow rate in m³/hrdesignHead- Design polytropic head in kJ/kgnumberOfSpeeds- Number of speed curves to generatechartType- Chart type: "simple", "interpolate", or "interpolate and extrapolate"- Returns:
- A new CompressorChartInterface with scaled curves
-
createChart
Create a chart instance of the specified type.This method is package-private to allow reuse by CompressorChartGenerator.
- Parameters:
chartType- The chart type: "simple", "fan law", "interpolate", or "interpolate and extrapolate"- Returns:
- A new chart instance
-
repeatEfficiency
private static double[][] repeatEfficiency(int numSpeeds, double[] efficiencyProfile) Create efficiency array with same values for all speeds.Helper method to reduce repetition in template definitions where efficiency curves are identical across speeds.
- Parameters:
numSpeeds- Number of speed curvesefficiencyProfile- Single efficiency profile to repeat- Returns:
- 2D array with repeated efficiency profiles
-
findClosestSpeedIndex
private int findClosestSpeedIndex(double targetRatio) Find the index of the template curve closest to the specified speed ratio.- Parameters:
targetRatio- Target speed ratio (speed/designSpeed)- Returns:
- Index of the closest template curve
-
createCentrifugalStandardTemplate
Create the standard centrifugal compressor template.- Returns:
- the template
-
createCentrifugalHighFlowTemplate
Create the high flow centrifugal compressor template.- Returns:
- the template
-
createCentrifugalHighHeadTemplate
Create the high head centrifugal compressor template.- Returns:
- the template
-
createPipelineTemplate
Create the pipeline compressor template.- Returns:
- the template
-
createExportTemplate
Create the export compressor template.- Returns:
- the template
-
createInjectionTemplate
Create the injection compressor template.- Returns:
- the template
-
createGasLiftTemplate
Create the gas lift compressor template.- Returns:
- the template
-
createRefrigerationTemplate
Create the refrigeration compressor template.- Returns:
- the template
-
createBoosterTemplate
Create the booster compressor template.- Returns:
- the template
-
createSingleStageTemplate
Create the single-stage compressor template.- Returns:
- the template
-
createMultistageInlineTemplate
Create the multistage inline (barrel) compressor template.- Returns:
- the template
-
createIntegrallyGearedTemplate
Create the integrally geared compressor template.- Returns:
- the template
-
createOverhungTemplate
Create the overhung impeller compressor template.- Returns:
- the template
-
getTemplate
Get a template by name.Supports various naming conventions - spaces, hyphens, and underscores are interchangeable. The search is case-insensitive.
- Parameters:
templateName- Name of the template (e.g., "CENTRIFUGAL_STANDARD", "pipeline", "gas-lift")- Returns:
- The matching template, or CENTRIFUGAL_STANDARD if not found
-
getAvailableTemplates
Get all available template names.- Returns:
- Array of template names
-
getTemplatesByCategory
-
getOriginalChart
Get the original (unscaled) compressor chart from this template.This method returns a chart with the exact curve data stored in the template, without any scaling. Useful for recreating the original reference curves.
- Returns:
- A new CompressorChartInterface with the original template curves
-
getOriginalChart
Get the original (unscaled) compressor chart from this template with specified chart type.- Parameters:
chartType- Chart type: "simple", "interpolate", or "interpolate and extrapolate"- Returns:
- A new CompressorChartInterface with the original template curves
-
getSpeeds
public double[] getSpeeds()Get the original speeds from the template.- Returns:
- Array of speed values in RPM
-
scaleToSpeed
Scale the template curves to match a target speed, preserving the relative curve shapes.This scales all curves proportionally so that the reference speed maps to the target speed. Uses fan laws: flow scales with speed, head scales with speed².
- Parameters:
targetReferenceSpeed- The target speed that corresponds to the template's reference speed- Returns:
- A new CompressorChartInterface with scaled curves
-
scaleToSpeed
Scale the template curves to match a target speed with specified chart type.- Parameters:
targetReferenceSpeed- The target speed that corresponds to the template's reference speedchartType- Chart type: "simple", "interpolate", or "interpolate and extrapolate"- Returns:
- A new CompressorChartInterface with scaled curves
-