Class GasScrubberMechanicalDesign

All Implemented Interfaces:
Serializable

public class GasScrubberMechanicalDesign extends SeparatorMechanicalDesign

GasScrubberMechanicalDesign class.

Version:
$Id: $Id
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.
    • hasInletCyclones

      private boolean hasInletCyclones
      Whether inlet cyclones are installed.
    • numberOfInletCyclones

      private int numberOfInletCyclones
      Number of inlet cyclones.
    • inletCycloneDiameterM

      private double inletCycloneDiameterM
      Inlet cyclone inner diameter [m].
    • hasDemistingCyclones

      private boolean hasDemistingCyclones
      Whether demisting cyclones are installed.
    • numberOfDemistingCyclones

      private int numberOfDemistingCyclones
      Number of demisting cyclones.
    • demistingCycloneDiameterM

      private double demistingCycloneDiameterM
      Demisting cyclone inner diameter [m].
    • cycloneDeckElevationM

      private double cycloneDeckElevationM
      Cyclone deck elevation from bottom of vessel [m].
    • cycloneLengthM

      private double cycloneLengthM
      Cyclone tube length [m].
    • cycloneEulerNumber

      private double cycloneEulerNumber
      Cyclone Euler number (total dp vs rho*v^2).
    • cycloneDpToDrainPct

      private double cycloneDpToDrainPct
      Fraction of cyclone dp to drain chamber [%].
    • hasMeshPad

      private boolean hasMeshPad
      Whether mesh pad is installed (above inlet, below cyclones).
    • meshPadAreaM2

      private double meshPadAreaM2
      Mesh pad area [m2].
    • meshPadThicknessMm

      private double meshPadThicknessMm
      Mesh pad thickness [mm].
    • hasVanePack

      private boolean hasVanePack
      Whether vane pack is installed.
    • vanePackAreaM2

      private double vanePackAreaM2
      Vane pack area [m2].
    • drainPipeDiameterM

      private double drainPipeDiameterM
      Drain pipe inner diameter [m].
    • laLLElevationM

      private double laLLElevationM
      LA(LL) — Low-Low level alarm elevation from BTL [m].
    • laLElevationM

      private double laLElevationM
      LA(L) — Low level alarm elevation from BTL [m].
    • laHElevationM

      private double laHElevationM
      LA(H) — High level alarm elevation from BTL [m]. Required for cyclone drainage calc.
    • laHHElevationM

      private double laHHElevationM
      LA(HH) — High-High level alarm elevation from BTL [m].
    • conformityRuleSet

      private transient ConformityRuleSet conformityRuleSet
      Active conformity rule set, null if none set.
  • Constructor Details

  • Method Details

    • readDesignSpecifications

      public void readDesignSpecifications()

      readDesignSpecifications.

      Overrides:
      readDesignSpecifications in class SeparatorMechanicalDesign
    • calcDesign

      public void calcDesign()

      calcDesign.

      Overrides:
      calcDesign in class SeparatorMechanicalDesign
    • setDesign

      public void setDesign()

      setDesign.

      Overrides:
      setDesign in class SeparatorMechanicalDesign
    • setConformityRules

      public void setConformityRules(String standardName)
      Sets the conformity standard to use for checking.

      This also enables the corresponding capacity constraints on the scrubber, so that the optimizer and capacity reporting use the same criteria.

      Parameters:
      standardName - the standard identifier: "TR3500", "API-12J", "Shell-DEP", "NORSOK-P002"
    • checkConformity

      public ConformityReport checkConformity()
      Runs all applicable conformity checks using the current operating state.

      The scrubber must have been run (process simulation) before calling this method, so that the fluid state reflects current operating conditions.

      Returns:
      a conformity report with all check results
      Throws:
      IllegalStateException - if no conformity rules have been set
    • getConformityStandard

      public String getConformityStandard()
      Gets the active conformity rule set name, or null if none is set.
      Returns:
      the standard name, or null
    • setInletDevice

      public void setInletDevice(String deviceTypeName)
      Sets the inlet device type by name string.

      Accepted names (case-insensitive): "schoepentoeter", "inlet_vane", "inlet_cyclone", "deflector_plate", "half_pipe", "impingement_plate", "none".

      Parameters:
      deviceTypeName - the inlet device type name
      Throws:
      IllegalArgumentException - if the name does not match any known device type
    • setInletCyclones

      public void setInletCyclones(int numberOfCyclones, double cycloneDiameterM)
      Configures the inlet cyclones.
      Parameters:
      numberOfCyclones - number of inlet cyclones
      cycloneDiameterM - inlet cyclone inner diameter [m]
    • hasInletCyclones

      public boolean hasInletCyclones()
      Whether inlet cyclones are installed.
      Returns:
      true if inlet cyclones are configured
    • getNumberOfInletCyclones

      public int getNumberOfInletCyclones()
      Gets the number of inlet cyclones.
      Returns:
      number of inlet cyclones
    • getInletCycloneDiameterM

      public double getInletCycloneDiameterM()
      Gets the inlet cyclone inner diameter.
      Returns:
      cyclone diameter [m]
    • setDemistingCyclones

      public void setDemistingCyclones(int numberOfCyclones, double cycloneDiameterM, double deckElevationM)
      Configures the demisting cyclones.
      Parameters:
      numberOfCyclones - number of demisting cyclones
      cycloneDiameterM - demisting cyclone inner diameter [m]
      deckElevationM - cyclone deck elevation from bottom of vessel [m]
    • setDemistingCyclones

      public void setDemistingCyclones(int numberOfCyclones, double cycloneDiameterM, double deckElevationM, double cycloneLengthM)
      Configures the demisting cyclones with tube length.
      Parameters:
      numberOfCyclones - number of demisting cyclones
      cycloneDiameterM - demisting cyclone inner diameter [m]
      deckElevationM - cyclone deck elevation from bottom of vessel [m]
      cycloneLengthM - cyclone tube length [m]
    • hasDemistingCyclones

      public boolean hasDemistingCyclones()
      Whether demisting cyclones are installed.
      Returns:
      true if demisting cyclones are configured
    • getNumberOfDemistingCyclones

      public int getNumberOfDemistingCyclones()
      Gets the number of demisting cyclones.
      Returns:
      number of demisting cyclones
    • getDemistingCycloneDiameterM

      public double getDemistingCycloneDiameterM()
      Gets the demisting cyclone inner diameter.
      Returns:
      cyclone diameter [m]
    • getCycloneDeckElevationM

      public double getCycloneDeckElevationM()
      Gets the cyclone deck elevation.
      Returns:
      deck elevation from bottom of vessel [m]
    • setCycloneDeckElevationM

      public void setCycloneDeckElevationM(double elevationM)
      Sets the cyclone deck elevation.
      Parameters:
      elevationM - deck elevation from bottom of vessel [m]
    • getCycloneLengthM

      public double getCycloneLengthM()
      Gets the cyclone tube length.
      Returns:
      cyclone tube length [m]
    • setCycloneLengthM

      public void setCycloneLengthM(double lengthM)
      Sets the cyclone tube length.
      Parameters:
      lengthM - cyclone tube length [m]
    • getCycloneEulerNumber

      public double getCycloneEulerNumber()
      Gets the cyclone Euler number for total pressure drop.
      Returns:
      Euler number (dp vs rho*v^2, not 0.5*rho*v^2)
    • setCycloneEulerNumber

      public void setCycloneEulerNumber(double eulerNumber)
      Sets the cyclone Euler number.
      Parameters:
      eulerNumber - Euler number for total dp
    • getCycloneDpToDrainPct

      public double getCycloneDpToDrainPct()
      Gets the fraction of cyclone dp to drain chamber.
      Returns:
      fraction [%]
    • setCycloneDpToDrainPct

      public void setCycloneDpToDrainPct(double pct)
      Sets the fraction of cyclone dp to drain chamber.
      Parameters:
      pct - fraction [%]
    • setMeshPad

      public void setMeshPad(double areaM2, double thicknessMm)
      Configures the mesh pad.
      Parameters:
      areaM2 - mesh pad area [m2]
      thicknessMm - mesh pad thickness [mm]
    • hasMeshPad

      public boolean hasMeshPad()
      Whether mesh pad is installed.
      Returns:
      true if mesh pad is configured
    • getMeshPadAreaM2

      public double getMeshPadAreaM2()
      Gets the mesh pad area.
      Returns:
      mesh pad area [m2]
    • getMeshPadThicknessMm

      public double getMeshPadThicknessMm()
      Gets the mesh pad thickness.
      Returns:
      mesh pad thickness [mm]
    • setVanePack

      public void setVanePack(double areaM2)
      Configures the vane pack.
      Parameters:
      areaM2 - vane pack area [m2]
    • hasVanePack

      public boolean hasVanePack()
      Whether vane pack is installed.
      Returns:
      true if vane pack is configured
    • getVanePackAreaM2

      public double getVanePackAreaM2()
      Gets the vane pack area.
      Returns:
      vane pack area [m2]
    • setDrainPipeDiameterM

      public void setDrainPipeDiameterM(double diameterM)
      Sets the drain pipe inner diameter.
      Parameters:
      diameterM - drain pipe ID [m]
    • getDrainPipeDiameterM

      public double getDrainPipeDiameterM()
      Gets the drain pipe inner diameter.
      Returns:
      drain pipe ID [m]
    • setLaLLElevationM

      public void setLaLLElevationM(double elevationM)
      Sets the LA(LL) — Low-Low level alarm elevation from BTL.
      Parameters:
      elevationM - LA(LL) elevation [m]
    • getLaLLElevationM

      public double getLaLLElevationM()
      Gets the LA(LL) elevation from BTL.
      Returns:
      LA(LL) elevation [m]
    • setLaLElevationM

      public void setLaLElevationM(double elevationM)
      Sets the LA(L) — Low level alarm elevation from BTL.
      Parameters:
      elevationM - LA(L) elevation [m]
    • getLaLElevationM

      public double getLaLElevationM()
      Gets the LA(L) elevation from BTL.
      Returns:
      LA(L) elevation [m]
    • setLaHElevationM

      public void setLaHElevationM(double elevationM)
      Sets the LA(H) — High level alarm elevation from BTL. Required when demisting cyclones are present for drainage height conformity check.
      Parameters:
      elevationM - LA(H) elevation [m]
    • getLaHElevationM

      public double getLaHElevationM()
      Gets the LA(H) elevation from BTL.
      Returns:
      LA(H) elevation [m]
    • setLaHHElevationM

      public void setLaHHElevationM(double elevationM)
      Sets the LA(HH) — High-High level alarm elevation from BTL.
      Parameters:
      elevationM - LA(HH) elevation [m]
    • getLaHHElevationM

      public double getLaHHElevationM()
      Gets the LA(HH) elevation from BTL.
      Returns:
      LA(HH) elevation [m]
    • setHhllElevationM

      @Deprecated public void setHhllElevationM(double elevationM)
      Deprecated.
      Sets the HHLL elevation from bottom of vessel. Kept for backward compatibility; prefer setLaHElevationM(double) for drainage calculations.
      Parameters:
      elevationM - HHLL elevation [m]
    • getHhllElevationM

      @Deprecated public double getHhllElevationM()
      Deprecated.
      Gets the HHLL elevation from bottom of vessel. Kept for backward compatibility.
      Returns:
      HHLL elevation [m]
    • getResponse

      public SeparatorMechanicalDesignResponse getResponse()
      Get the mechanical design response object.

      This method returns a MechanicalDesignResponse object that can be further customized or combined with other data before serialization.

      Returns a separator-specific response with additional fields for vessel sizing, internals, and process design data.

      Overrides to populate scrubber-specific parameters (internals, elevations) into the JSON response.
      Overrides:
      getResponse in class SeparatorMechanicalDesign
      Returns:
      MechanicalDesignResponse object
    • toTextReport

      public String toTextReport()
      Generates a formatted text report of the scrubber mechanical design configuration. Shows vessel geometry, internals, elevations, and liquid levels in a readable table format.
      Returns:
      formatted text report string
    • appendRow

      private void appendRow(StringBuilder sb, String label, String value)
      Appends a formatted row to the text report.
      Parameters:
      sb - the StringBuilder to append to
      label - the row label
      value - the row value