-
Notifications
You must be signed in to change notification settings - Fork 130
Two-point stress approximation (TPSA) geomechanics #6650
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: master
Are you sure you want to change the base?
Conversation
|
I'll just make one general comment here and then I'll be quiet. Adding 6,600 lines of new code in a single PR, especially since there's hardly any unit tests, is usually not the best way to go about making the PR easy to review. Is there no way to split this up into smaller parts, ideally with documentation and unit test coverage for each part? |
|
Since it's entirely a one way dependency, how about we extract the block size 7 changes and do those first? |
I have made a new PR #6660 with only the block size increase. Thanks for the suggestion @akva2! The number of GPU-related files that needed to be modified was more than I thought initially! I will rebase this PR once the block size PR is merged.
Thanks for the comment @bska. I have added some additional unit tests, including the PR in opm-tests OPM/opm-tests#1440. I hope this covers and shows the workings of the TPSA code better. I can also add that TPSA, structurally speaking, is (almost) a straightforward copy of TPFA in Flow. I hope this will make it easier to review. |
Thanks for adding tests, that certainly aids in the review. Tangentially, my own personal goal when I'm adding new code is to cover the public interface of each new class and public function with a comprehensive set of unit tests. I also try to make adding each class/public function into a separate PR and then having an integration PR at the end that ties everything together and activates the new logic. I don't always achieve this goal but it feels good when I do. |
|
An issue I have found is that the If anyone has any ideas how to get the TPSA parameters in |
|
Sadly this is a limitation of the system. The same applies to other model specific options, such as solvent. To make it work, you have to register the parameters manually, since, as you allude to, they are not registered through the SimulatorFullyImplicitBlackoil::registerParameters() |
|
I had a brief look. This seems very good new contributions. It is an alternative to part of opm-flowgeomechanics, which do vem discretization + some fracturing. You have done a very good job at getting things into the system with models +++, which is partly avoided in opm-flowgeomechanics. Also maybe the work in opm-flowgeomechanics should be changed a bit to be more like "opm" interface as the tpsa uses. Some comments:
|
- TPSA-Flow coupling done at the nonlinear solver step level: - -- Lagged coupling -> TPSA lags behind one time step - -- Fixed-stress -> Iterate until Flow and TPSA converge - Generic TPSA solver using Newton with associated linearizer. - Linear elasticity equations implemented - Specialized version of ISTL linear solver for TPSA - Output to restart files and VTK
Addition of a cross product term for rotation equations.
Thanks for the hint! I have included linear solver and newton parameters for TPSA directly in |
Thanks for the feedback, @hnil. I appreciate you taking the time to have a look at this.
Yes, there may be some classes which I have name somethingTPSA (like
We are still figuring out some of the outputs (particularly stress and strain) and boundary conditions (particularly Robin conditions). It would be worth syncing up with opm-flowgeomechanics, in general, to avoid duplicating code!
Thanks, I will look into hypre-based solvers! ISTL solvers have worked great, at least on the examples we have run so far, which I think is due to the nature of TPSA being closely related to TPFA. |
This PR introduces the implementation of TPSA geomechanics solver with coupling to Flow. Most important features are:
There are blackoil, gas-water dissolution (mostly for CO2-/H2STORE) and one-phase simulators implemented, but in principle any other simulator can be generated as well.
Reference to implementation paper can be found here.
Putting this PR in draft mode since it is rather large, but any feedback/comments/discussion on the implementation is welcome at this point!
Companion PR: OPM/opm-common#4846