Hi Lorenzo,
On 17.10.2018 15:21, lc wrote:
Dear developers and users,
I have some other questions.
1) I successfully ran the tutorial_implicit example from the handbook
2.12. Now, I need to modify such test case in order to be consistent
with my requirements.
In particular, I need to use a different relative permeability and
capillarity pressure laws. In practice:
for the capillarity:
pc(s) = constant1 * (s-s_min)^alpha
for the permeabilities:
kr_w(s) = constant2 * (s-s_min)^beta
kr_n(s) = constant3 * (s_max-s)^beta
with s_min and s_max other two given constants.
So, which is the best way to introduce such laws? And what about the
"regularization"? It should be applied to them also or I use them "as
they are"?
You would create a new class "MyLaw" (or whatever fits best) and a class
"MyLawParams" that has the same interface as BrooksCorey and
BrooksCoreyParams. In particular you need to implement, the pc-function
and the kr-functions. Then you change the property "MaterialLaw" (the
property is usually either set in problem.hh or spatialparams.hh) to use
your class instead of the BrooksCorey class. You don't need to use
regularization, if you don't want to, the same goes for the generalized
EffToAbsLaw which takes care of converting absolute to effective
saturations and the other way around. So you can just replace the whole
thing by your new class.
The parameters go into your "MyLawParams" class and you need an
interface to set them there.
2) About boundary conditions.
Where can I find all the BC that can I impose? Can I impose an
injection velocity and a constant saturation on the left and a
constant pressure and a zero saturation flux on the right? As well as
normal velocity and zero saturation flux up and down (of a 2d
rectangle domain)?
You can impose whatever boundary conditions you want to impose, given
that they are valid for your type of problem. As boundary types Dumux
differs between Dirichlet boundaries and Neumann boundaries. The Neumann
boundary type includes Robin boundary conditions types (which are called
solution dependent Neumann in the code sometimes). At the boundaries
marked as Dirichlet boundary the "dirichlet"/"dirichletAtPos" function
is called, on boundaries marked as Neumann, the "neumann"/"neumannAtPos"
function is called. You can specify where to use which type of boundary
condition using the global position argument.
How you impose boundary conditions also depends on the discretization
scheme you are using. Are you using the Box method or the cell-centered
TPFA method? You cannot impose velocities directly as velocity is not a
unknown in your equations (for the discretization schemes available in
Dumux), you can however impose fluxes on Neumann boundaries, and compute
the flux with your given velocity. You can enforce the pressure and
saturation as Dirichlet boundary conditions.
Also note that Dumux is short before a major version update (from 2.12
to 3.0) with a lot of new features / changes. There will be continued
bugfix support for 2.12, as far as we can handle it. But you might want
to have a look at the new version (master branch). The simulation steps
are easier to understand in the new version. Everything I explained
above also applies for the new version.
There are exercises in the dumux-course module I told you about in my
last mail.
Best wishes
Timo
Thank you,
Lorenzo
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
--
_______________________________________________________________
Timo Koch phone: +49 711 685 64676
IWS, Universität Stuttgart fax: +49 711 685 60430
Pfaffenwaldring 61 email: [email protected]
D-70569 Stuttgart url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux