Class Separator.Builder

java.lang.Object
neqsim.process.equipment.separator.Separator.Builder
Enclosing class:
Separator

public static class Separator.Builder extends Object
Builder class for constructing Separator instances with a fluent API.

Provides a readable and maintainable way to construct separators with geometry, orientation, efficiency, and entrainment specifications.

Version:
1.0
Author:
NeqSim
  • Field Details

    • name

      private final String name
    • inletStream

      private StreamInterface inletStream
    • orientation

      private String orientation
    • separatorLength

      private double separatorLength
    • internalDiameter

      private double internalDiameter
    • liquidLevel

      private double liquidLevel
    • designLiquidLevelFraction

      private double designLiquidLevelFraction
    • pressureDrop

      private double pressureDrop
    • efficiency

      private double efficiency
    • liquidCarryoverFraction

      private double liquidCarryoverFraction
    • gasCarryunderFraction

      private double gasCarryunderFraction
    • oilInGas

      private double oilInGas
    • oilInGasSpec

      private String oilInGasSpec
    • waterInGas

      private double waterInGas
    • waterInGasSpec

      private String waterInGasSpec
    • gasInLiquid

      private double gasInLiquid
    • gasInLiquidSpec

      private String gasInLiquidSpec
    • specifiedStream

      private String specifiedStream
    • heatInput

      private double heatInput
    • calculateSteadyState

      private boolean calculateSteadyState
  • Constructor Details

    • Builder

      public Builder(String name)
      Creates a new Builder with the specified separator name.
      Parameters:
      name - the name of the separator
  • Method Details

    • inletStream

      public Separator.Builder inletStream(StreamInterface stream)
      Sets the inlet stream for the separator.
      Parameters:
      stream - the inlet stream
      Returns:
      this builder for chaining
    • orientation

      public Separator.Builder orientation(String orientation)
      Sets the separator orientation.
      Parameters:
      orientation - "horizontal" or "vertical"
      Returns:
      this builder for chaining
    • horizontal

      public Separator.Builder horizontal()
      Sets the separator as horizontal orientation.
      Returns:
      this builder for chaining
    • vertical

      public Separator.Builder vertical()
      Sets the separator as vertical orientation.
      Returns:
      this builder for chaining
    • length

      public Separator.Builder length(double length)
      Sets the separator length in meters.
      Parameters:
      length - separator length in meters
      Returns:
      this builder for chaining
    • diameter

      public Separator.Builder diameter(double diameter)
      Sets the internal diameter in meters.
      Parameters:
      diameter - internal diameter in meters
      Returns:
      this builder for chaining
    • liquidLevel

      public Separator.Builder liquidLevel(double level)
      Sets the liquid level in meters.
      Parameters:
      level - liquid level height in meters
      Returns:
      this builder for chaining
    • designLiquidLevelFraction

      public Separator.Builder designLiquidLevelFraction(double fraction)
      Sets the design liquid level as a fraction of diameter (0.0-1.0).
      Parameters:
      fraction - liquid level fraction
      Returns:
      this builder for chaining
    • pressureDrop

      public Separator.Builder pressureDrop(double dp)
      Sets the pressure drop across the separator in bar.
      Parameters:
      dp - pressure drop in bar
      Returns:
      this builder for chaining
    • efficiency

      public Separator.Builder efficiency(double eff)
      Sets the separation efficiency (0.0-1.0).
      Parameters:
      eff - efficiency value
      Returns:
      this builder for chaining
    • liquidCarryover

      public Separator.Builder liquidCarryover(double fraction)
      Sets the liquid carryover fraction to gas outlet (0.0-1.0).
      Parameters:
      fraction - liquid carryover fraction
      Returns:
      this builder for chaining
    • gasCarryunder

      public Separator.Builder gasCarryunder(double fraction)
      Sets the gas carryunder fraction to liquid outlet (0.0-1.0).
      Parameters:
      fraction - gas carryunder fraction
      Returns:
      this builder for chaining
    • oilInGas

      public Separator.Builder oilInGas(double value, String spec)
      Sets oil entrainment in gas phase.
      Parameters:
      value - entrainment value
      spec - specification type ("mole", "mass", "volume")
      Returns:
      this builder for chaining
    • waterInGas

      public Separator.Builder waterInGas(double value, String spec)
      Sets water entrainment in gas phase.
      Parameters:
      value - entrainment value
      spec - specification type ("mole", "mass", "volume")
      Returns:
      this builder for chaining
    • gasInLiquid

      public Separator.Builder gasInLiquid(double value, String spec)
      Sets gas entrainment in liquid phase.
      Parameters:
      value - entrainment value
      spec - specification type ("mole", "mass", "volume")
      Returns:
      this builder for chaining
    • specifiedStream

      public Separator.Builder specifiedStream(String streamType)
      Sets the reference stream for entrainment specifications.
      Parameters:
      streamType - "feed", "gas", or "liquid"
      Returns:
      this builder for chaining
    • heatInput

      public Separator.Builder heatInput(double heat)
      Sets heat input to the separator in Watts.
      Parameters:
      heat - heat input in W
      Returns:
      this builder for chaining
    • transientMode

      public Separator.Builder transientMode()
      Enables transient (dynamic) calculation mode.
      Returns:
      this builder for chaining
    • steadyStateMode

      public Separator.Builder steadyStateMode()
      Enables steady-state calculation mode (default).
      Returns:
      this builder for chaining
    • build

      public Separator build()
      Builds and returns the configured Separator instance.
      Returns:
      a new Separator instance with the specified configuration