Class DistillationColumn.Builder

java.lang.Object
neqsim.process.equipment.distillation.DistillationColumn.Builder
Enclosing class:
DistillationColumn

public static class DistillationColumn.Builder extends Object
Fluent builder for DistillationColumn.

Example usage:

DistillationColumn col = DistillationColumn.builder("Deethanizer").numberOfTrays(7)
    .withCondenserAndReboiler().topPressure(30.0, "bara").bottomPressure(31.0, "bara")
    .insideOut().addFeedStream(feed, 4).build();
Version:
1.0
Author:
esol
  • Field Details

    • name

      private final String name
      Column name.
    • numberOfTrays

      private int numberOfTrays
      Number of simple (non-condenser/reboiler) trays.
    • condenser

      private boolean condenser
      Whether to add a condenser.
    • reboiler

      private boolean reboiler
      Whether to add a reboiler.
    • topPressure

      private double topPressure
      Top tray pressure in bara (-1 means unset).
    • bottomPressure

      private double bottomPressure
      Bottom tray pressure in bara (-1 means unset).
    • tempTol

      private double tempTol
      Temperature convergence tolerance.
    • massTol

      private double massTol
      Mass balance convergence tolerance.
    • maxIter

      private int maxIter
      Maximum iterations.
    • solver

      Solver type.
    • relaxation

      private double relaxation
      Relaxation factor for damped substitution.
    • diameter

      private double diameter
      Internal column diameter.
    • topSpec

      private ColumnSpecification topSpec
      Top product specification.
    • bottomSpec

      private ColumnSpecification bottomSpec
      Bottom product specification.
    • feeds

      private final List<Object[]> feeds
      Feed streams with tray indices.
  • Constructor Details

    • Builder

      Builder(String name)
      Creates a builder with the given column name.
      Parameters:
      name - column name
  • Method Details

    • numberOfTrays

      public DistillationColumn.Builder numberOfTrays(int n)
      Sets the number of simple trays (excluding condenser and reboiler).
      Parameters:
      n - number of trays
      Returns:
      this builder
    • withCondenserAndReboiler

      public DistillationColumn.Builder withCondenserAndReboiler()
      Configures the column with both a condenser and a reboiler.
      Returns:
      this builder
    • topPressure

      public DistillationColumn.Builder topPressure(double pressure, String unit)
      Sets the top tray pressure.
      Parameters:
      pressure - pressure value
      unit - pressure unit (e.g. "bara")
      Returns:
      this builder
    • bottomPressure

      public DistillationColumn.Builder bottomPressure(double pressure, String unit)
      Sets the bottom tray pressure.
      Parameters:
      pressure - pressure value
      unit - pressure unit (e.g. "bara")
      Returns:
      this builder
    • pressure

      public DistillationColumn.Builder pressure(double pressure, String unit)
      Sets both top and bottom pressure to the same value.
      Parameters:
      pressure - pressure value
      unit - pressure unit (e.g. "bara")
      Returns:
      this builder
    • temperatureTolerance

      public DistillationColumn.Builder temperatureTolerance(double tol)
      Sets the temperature convergence tolerance.
      Parameters:
      tol - tolerance value
      Returns:
      this builder
    • massBalanceTolerance

      public DistillationColumn.Builder massBalanceTolerance(double tol)
      Sets the mass balance convergence tolerance.
      Parameters:
      tol - tolerance value
      Returns:
      this builder
    • tolerance

      public DistillationColumn.Builder tolerance(double tol)
      Sets a combined tolerance for temperature and mass balance.
      Parameters:
      tol - tolerance value
      Returns:
      this builder
    • maxIterations

      public DistillationColumn.Builder maxIterations(int maxIter)
      Sets the maximum number of solver iterations.
      Parameters:
      maxIter - maximum iterations
      Returns:
      this builder
    • dampedSubstitution

      public DistillationColumn.Builder dampedSubstitution()
      Selects the damped substitution solver.
      Returns:
      this builder
    • insideOut

      public DistillationColumn.Builder insideOut()
      Selects the inside-out solver.
      Returns:
      this builder
    • relaxationFactor

      public DistillationColumn.Builder relaxationFactor(double factor)
      Sets the relaxation factor for damped substitution.
      Parameters:
      factor - relaxation factor
      Returns:
      this builder
    • internalDiameter

      public DistillationColumn.Builder internalDiameter(double diameter)
      Sets the internal column diameter.
      Parameters:
      diameter - diameter in meters
      Returns:
      this builder
    • addFeedStream

      public DistillationColumn.Builder addFeedStream(StreamInterface feed, int trayIndex)
      Adds a feed stream at the specified tray index.
      Parameters:
      feed - the feed stream
      trayIndex - the tray index for this feed
      Returns:
      this builder
    • topProductPurity

      public DistillationColumn.Builder topProductPurity(String componentName, double purity)
      Sets a top product purity specification.
      Parameters:
      componentName - the component name
      purity - the target mole fraction
      Returns:
      this builder
    • bottomSpecification

      public DistillationColumn.Builder bottomSpecification(ColumnSpecification spec)
      Sets the bottom column specification.
      Parameters:
      spec - the bottom specification
      Returns:
      this builder
    • build

      public DistillationColumn build()
      Builds the DistillationColumn with the configured parameters.
      Returns:
      the constructed column