Hi Martin,
I've spent the day digging into the differences between the dumux templates
contained within the beck2019a_fullycoupled branch and the templates in the
current releases/2.12 branch.
As you are well aware, the geomechanics/el2p model is not quite the same,
some templates are missing and others are different.
But what really confuses me is how numPhases is defined. This is because I
move the beck2019a_fullycoupled/dumux templates to /opt/dune/include/dumux (my
local installation path) and get the following error on compiling:
/opt/dune2.4/include/dumux/material/fluidsystems/brineco2simple.hh: static
member function 'static Scalar Dumux::FluidSystems::BrineCO2Simple<Scalar,
CO2ble, H2Otype, BrineRawComponent, Brinetype>::viscosity(const FluidState&,
const typena Dumux::FluidSystems::BrineCO2Simple<Scalar, CO2Table, H2Otype,
BrineRawComponent, Britype>::Base::ParameterCache&, int)':
/opt/dune2.4/include/dumux/material/fluidsystems/brineco2simple.hh:1:44: error:
'numPhases' was not declared in this scope
assert(0 <= phaseIdx && phaseIdx < numPhases);
^~~~~~~~~
This error, as you know, does not occur when the program is compiled within the
beck2019a_fullycoupled branch with the procedure detailed in
installBeck2019a.sh.
>From what I gather, NumPhases is declared as a property at
>dumux/porousmediumflow/sequential/properties.hh and defined to the value 2 at
>dumux/geomechanics/el2p/propertydefaults.hh:83, but I cannot find where the
>case sensitive numPhases is defined.
Of course, all I have to do is to add
static constexpr int numPhases = 2;
to theBrineCO2Simple class template for the program to compile and run
correctly, but not knowing the source of numPhases has me running around in
circles.
Could you possibly shed some light on how numPhases is declared?
Best regards,
Edscott
________________________________
From: Martin Beck <[email protected]>
Sent: Tuesday, March 5, 2019 1:34 AM
To: Ed Scott Wilson Garcia; DuMuX User Forum
Cc: Manuel Coronado Gallardo
Subject: Re: [DuMuX] el2p issue almost clear
Hi Edscott,
thanks for your comments!
Just a few words on the purpose of the initialisation: For setting a
hydrostatic pressure over depth as a Dirichlet condition, one usually assumes a
constant density and calculates the pressure from rho * g * depth. Nonetheless,
the density is also pressure dependent, so the idea of the initialization run
is to set the pressure at a boundary with constant depth (either the bottom or
the top) and then get the true pressure distribution from running the model for
a stationary state. This pressure distribution over depth can then be used as
the the boundary condition for the actual simulation. In the problem file, the
pInit is updated via the setPressure function called at the end of the
initialisation. During the initialisation, the coupling between flow and
geomechanics is also switched off (coupled_ = false).
Obviously, there are scenarios, where this pressure-dependence of the density
can be neglected or doesn't play a role at all (e.g. Mandel's problem).
Cheers,
Martin
On 3/4/19 10:48 PM, Ed Scott Wilson Garcia wrote:
Thank you very much, Martin.
I’ve started looking through the code for the Mandel problem and find that
what you mention with regard to the porosity change is dealt with in
elementvolumevariables.hh whenever the bool property UseMandelStorageTerm is
true.
On the other hand, I notice that you have an initialization episode (we were
experimenting without any initialization episode, which maybe a mistake).
Perhaps that is the best way to specify the Mandel problem with mostly
Dirichlet conditions?
BTW, interesting that the approach used by Phillips and Wheeler is the most
frequently applied to existing reservoir engineering simulators, or so they say.
Best regards,
Edscott
De: Martin Beck [mailto:[email protected]]
Enviado el: lunes, 4 de marzo de 2019 02:12 a. m.
Para: DuMuX User Forum; Ed Scott Wilson Garcia
CC: Manuel Coronado Gallardo
Asunto: Re: [DuMuX] el2p issue almost clear
Hi Edscott,
I just committed Mandel's problem to the fully-coupled branch of the Beck2019a
module.
I used the description from Phillips and Wheeler:
https://link.springer.com/article/10.1007/s10596-007-9045-y
For unknown reasons, their storage term is slightly different from the one we
use. In details, it comes down to how the porosity change is described. So to
match the analytical solution, the change in porosity is (co * p + alpha * div
u) for Mandel's problem while all other problem use (phi_0 + alpha * div u).
Let me know if you have further questions!
Cheers,
Martin
On 3/1/19 10:28 PM, Ed Scott Wilson Garcia wrote:
Thank you very much Martin.
When I change the boundary conditions on the 2.12 el2p test, the second episode
will not work. I’ll try it with the SuperLU solver. The initialization episode
has no apparent problem with amg.
I look forward to studing your implementation of the Mandel problem. I tend to
believe all my problems arise from my incorrect understanding of the initial
and boundary conditions.
best regards,
Edscott
De: Dumux [mailto:[email protected]] En nombre de Beck,
Martin
Enviado el: viernes, 1 de marzo de 2019 06:38 a. m.
Para: DuMuX User Forum
CC: Manuel Coronado Gallardo
Asunto: Re: [DuMuX] el2p issue almost clear
Hi Edscott,
the momentum balance for the geomechanics is formulated in an incremental way.
That meens it only considers changes with respect to the initial state.
Nonetheless, the initial stress state matters for post-processing routines such
a the evaluation of the total principal stresses and the failure criteria.
I have another suspicion for your troubles: The standard test in the
2.12-release uses the el2p-amgbackend, which seems to cause problems for some
cases. For that reason, I switched to a direct solver (SuperLU) for my
examples. Maybe this is reason why your problem now works, too?
One more thing: I managed to implement Mandel's problem this week for the fully
coupled version of the code. It works fine and reproduces the analytical
solution quite well. I was trying to implement it also for the decoupled
version, but I ran into some problems. Anyway, I will commit the fully coupled
version to the Beck2019a module on Monday (I am out of office today), so you
can look into it.
Cheers,
Martin
________________________________
From: Dumux
<[email protected]<mailto:[email protected]>>
on behalf of Ed Scott Wilson Garcia <[email protected]<mailto:[email protected]>>
Sent: Thursday, February 28, 2019 11:50:39 PM
To: DuMuX User Forum
Cc: Manuel Coronado Gallardo
Subject: [DuMuX] el2p issue almost clear
One further question, the force that presses down on the grid from the top, is
that not a boundary condition?
I see from the code that it is used to set the initial total stress field
(isotropic, lithostatic),
(i.e. stress[] = brineDensity_ * porosity * gravity * (depthBOR_ -
globalPos[dim-1])
+ (1 - porosity) * rockDensity * gravity * (depthBOR_ -
globalPos[dim-1]);).
If I do not use the force to set a Neumann boundary condition for uy, and
instead use the values Beck2019 uses (all Neumann values set to zero),
the initialization of the El2P_TestProblem problem runs just fine with data
from the Sangnimnuan 2018 paper (injection episode turned off).
If I am not wrong about this, then my whole trouble was with that misleading
fact.
Code from the fullycoupled examples has been most useful, and the decoupled is
very interesting. And I thank Bernd and Beck very much.
Best regards,
Edscott
_______________________________________________
Dumux mailing list
[email protected]<mailto:[email protected]>
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
_______________________________________________
Dumux mailing list
[email protected]<mailto:[email protected]>
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
--
*******************************************************
Martin Beck
Institute for Modelling Hydraulic and Environmental Systems
Department of Hydromechanics and Modelling of Hydrosystems
Pfaffenwaldring 61
D-70569 Stuttgart
Tel.: (+49) 711/ 685-64899
[email protected]<mailto:[email protected]>
*******************************************************
--
*******************************************************
Martin Beck
Institute for Modelling Hydraulic and Environmental Systems
Department of Hydromechanics and Modelling of Hydrosystems
Pfaffenwaldring 61
D-70569 Stuttgart
Tel.: (+49) 711/ 685-64899
[email protected]<mailto:[email protected]>
*******************************************************
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux