Class DistillationColumn.SimplifiedKvalueModel
java.lang.Object
neqsim.process.equipment.distillation.DistillationColumn.SimplifiedKvalueModel
- Enclosing class:
DistillationColumn
Simplified K-value model for the inside-out inner loop.
For each component on each tray, the model stores coefficients for the correlation:
ln K_i = a_i + b_i / Twhere T is in Kelvin. The coefficients are fitted from rigorous flash results at two temperature points (the current and previous outer-loop temperatures). Between outer-loop updates, compositions are estimated using this simplified model instead of full PH-flash calculations, reducing computational cost by a factor of approximately
innerLoopSteps.- Author:
- esol
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final double[][]Intercept coefficient: lnK = a + b/T.(package private) final double[][]Slope coefficient: lnK = a + b/T.(package private) booleanWhether the model has been fitted (needs at least 2 temperature points).(package private) final intNumber of components.(package private) final intNumber of trays. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidfit(double[][] kvalues1, double[] temps1, double[][] kvalues2, double[] temps2) Fit the model from two sets of K-values at two temperatures.(package private) doublepredict(int tray, int component, double temperature) Predict K-value for component j on tray i at temperature T.
-
Field Details
-
coeffA
final double[][] coeffAIntercept coefficient: lnK = a + b/T. Indexed [tray][component]. -
coeffB
final double[][] coeffBSlope coefficient: lnK = a + b/T. Indexed [tray][component]. -
nTrays
final int nTraysNumber of trays. -
nComponents
final int nComponentsNumber of components. -
fitted
boolean fittedWhether the model has been fitted (needs at least 2 temperature points).
-
-
Constructor Details
-
SimplifiedKvalueModel
SimplifiedKvalueModel(int nTrays, int nComponents)
-
-
Method Details
-
fit
void fit(double[][] kvalues1, double[] temps1, double[][] kvalues2, double[] temps2) Fit the model from two sets of K-values at two temperatures.Given K-values at T1 and T2, we solve:
ln(K1) = a + b/T1 ln(K2) = a + b/T2
yielding b = (ln(K2) - ln(K1)) / (1/T2 - 1/T1) and a = ln(K1) - b/T1.- Parameters:
kvalues1- K-values at temperature T1 [tray][component]temps1- tray temperatures at point 1kvalues2- K-values at temperature T2 [tray][component]temps2- tray temperatures at point 2
-
predict
double predict(int tray, int component, double temperature) Predict K-value for component j on tray i at temperature T.- Parameters:
tray- tray indexcomponent- component indextemperature- temperature in Kelvin- Returns:
- estimated K-value
-