Class DistillationColumnMatrixSolver
java.lang.Object
neqsim.process.equipment.distillation.DistillationColumnMatrixSolver
A matrix-based solver for DistillationColumn using the Inside-Out algorithm approach. This solver
uses a tridiagonal matrix algorithm (TDMA) to solve component material balances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double[]private double[]private double[]private double[]private DistillationColumnprivate String[]private double[]private double[]private doubleprivate double[][]private double[]private double[]private int[]private int[](package private) static org.apache.logging.log4j.Loggerprivate intprivate intprivate intprivate doubleprivate doubleprivate double[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate doublegetFeedFlow(int trayIndex, int componentIndex) private doublegetFeedFlowLiquid(int trayIndex) private doublegetFeedFlowVapor(int trayIndex) voidprivate double[][]Solves the tridiagonal matrix for each component to find liquid molar flow rates.private voidsolveTDMA(int n) private voidupdateCompositionsAndFlows(double[][] l_flows) private voidprivate double
-
Field Details
-
logger
static org.apache.logging.log4j.Logger logger -
column
-
nTrays
private int nTrays -
nComps
private int nComps -
componentNames
-
liquidPhaseIndices
private int[] liquidPhaseIndices -
gasPhaseIndices
private int[] gasPhaseIndices -
maxIterations
private int maxIterations -
tolerance
private double tolerance -
dampingFactor
private double dampingFactor -
prevError
private double prevError -
A
private double[] A -
B
private double[] B -
C
private double[] C -
D
private double[] D -
c_prime
private double[] c_prime -
d_prime
private double[] d_prime -
x_tdma
private double[] x_tdma -
feedFlows
private double[][] feedFlows -
feedVapor
private double[] feedVapor -
feedLiquid
private double[] feedLiquid
-
-
Constructor Details
-
DistillationColumnMatrixSolver
-
-
Method Details
-
solve
-
updatePhaseIndices
private void updatePhaseIndices() -
solveComponentBalances
private double[][] solveComponentBalances()Solves the tridiagonal matrix for each component to find liquid molar flow rates. Returns x[tray][component] (liquid mole fractions) or l[tray][component] (molar flows). Let's return molar flows l[tray][component].- Returns:
- liquid molar flow rates as l[tray][component]
-
solveTDMA
private void solveTDMA(int n) -
updateCompositionsAndFlows
private void updateCompositionsAndFlows(double[][] l_flows) -
getFeedFlowVapor
private double getFeedFlowVapor(int trayIndex) -
getFeedFlowLiquid
private double getFeedFlowLiquid(int trayIndex) -
getFeedFlow
private double getFeedFlow(int trayIndex, int componentIndex) -
updateTemperaturesAndEnergy
private double updateTemperaturesAndEnergy()
-