Class CompressorChartKhader2015

All Implemented Interfaces:
Serializable, Cloneable, CompressorChartInterface

public class CompressorChartKhader2015 extends CompressorChartAlternativeMapLookupExtrapolate
CompressorChartKhader2015 is a class that implements the compressor chart calculations based on the Kader 2015 method. It extends the CompressorChartAlternativeMapLookupExtrapolate class and provides methods to set compressor curves based on speed, flow, head, and efficiency values. See: https://github.com/EvenSol/NeqSim-Colab/discussions/12
Author:
esol
See Also:
  • Field Details

  • Constructor Details

    • CompressorChartKhader2015

      public CompressorChartKhader2015(SystemInterface fluid, double impellerdiam)
      Constructs a CompressorChartKhader2015 object with the specified fluid and impeller diameter.
      Parameters:
      fluid - the working fluid for the compressor
      impellerdiam - the outer diameter of the impeller
    • CompressorChartKhader2015

      public CompressorChartKhader2015(SystemInterface fluid, SystemInterface referenceFluid, double impellerdiam)
      Constructs a CompressorChartKhader2015 object with the specified fluid and impeller diameter.
      Parameters:
      fluid - the working fluid for the compressor
      referenceFluid - the referenceFluid for the compressorcurve
      impellerdiam - the outer diameter of the impeller
    • CompressorChartKhader2015

      public CompressorChartKhader2015(StreamInterface stream, double impellerdiam)
      Constructs a CompressorChartKhader2015 object with the specified stream and impeller diameter.
      Parameters:
      stream - the stream for the compressor
      impellerdiam - the outer diameter of the impeller
  • Method Details

    • setCurves

      public void setCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head, double[][] flowPolyEff, double[][] polyEff)
      Sets the compressor curves based on the provided chart conditions, speed, flow, head, flowPolytrpicEfficiency and polytropic efficiency values. Mathematical background (see Kader 2015):
      The method normalizes compressor map data using the following relations:
      • Corrected Head Factor: Hcorr = H / cs2
      • Corrected Flow Factor: Qcorr = Q / (cs D2)
      • Corrected Flow Factor for Efficiency: Qcorr,eff = Qeff / (cs D2)
      • Polytropic Efficiency: ηp = ηp
      • Machine Mach Number: Ma = N D / cs
      where:
      • H = head
      • Q = flow
      • Qeff = flow for efficiency
      • N = speed
      • D = impeller outer diameter
      • cs = sound speed of the fluid
      These dimensionless numbers allow for comparison and extrapolation of compressor performance across different conditions, as described in Kader (2015) and the referenced NeqSim discussion.
      Specified by:
      setCurves in interface CompressorChartInterface
      Overrides:
      setCurves in class CompressorChartAlternativeMapLookup
      Parameters:
      chartConditions - array with temperature, pressure, (optionally density, molecular weight)
      speed - array of speeds
      flow - 2D array of flows
      head - 2D array of heads
      flowPolyEff - 2D array of flows for efficiency
      polyEff - 2D array of polytropic efficiencies
    • getCorrectedCurves

      public List<CompressorChartKhader2015.CorrectedCurve> getCorrectedCurves(double[] chartConditions, double[] speed, double[][] flow, double[][] head, double[][] flowPolyEff, double[][] polyEff)
      Returns a list of corrected compressor curves (dimensionless) based on the provided chart conditions and map data. Each CorrectedCurve contains the machine Mach number, corrected flow factor, corrected head factor, corrected flow factor for efficiency, and polytropic efficiency arrays for each speed.
      Parameters:
      chartConditions - array with temperature, pressure, (optionally density, molecular weight)
      speed - array of speeds
      flow - 2D array of flows
      head - 2D array of heads
      flowPolyEff - 2D array of flows for efficiency
      polyEff - 2D array of polytropic efficiencies
      Returns:
      List of CorrectedCurve objects containing dimensionless map data
    • generateRealCurvesForFluid

      public void generateRealCurvesForFluid()
      Converts a list of dimensionless (corrected) compressor curves to real (physical units) curves for a given fluid and speeds.
    • prettyPrintRealCurvesForFluid

      public void prettyPrintRealCurvesForFluid()
      Pretty print all RealCurve objects for the current fluid.
    • createDefaultFluid

      private SystemInterface createDefaultFluid(double[] chartConditions)
      Creates and initializes a default fluid for compressor chart calculations.
      Parameters:
      chartConditions - array with temperature, pressure, (optionally density, molecular weight)
      Returns:
      the sound speed of the fluid
    • 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.

      The method first converts the input flow and speed to dimensionless numbers using the sound speed and impeller diameter:
      • Corrected Flow Factor: Qcorr = Q / (cs D2)
      • Machine Mach Number: Ma = N D / cs
      It then interpolates/extrapolates the polytropic head from the reference compressor curves in this dimensionless space, and finally converts the result back to physical units by multiplying with cs2.
      Specified by:
      getPolytropicHead in interface CompressorChartInterface
      Overrides:
      getPolytropicHead in class CompressorChartAlternativeMapLookupExtrapolate
      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.

      The method first converts the input flow and speed to dimensionless numbers using the sound speed and impeller diameter:
      • Corrected Flow Factor: Qcorr = Q / (cs D2)
      • Machine Mach Number: Ma = N D / cs
      It then interpolates/extrapolates the polytropic efficiency from the reference compressor curves in this dimensionless space.
      Specified by:
      getPolytropicEfficiency in interface CompressorChartInterface
      Overrides:
      getPolytropicEfficiency in class CompressorChartAlternativeMapLookupExtrapolate
      Parameters:
      flow - [m3/h], speed in [rpm].
      speed - a double
      Returns:
      polytropic efficiency [%].
    • getImpellerOuterDiameter

      public double getImpellerOuterDiameter()
      Returns the outer diameter of the impeller.
      Returns:
      the impeller outer diameter
    • setImpellerOuterDiameter

      public void setImpellerOuterDiameter(double impellerOuterDiameter)
      Sets the outer diameter of the impeller.
      Parameters:
      impellerOuterDiameter - the new outer diameter of the impeller unit meters
    • getReferenceFluid

      public SystemInterface getReferenceFluid()

      getReferenceFluid.

      Returns:
      a SystemInterface object
    • setReferenceFluid

      public void setReferenceFluid(SystemInterface ref_fluid)

      setReferenceFluid.

      Parameters:
      ref_fluid - a SystemInterface object
    • 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.

      Generates and prints the surge curve based on RealCurve data. The surge curve is typically the minimum stable flow for each speed.

      Specified by:
      generateSurgeCurve in interface CompressorChartInterface
      Overrides:
      generateSurgeCurve in class CompressorChart
    • 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.

      Generates and sets the stone wall curve based on RealCurve data. The stone wall curve is typically the maximum flow for each speed.

      Specified by:
      generateStoneWallCurve in interface CompressorChartInterface
      Overrides:
      generateStoneWallCurve in class CompressorChart
    • getRealCurves

      public List<CompressorChartKhader2015.RealCurve> getRealCurves()

      Getter for the field realCurves.

      Returns:
      a List object
    • 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.

      Override to use RealCurve data which contains the corrected flow and head values for the actual fluid.

      Specified by:
      getSurgeFlowAtSpeed in interface CompressorChartInterface
      Overrides:
      getSurgeFlowAtSpeed in class CompressorChart
      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.

      Override to use RealCurve data which contains the corrected flow and head values for the actual fluid.

      Specified by:
      getSurgeHeadAtSpeed in interface CompressorChartInterface
      Overrides:
      getSurgeHeadAtSpeed in class CompressorChart
      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.

      Override to use RealCurve data which contains the corrected flow and head values for the actual fluid.

      Specified by:
      getStoneWallFlowAtSpeed in interface CompressorChartInterface
      Overrides:
      getStoneWallFlowAtSpeed in class CompressorChart
      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.

      Override to use RealCurve data which contains the corrected flow and head values for the actual fluid.

      Specified by:
      getStoneWallHeadAtSpeed in interface CompressorChartInterface
      Overrides:
      getStoneWallHeadAtSpeed in class CompressorChart
      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