equinor / neqsim

NeqSim is a library for calculation of fluid behavior, phase equilibrium and process simulation

Home Page:https://equinor.github.io/neqsimhome/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:bug: Dehydration Glycol Column Test and Bug Fixes

Sviatose opened this issue · comments

Dehydration Glycol Column Test:
I've created a new test for the dehydration glycol column. I encountered convergence issues at 85 degrees C temperature of the condenser. Increasing the number of trays to 2 improves the convergence, however, this led to insufficient water content in the gas outlet streams, resulting in a water mass balance issue. Increasing temperature to 95C solves the water imbalance.

Incorrect Flow Rate Calculation:
When using the getFluid().getComponent("water").getFlowRate("kg/hr") method to obtain the flow rate of a particular component got a strange result.

first assert is ok if summing water in both gas and liquid feed
double waterFlowRateInColumn =
richTEGStream.getFluid().getPhase(0).getComponent("water").getFlowRate("kg/hr")
+ richTEGStream.getFluid().getPhase(1).getComponent("water").getFlowRate("kg/hr");

I see. But I guess it should return also correct value if richTEGStream.getFluid().getComponent("water").getFlowRate("kg/hr") ?

Working on debuging here:
https://github.com/equinor/neqsim/tree/debuging-distcolumn-even

Seems to be an error that the liquid from top stage, is not introduved in the lower stage (2nd stage):

component water tray 0 number of input streams 1 massinput 297.5240274437999 massoutput 297.5240274438 massbalance -5.6843418860808015E-14 gasout 189.62741472373315 liquidout 107.89661272006681 pressure 1.12 temperature 202.0 feedtotray 0.0
component water tray 1 number of input streams 4 massinput 394.70646120515784 massoutput 394.70646120515784 massbalance 0.0 gasout 97.1824307991609 liquidout 297.52403040599694 pressure 1.12 temperature 142.57300148151666 feedtotray 205.04460210471808
component water tray 2 number of input streams 2 massinput 97.23631833006357 massoutput 97.23631833006361 massbalance -4.263256414560601E-14 gasout 97.2147250964021 liquidout 0.021593233661507148 pressure 1.12 temperature 142.43576148327776 feedtotray 0.0
component water tray 3 number of input streams 1 massinput 97.2147250964021 massoutput 97.2147250964021 massbalance 0.0 gasout 95.16561915206086 liquidout 2.0491059443412443 pressure 1.12 temperature 95.0 feedtotray 0.0