Class HeatExchanger.Builder
java.lang.Object
neqsim.process.equipment.heatexchanger.HeatExchanger.Builder
- Enclosing class:
HeatExchanger
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 Summary
FieldsModifier and TypeFieldDescriptionprivate StreamInterfaceprivate doubleprivate Stringprivate doubleprivate Stringprivate StreamInterfaceprivate final Stringprivate intprivate doubleprivate Stringprivate doubleprivate double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns the configured HeatExchanger instance.coldStream(StreamInterface stream) Sets the cold side inlet stream (stream index 1).deltaT(double deltaT) Sets the approach temperature difference (minimum temperature difference).flowArrangement(String arrangement) Sets the flow arrangement type.guessOutTemperature(double temperature, String unit) Sets an initial guess for outlet temperature to help convergence.hotStream(StreamInterface stream) Sets the hot side inlet stream (stream index 0).outTemperature(double temperature, String unit, int streamNumber) Sets the outlet temperature for a specified stream.thermalEffectiveness(double effectiveness) Sets the thermal effectiveness (0.0-1.0).UAvalue(double ua) Sets the overall heat transfer coefficient times area (UA value) in W/K.
-
Field Details
-
name
-
hotStream
-
coldStream
-
uaValue
private double uaValue -
thermalEffectiveness
private double thermalEffectiveness -
deltaT
private double deltaT -
outTemperature
private double outTemperature -
outTemperatureUnit
-
outStreamSpecificationNumber
private int outStreamSpecificationNumber -
flowArrangement
-
guessOutTemperature
private double guessOutTemperature -
guessOutTemperatureUnit
-
-
Constructor Details
-
Builder
Creates a new Builder with the specified heat exchanger name.- Parameters:
name- the name of the heat exchanger
-
-
Method Details
-
hotStream
Sets the hot side inlet stream (stream index 0).- Parameters:
stream- the hot side inlet stream- Returns:
- this builder for chaining
-
coldStream
Sets the cold side inlet stream (stream index 1).- Parameters:
stream- the cold side inlet stream- Returns:
- this builder for chaining
-
UAvalue
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
Sets the thermal effectiveness (0.0-1.0).- Parameters:
effectiveness- thermal effectiveness fraction- Returns:
- this builder for chaining
-
deltaT
Sets the approach temperature difference (minimum temperature difference).- Parameters:
deltaT- temperature difference in Kelvin- Returns:
- this builder for chaining
-
outTemperature
Sets the outlet temperature for a specified stream.- Parameters:
temperature- outlet temperature valueunit- temperature unit ("K", "C", or "F")streamNumber- 0 for hot stream, 1 for cold stream- Returns:
- this builder for chaining
-
flowArrangement
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
Sets an initial guess for outlet temperature to help convergence.- Parameters:
temperature- guess temperature valueunit- temperature unit ("K", "C", or "F")- Returns:
- this builder for chaining
-
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
-