-
Notifications
You must be signed in to change notification settings - Fork 84
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
Create two phase solver for saturated soil with explicit method #633
Comments
Thanks, Tianchi! Would we be deriving the two Phase particles from Particle or ParticleBase class? So, there will be a lot of virtual functions which won't be active in Particle, is this right? |
Yes, that's true. But It won't be a lot for explicit. |
When we add more phases, this might get more complicated. Could we look at some Design Patterns, and see if we can adapt any of them. I'm tinking of Decorator / Adapter / Proxy https://refactoring.guru/design-patterns/cpp. https://isocpp.org/wiki/faq/multiple-inheritance#mi-example Please let me know your thoughts. |
I would say, for the I am feeling we need to work more on refactoring the solver as some more specialized solvers are starting to get derived from the current |
I agree with Nanda. I think the TwoPhaseParticle deriving for Particle is good for now. For the solver part, I think many functions are generally used for all solvers like the mapping process, applying traction and smoothing pressures. Do you think it's better to package them? Otherwise it's very likely to forget to add them into new solver. |
I'm planning to use the decorator pattern to refactor the Solver, we can have an RFC to discuss that separately. Could we potentially create a new class for Fluid phase functions and then use multiple inheritances to define the TwoPhase Particle with the base being |
@tianchiTJ could you please add ClassNames and their inheritance scheme to your RFC, thank you! |
@kks32 Is that the scheme what you mean? |
One thought I have (as hinted by Krishna) is that maybe we can think a roadmap for two-phase two-points (two layers) and potentially three-phase one-point and so on. Hopefully we don't have to refactor again when we get there. We still can have |
I guess that's better to discuss the refactoring of the solver. I am seeing this as necessary too for the purpose of two-phase two points coupling that I will start soon entering June. I have some ideas in mind.
I am okay with that. But if you are putting a separate class for the fluid part, there are few points that I can raise:
|
When we do TwoPhaseParticle, would all particles be If you have a derived class pointer, then you don't need to define it in ParticleBase. |
@kks32 Is that the particle scheme you mean? |
I think it's simpler to make it in
No. a particle can just be normal Particle or TwoPhaseParticle. The usage is also can be done simultaneously, depends on |
The issue with doing all functions in If we are storing all different types of particles in the How would Initialise HDF5 data would work, would we be storing a lot more data for all the particles? |
@tianchiTJ I just meant adding class names and inheritance to the documentation in RFC. |
An additional argument against deriving classes to handle C++ coding standards: 101 rules - Herb Sutter and Andrei
Effective C++ - Scott Meyers
Hence, deriving |
@tianchiTJ could you please revise your RFC with the new direction in #637 |
@kks32 At the moment they are not derived. The |
@bodhinandach Deriving from particle and having functions specific to the derived types and not on other derived types will violate this rule. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The development to address this RFC is ongoing as can be followed in PR #680 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Create two phase solver for saturated soil with explicit method
Summary
Create
ExplicitTwoPhase
solver with fully saturated condition to carry out the hydraulic coupled computation. A one-point two phase method based on volume fractions is used to represent the solid phase and water phase on the same particle representively.Motivation
Use it to compute the hydraulic coupled problem. It's the foundation of following implementation of
SemiImplicitTwophase
solver and evenThreePhase
solvers.Design Detail
Node base design
The computation is mainly based on solving the momentum balance equations of
mixture
andwater phase
on nodes. (There are three different sections to represent the domain, solid phase, water phase and mixture). As solving two of them is enough to obtain the results, we solve themixture
first and then thewater phase
. Therefore, in thenode
class, all variables, likevelocity
, are designed and stored as 0 formixture
and 1 forwater phase
.Particle class design
Different with the
node
class, all variables in theparticle
class are designed and stored as 0 forsolid
and 1 forwater phase
, which is convenient to represent the effective stress and other variables. A "TwoPhaseParticle" namespace is created to include the functions and variables used.Solver class design
A
mpm-explicit-twophase
is created in the solver class. The main loop is quite similar with thempm-explicit
solver, but the mapping functions are used for each phase separately.compute_pore_pressure
is an important additional function in theTwoPhase
solver based on the Darcy law. The position update is based on the solid phase velocity.Based on porous medium theory:
The
volume_fractions_
is defined in theparticle
class based on the porous medium theory and is used to compute the variables in each phase.Fully saturated condition:
The sum of
volume_fractions_
should be equal to 1 and updated in each step.An option is considered for the choice of formulation type (u-p,u-v-p,u-w-p)
Drawbacks
Rationale and Alternatives
Create semi-implicit solver based on incompressible flow hypothesis in the future.
Prior Art
One can refer to the following papers:
[1] Kafaji, Issam KJ al. Formulation of a dynamic material point method (MPM) for geomechanical problems. 2013.
[2] Jassim, Issam, Dieter Stolle, and Pieter Vermeer. "Two‐phase dynamic analysis by material point method." International journal for numerical and analytical methods in geomechanics 37.15 (2013): 2502-2522.
[3] Zabala F, Alonso E E. Progressive failure of Aznalcóllar dam using the material point method[J]. Géotechnique, 2011, 61(9): 795-808.
The text was updated successfully, but these errors were encountered: