Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Dynamic pipe simulation #105

Open
JarlPed opened this issue Jan 22, 2021 · 6 comments
Open

[Enhancement] Dynamic pipe simulation #105

JarlPed opened this issue Jan 22, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@JarlPed
Copy link
Contributor

JarlPed commented Jan 22, 2021

Many components in the DWSIM simulation environment can be simulated dynamically, however pipes are not. I usually find myself producing solutions that has the flow rate settings corresponding to conjugant pressures in down stream material streams. However, it would be nice to have the pipe simulation in a dynamic mode that also can capture the multiphase flow phenomena, such as plug flow and the like, in addition to controller response.

I have a background in thermohydraulics, but there are many different approaches. Homogenous Equilibrium Model (HEM) is likely the most straightforward approach, but lacks the the phase slip effect (inhomogenous fluid valocity of phases). I guess the most complete approach is a Navier-Stokes based model equation with energy conservation.

Any thoughts about this improvement, and which approach should be pursued first?

@DanWBR
Copy link
Owner

DanWBR commented Jan 22, 2021

I was thinking about working on the complete approach, but this is not on my priority list. If someone wants to implement such a model, it just needs to work on the RunDynamicModel() procedure of the Pipe class. There is a single AccumulationStream (an internal material stream representing the accumulation volume) instance that can be worked on but the developer can choose to use a list of accumulation streams like I do on the PFR.

@JarlPed
Copy link
Contributor Author

JarlPed commented Jan 27, 2021

Thanks Daniel,

What comes to mind is the complexity of the different phases. Solids are particular tricky, as one has to specify particle sizing, or rather a distribution of sizes. I know Schlumberger OLGA uses a two Liquid bulk and droplet model with gas phase interaction to model Water-Oil-Gas systems. Also, DWSIM models the PVT for VLLS systems (apparently, Mercury-Water-Decane erroneously separates to a Mercury phase and a Water-Decane mix.).

I guess that a fair approach is to support VLL systems, and issue an error if a solid phase is present. The bulk-droplet liquid model should be able to conceptually, simulate an N-liquid and gas material streams.

The discharge coefficients could be calculated according to the paper: https://www.researchgate.net/publication/281775227_Multiphase_Flow_of_Hydrocarbon_Fluids_through_Orifices_Validation_of_OLGA_2000_Flow_Model
The model should closely resemble the single liquid model in the paper, with additions of the second bulk-droplet liquid equations and couplings: https://onepetro.org/PO/article-abstract/6/02/171/53376/The-Dynamic-Two-Fluid-Model-OLGA-Theory-and?redirectedFrom=fulltext

@DanWBR
Copy link
Owner

DanWBR commented Jan 27, 2021

@JarlPed the mercury-water-decane system may need some adjusted binary interaction parameters. I'm not sure if I've included BIPS for Mercury-C10 and Mercury-H2O.

@JarlPed
Copy link
Contributor Author

JarlPed commented Jan 27, 2021

@DanWBR , I can see that SVLLE (i.e. two liquids) supported at the time being for the Flash equilibria settings (dunno how certain phases are to be fused in this framework). It's known that up to 8 different liquid can co-exist: https://en.wikipedia.org/wiki/Multiphasic_liquid
Anyway, it's beyond the scope of this Issue.

For now, simple discharge calculations is probably sufficient, and the model equations would have to be initialized automatically wrt. to the number of phases.

@JarlPed
Copy link
Contributor Author

JarlPed commented Feb 12, 2021

Hi @DanWBR . I'm looking into an approach to model the differential equations and find that the best option is probably to use a symbolic algebra system (i.e. MathNet.Symbolics) to write up the equations more or less as from that from the papers. The algebra system can rearrange the equations to a form suitable for a numerical solution.

I think the MacCormack solution scheme is the easiest to implement, but also an N-corrector method is also fairly straightforward.

We're looking at adding an aditional dependency for DWSIM.UnitOperations and DWSIM.Math (or else where to place the numerical solution scheme).

@AlexanderSemenyak
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants