Class CompressorChartAlternativeMapLookupExtrapolate

All Implemented Interfaces:
Serializable, Cloneable, CompressorChartInterface
Direct Known Subclasses:
CompressorChartKhader2015, PumpChartAlternativeMapLookupExtrapolate

public class CompressorChartAlternativeMapLookupExtrapolate extends CompressorChartAlternativeMapLookup

CompressorChartAlternativeMapLookupExtrapolate class.

Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • logger

      static org.apache.logging.log4j.Logger logger
      Logger object for class.
  • Constructor Details

    • CompressorChartAlternativeMapLookupExtrapolate

      public CompressorChartAlternativeMapLookupExtrapolate()
  • Method Details

    • getClosestRefSpeeds

      public ArrayList<Double> getClosestRefSpeeds(double speed)

      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:
      getClosestRefSpeeds in class CompressorChartAlternativeMapLookup
      Parameters:
      speed - the speed to find the closest reference speeds for
      Returns:
      a ArrayList of 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:
      getPolytropicHead in interface CompressorChartInterface
      Overrides:
      getPolytropicHead in class CompressorChartAlternativeMapLookup
      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:
      getPolytropicEfficiency in interface CompressorChartInterface
      Overrides:
      getPolytropicEfficiency in class CompressorChartAlternativeMapLookup
      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 determined
      flowData - an array of flow data points
      valueData - an array of value data points corresponding to the flow data points
      spline - 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 value
      speed1 - the first reference speed
      speed2 - the second reference speed
      value1 - the value corresponding to the first reference speed
      value2 - 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 interpolate
      x1 - the x-value of the first known point
      x2 - the x-value of the second known point
      y1 - the y-value of the first known point
      y2 - the y-value of the second known point
      Returns:
      the interpolated y-value at the given x