Class DistillationColumn.Builder
java.lang.Object
neqsim.process.equipment.distillation.DistillationColumn.Builder
- Enclosing class:
DistillationColumn
Builder class for creating DistillationColumn instances with a fluent API.
Provides a readable and maintainable way to construct complex distillation columns. All configuration options available through setters on DistillationColumn are accessible via builder methods.
- Version:
- 1.0
- Author:
- NeqSim
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classFeed stream configuration holder. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate booleanprivate doubleprivate booleanprivate booleanprivate doubleprivate doubleprivate intprivate final Stringprivate intprivate doubleprivate DistillationColumn.SolverTypeprivate doubleprivate double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFeedStream(StreamInterface stream, int trayNumber) Adds a feed stream to the specified tray.bottomPressure(double pressure, String unit) Sets the bottom tray pressure.build()Builds and returns the configured DistillationColumn.Configures the solver to use damped substitution.Configures the solver to use direct substitution (default).enthalpyBalanceTolerance(double tolerance) Sets the enthalpy balance convergence tolerance.Configures the solver to use inside-out method.internalDiameter(double diameter) Sets the internal diameter of the column.massBalanceTolerance(double tolerance) Sets the mass balance convergence tolerance.maxIterations(int maxIterations) Sets the maximum number of solver iterations.multiPhaseCheck(boolean enable) Enables or disables multi-phase checking.numberOfTrays(int numberOfTrays) Sets the number of trays (excluding condenser and reboiler).Sets both top and bottom pressure to the same value (isobaric column).relaxationFactor(double factor) Sets the relaxation factor for damped solvers.solverType(DistillationColumn.SolverType solverType) Sets the solver type.temperatureTolerance(double tolerance) Sets the temperature convergence tolerance.tolerance(double tolerance) Sets all tolerances to the same value.topPressure(double pressure, String unit) Sets the top tray pressure.Configures the column with a condenser at the top.Configures the column with both condenser and reboiler.Configures the column with a reboiler at the bottom.
-
Field Details
-
name
-
numberOfTrays
private int numberOfTrays -
hasCondenser
private boolean hasCondenser -
hasReboiler
private boolean hasReboiler -
topPressure
private double topPressure -
bottomPressure
private double bottomPressure -
temperatureTolerance
private double temperatureTolerance -
massBalanceTolerance
private double massBalanceTolerance -
enthalpyBalanceTolerance
private double enthalpyBalanceTolerance -
maxIterations
private int maxIterations -
solverType
-
relaxationFactor
private double relaxationFactor -
internalDiameter
private double internalDiameter -
doMultiPhaseCheck
private boolean doMultiPhaseCheck -
feedStreams
-
-
Constructor Details
-
Builder
Creates a new Builder with the specified column name.- Parameters:
name- the name of the distillation column
-
-
Method Details
-
numberOfTrays
Sets the number of trays (excluding condenser and reboiler).- Parameters:
numberOfTrays- number of simple trays- Returns:
- this builder for chaining
-
withCondenser
Configures the column with a condenser at the top.- Returns:
- this builder for chaining
-
withReboiler
Configures the column with a reboiler at the bottom.- Returns:
- this builder for chaining
-
withCondenserAndReboiler
Configures the column with both condenser and reboiler.- Returns:
- this builder for chaining
-
topPressure
Sets the top tray pressure.- Parameters:
pressure- pressure valueunit- pressure unit (e.g., "bara", "barg", "psia")- Returns:
- this builder for chaining
-
bottomPressure
Sets the bottom tray pressure.- Parameters:
pressure- pressure valueunit- pressure unit (e.g., "bara", "barg", "psia")- Returns:
- this builder for chaining
-
pressure
Sets both top and bottom pressure to the same value (isobaric column).- Parameters:
pressure- pressure valueunit- pressure unit- Returns:
- this builder for chaining
-
temperatureTolerance
Sets the temperature convergence tolerance.- Parameters:
tolerance- temperature tolerance in Kelvin- Returns:
- this builder for chaining
-
massBalanceTolerance
Sets the mass balance convergence tolerance.- Parameters:
tolerance- relative mass balance tolerance- Returns:
- this builder for chaining
-
enthalpyBalanceTolerance
Sets the enthalpy balance convergence tolerance.- Parameters:
tolerance- relative enthalpy balance tolerance- Returns:
- this builder for chaining
-
tolerance
Sets all tolerances to the same value.- Parameters:
tolerance- tolerance value for all convergence checks- Returns:
- this builder for chaining
-
maxIterations
Sets the maximum number of solver iterations.- Parameters:
maxIterations- maximum iterations- Returns:
- this builder for chaining
-
solverType
Sets the solver type.- Parameters:
solverType- the solver algorithm to use- Returns:
- this builder for chaining
-
directSubstitution
Configures the solver to use direct substitution (default).- Returns:
- this builder for chaining
-
dampedSubstitution
Configures the solver to use damped substitution.- Returns:
- this builder for chaining
-
insideOut
Configures the solver to use inside-out method.- Returns:
- this builder for chaining
-
relaxationFactor
Sets the relaxation factor for damped solvers.- Parameters:
factor- relaxation factor (0 < factor <= 1)- Returns:
- this builder for chaining
-
internalDiameter
Sets the internal diameter of the column.- Parameters:
diameter- diameter in meters- Returns:
- this builder for chaining
-
multiPhaseCheck
Enables or disables multi-phase checking.- Parameters:
enable- true to enable multi-phase check- Returns:
- this builder for chaining
-
addFeedStream
Adds a feed stream to the specified tray.- Parameters:
stream- the feed streamtrayNumber- the tray number (0-based) for the feed- Returns:
- this builder for chaining
-
build
Builds and returns the configured DistillationColumn.- Returns:
- the constructed DistillationColumn
-