Class HeatExchanger.Builder

java.lang.Object
neqsim.process.equipment.heatexchanger.HeatExchanger.Builder
Enclosing class:
HeatExchanger

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

Provides a readable and maintainable way to construct heat exchangers with hot and cold stream configurations, thermal specifications, and flow arrangements.

Version:
1.0
Author:
NeqSim
  • Field Details

    • name

      private final String name
    • hotStream

      private StreamInterface hotStream
    • coldStream

      private StreamInterface coldStream
    • uaValue

      private double uaValue
    • thermalEffectiveness

      private double thermalEffectiveness
    • deltaT

      private double deltaT
    • outTemperature

      private double outTemperature
    • outTemperatureUnit

      private String outTemperatureUnit
    • outStreamSpecificationNumber

      private int outStreamSpecificationNumber
    • flowArrangement

      private String flowArrangement
    • guessOutTemperature

      private double guessOutTemperature
    • guessOutTemperatureUnit

      private String guessOutTemperatureUnit
  • Constructor Details

    • Builder

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

    • hotStream

      public HeatExchanger.Builder hotStream(StreamInterface stream)
      Sets the hot side inlet stream (stream index 0).
      Parameters:
      stream - the hot side inlet stream
      Returns:
      this builder for chaining
    • coldStream

      public HeatExchanger.Builder coldStream(StreamInterface stream)
      Sets the cold side inlet stream (stream index 1).
      Parameters:
      stream - the cold side inlet stream
      Returns:
      this builder for chaining
    • UAvalue

      public HeatExchanger.Builder UAvalue(double ua)
      Sets the overall heat transfer coefficient times area (UA value) in W/K.
      Parameters:
      ua - the UA value in W/K
      Returns:
      this builder for chaining
    • thermalEffectiveness

      public HeatExchanger.Builder thermalEffectiveness(double effectiveness)
      Sets the thermal effectiveness (0.0-1.0).
      Parameters:
      effectiveness - thermal effectiveness fraction
      Returns:
      this builder for chaining
    • deltaT

      public HeatExchanger.Builder deltaT(double deltaT)
      Sets the approach temperature difference (minimum temperature difference).
      Parameters:
      deltaT - temperature difference in Kelvin
      Returns:
      this builder for chaining
    • outTemperature

      public HeatExchanger.Builder outTemperature(double temperature, String unit, int streamNumber)
      Sets the outlet temperature for a specified stream.
      Parameters:
      temperature - outlet temperature value
      unit - temperature unit ("K", "C", or "F")
      streamNumber - 0 for hot stream, 1 for cold stream
      Returns:
      this builder for chaining
    • flowArrangement

      public HeatExchanger.Builder flowArrangement(String arrangement)
      Sets the flow arrangement type.
      Parameters:
      arrangement - flow arrangement (e.g., "counterflow", "parallel flow", "concentric tube counterflow", "cross flow")
      Returns:
      this builder for chaining
    • guessOutTemperature

      public HeatExchanger.Builder guessOutTemperature(double temperature, String unit)
      Sets an initial guess for outlet temperature to help convergence.
      Parameters:
      temperature - guess temperature value
      unit - temperature unit ("K", "C", or "F")
      Returns:
      this builder for chaining
    • build

      public HeatExchanger build()
      Builds and returns the configured HeatExchanger instance.
      Returns:
      a new HeatExchanger instance with the specified configuration
      Throws:
      IllegalStateException - if required streams are not set