Dear Lorenzo,

you set the residual saturations to
*materialParams_.setSwr(0.2121); **
**materialParams_.setSnr(1.-0.2121)
*which is wrong*.
**
*The pc and kr curves are defined for saturation values
*swr <= sw <= 1-snr * which means for your setting **0.2121 <= sw <= ***0.2121* which is obviously wrong. So Snr has to be smaller than *1.-0.2121. *So in your
case where you define smax = 0.7856 you probably want to set Snr = 1 -smax.

Furthermore, after having a look at your modified Brooks-Corey law it seems that your definitions do not make any sense. Please note that you should define your laws with respect to the effective saturation Se.
*
*Regards,
Martin*
***
**On 10/26/2018 04:35 PM, lc wrote:

Dear developers, maintainers and users,

I'm encountering some difficulties in applying a new Material law which is not regularized and doesn't use EffToAbsLaw.


I did as suggested previously, but when I comment the following lines I get an error:
#include <dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh>
//typedef EffToAbsLaw<RawMaterialLaw> type;

In addition, when I use:
#include <dumux/io/plotmateriallaw.hh>
to plot Pc-Sw and kr profiles, I get constant behaviors.

I start to suspect that I didn't implement the Material Law correctly and these effects are correlated.

To be more clear I add my files.

Can you give me some hint about mistakes, please?


Thanks for help,

Lorenzo

On 17/10/2018 16:53, Timo Koch wrote:

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


--
M.Sc. Martin Schneider
University of Stuttgart
Institute for Modelling Hydraulic and Environmental Systems
Department of Hydromechanics and Modelling of Hydrosystems
Pfaffenwaldring 61
D-70569 Stuttgart
Tel: (+49) 0711/ 685-69159
Fax: (+49) 0711/ 685-60430
E-Mail: [email protected]

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to