-
Notifications
You must be signed in to change notification settings - Fork 38
'sw_steady' protocol for color model #108
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
base: dev
Are you sure you want to change the base?
Conversation
|
My advice would be to add this as a simulation protocol, similar to how others are done https://lbpm-sim.org/userGuide/models/color/index.html#simulation-protocols The advantage to doing it this way is that you can configure the protocol to override any input values that are inconsistent with how the protocol is supposed to behave (e.g. setting periodic boundary conditions or a body force). It should be straightforward to setup a switch to set the boundary conditions, e.g. at lines 141-190 in Some refactoring of |
72d9fef to
3957b9e
Compare
|
@JamesEMcClure Thank you for this suggestion. I agree, this is a better way to do it. I've made the change so that this workflow is a new protocol called 'sw_steady' and added a page to document the protocol. I am still hijacking the other Let me know what you think. |
|
The intent for the implementation of the protocols is that these would be separated out from the low-level lattice Boltzmann model that is implemented in the In an ideal world the protocol should not depend on the physical model. For example, there is also a free energy multiphase model in LBPM. This is just a basic lattice Boltzmann model without most of the the digital rock specific bells and whistles. If you want to simulate incompressible fluids (usually liquid -oil systems) the Color model tends to be the best choice because it minimizes the effects of compressibility and is a good fit for immiscible fluids. If you have liquid-gas systems the free energy models are a better choice. If you want to tune a capillary number, this implementation doesn't need to depend on the underlying lattice Boltzmann model that you choose. So the abstractions to work toward are then:
These would then be building blocks to build new simulators. Ideally you could write a new simulator from these pieces without having to rewrite / refactor the underlying building blocks. We were always trying to work toward having more modularity / composibility, but it is hard to find time to do this. Look in |
3957b9e to
5fb3d9a
Compare
|
Hi @JamesEMcClure Thank you for the comments. I agree with the vision, and think it would make things easier to completely decouple the 'protocol' logic from the 'model' logic. We would need to setup abstract model/protocol classes for this, and have each particular model/protocol be a polymorph. But that will take some time, and I would consider that work outside the scope of this PR. Can we table this idea into a separate issue/feature request so that we can come back to it with another larger refactor PR? |
Feature
lbpm_color_unsteady_simulatormodule to address a common workflow type, where an unsteady state simulation is run at a density/pressure gradient until the water saturation converges.tolerancedatabase parameter and represents the relative change in water saturation per step. The default value is zero, and result in the simulation running all the way totimestepMax.PS, I am not set on the name of this new module and welcome better ideas 😄