[DuMuX] Release 3.0.0

2018-12-21 Thread Timo Koch

We happily and proudly announce today's release of DuMuX 3.0!

You may get the new release via git

git clone -b releases/3.0 
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git


or you can download the tarball at 
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/archive/3.0.0/dumux-3.0.0.tar.gz


DuMuX 3.0 is a major version update. It is not backward compatible in 
all aspects to 2.12. The following minor version updates will be, as 
before for the DuMuX 2-series, always backward compatible to at least 
the last minor version update. DuMuX 3.0 is based on Dune 2.6 and is 
expected to run with the current Dune master.


The tutorial has been replaced by the new module `dumux-course` which is 
accessible at 
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course. We 
recommend new users and also users experienced with DuMuX 2.X to clone 
the course and have a look at the exercises in there.


There are numerous improvements and enhancements. On the general side, 
there are, among many others:


- New style main files: The sequence of simulation steps was linearized, 
meaning that each step is visible in the program's main file. In the new 
main files, one can clearly see the io, initialization, assembly, 
solving, update, time loop, etc., of the program. This renders it 
possible to customize the program flow to the individual needs in a much 
easier and much more transparent way.


- Property system and runtime parameters: All macros have been replaced 
by native C++!


- TypeTag templates: In order to avoid unnecessary dependencies and 
allow to share class instantiations between problems using different 
TypeTags, we replaced the single TypeTag parameter by a small number of 
specific template arguments for many classes. On the surface, this is 
visible in the SpatialParams classes. , We encourage everyone to avoid 
TypeTag as a template argument for class templates, apart from the top 
problem class.


- Assembly: The assembler can now assemble implicit and explicit Euler 
time discretizations.



In terms of models, physics and methods, also a lot has happened, of 
course all to the better. A small subset is:


- MPFA schemes: The new core comes with a framework for MPFA schemes, in 
which currently the only available scheme is the MPFA-O scheme. It can 
be used in conjunction with any DuMuX model and also works on surface grids.


- Box-dfm: The `2pdfm` model from version 2.12 has been generalized such 
that it can be used on any DuMuX model and in both two and three dimensions.


- Tracer transport: A new model for tracer transport with a given flow 
field has been added. The model can be also used to implement 
sequentially coupled simulations, or iterative solvers where flow and 
transport are decoupled / weakly coupled.


- Mineralization: An adapter model for mineralization has been added and 
can be used with all porousmediumflow models. A balance for the solid 
volume fraction of precipitating, adsorbed, or absorbed substances is 
added to the existing equations.


- Multidomain: DuMuX 3.0 introduces a new multidomain framework which 
does no longer depend on `dune-multidomain` and can be used for the 
coupling  of an arbitrary number of subdomains. The sub-domains can be 
regions in which different sets of equations are solved and/or which 
have different dimensionalities.


- Free-flow models: The previous Navier-Stokes model using the box 
method has been replaced by one that employs a staggered grid 
discretization. The new method does not  require any stabilization 
techniques



A more extended list of changes and more detailed explanations are 
provided at 
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/blob/master/CHANGELOG.md.


We would be very happy to help you with migrating your code. To this 
end, have a look at 
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/wikis/Updating-programs-from-version-2.12-to-version-3.0.


Thanks to Zenodo, the release can (and should) be cited as:

Koch, T., Gläser, D., Weishaupt, K., Ackermann, S., Beck, M., Becker, 
B., Burbulla, S., Class, H., Coltman, E., Fetzer, T., Flemisch, B., 
Grüninger, C., Heck, K., Hommel, J., Kurz, T., Lipp, M., Mohammadi, F., 
Schneider, M., Seitz, G., Scholz, S. and F. Weinhardt. DuMuX 3.0.0. 
https://doi.org/10.5281/zenodo.2479595.


See also the BibTex entry below.

On the behalf of all developers, I wish you all the best using DuMuX 
3.0, merry christmas and a happy new year!


Timo


@misc{koch_timo_2018_2479595,
  author   = {Koch, Timo and
  Gläser, Dennis and
  Weishaupt, Kilian and
  Ackermann, Sina and
  Beck, Martin and
  Becker, Beatrix and
  Burbulla, Samuel and
  Class, Holger and
  Coltman, Edward and
  Fetzer, Thomas and
  Flemisch, Bernd and
  Grüninger, Christoph and
   

Re: [DuMuX] 1d simulations

2018-12-21 Thread Bernd Flemisch

Hi Lorenzo,

the example that you are referring to uses a 2d grid for an effectively 
1d problem.


Dumux can also perform real 1d simulations.

The dimension usually is induced from the number that is passed to the 
grid class instantiation:

SET_TYPE_PROP(LensCCProblem, Grid, Dune::UGGrid<2>);
The "2" in there.

For a real 1d simulation, have a look at `test_generalizeddirichlet` in 
`test/porousmediumflow/2p/implicit`.


Kind regards
Bernd

On 12/21/2018 11:23 AM, lc wrote:


Hello,

yes, I saw the example in the dumux-lecture.

Is it the dimension induced by the Grid definition in the input file: 
Cells 100 1 ?


And consequently the system of equations solved is 1d?

Thank you,

Lorenzo

On 21.12.2018 11:52, Timo Koch wrote:



Am 21.12.2018 um 08:39 schrieb lc >:



Good morning,

I have one general question:

is it possible to run 1 dimensional test case, for example, buckely 
leverett?




yes.

Timo


Kind regards,

Lorenzo


On 19.12.2018 13:26, Timo Koch wrote:


Hi Lorenzo,

does it get better if you lower the CFL factor?

Timo

On 19.12.18 11:10, lc wrote:

Hello,

I observed an unexpected behaviour for which I'd like to ask your 
help. In the attached figure you can see a snapshot of the 
solution. In both the contour and in the line chart you may notice 
some spurious "background noize". I noticed that such effects 
starts at a certain time from the right (outlet) boundary and then 
increase entity and becomes as you see.


I think it could be due to the fact that my initial condition is 
not consistent with boundary condition but it is just an 
hypothesis. I enclose the file where you can read the IC.


I would like to ask if you ever noticed some similar effect and 
possible ways to fix it.


About fixing, I had 2 ideas:

1) to add an "epsilon" premultiplying the wetting phase saturation 
term which I expect should dump it out; (how to do it?)


2) to add a cut-off function to the initial.

Is there anything like this availble in DuMux?

Or should I use the regularization of the saturation, which now I 
don't use?


I use DuMux 2.12.


Thank you,

Lorenzo


On 17.12.2018 16:43, Dennis Gläser wrote:

Hi Lorenzo,

sorry, I didn't realize that you were using Dumux2.12. In this 
case, forget my last mail. In the future, please try to reply to 
previous mails of the conversation so that they can be read (I am 
sure you mentioned somewhere that you were using 2.12).


In DuMuX2.12 there was no support for a spatially varying 
definition of the wetting/non-wetting phase. Using 2.12 you can 
obtain the wetting/non-wetting phase mass conservation equation 
indices from the Indices class via Indices::contiWEqIdx and 
Indices::contiNEqIdx.


Best wishes,

Dennis


On 17.12.18 14:33, Dennis Gläser wrote:

Hi Lorenzo,

you have to distinguish between primary variable indices and 
equation indices. Your equations (2p model) are always the mass 
balances of the two phases, independent of you choice of primary 
variables. In 2p/implicit/incompressible/problem.hh you have an 
example on how to adress the equation indices:


using Indices = typename GetPropTypeProperties::ModelTraits>::Indices;

enum {
    pressureH2OIdx = Indices::pressureIdx,
    saturationDNAPLIdx = Indices::saturationIdx,
    contiDNAPLEqIdx = Indices::conti0EqIdx + 
FluidSystem::comp1Idx,

    waterPhaseIdx = FluidSystem::phase0Idx,
    dnaplPhaseIdx = FluidSystem::phase1Idx
};

In this case DNAPL is the non-wetting phase. The equation index 
is adressed via Indices::conti0EqIdx (which gives the index of 
the first mass balance equation within your vector of equations) 
plus the component index of the first component in the fluid 
system.


So, in order to determine the right equation indices for the 
phases of your fluid system within the equation vector, you need 
to use conti0EqIdx and then add the index of the respective 
components of your fluid system.


I am sorry if my last answer wasn't adressing the right issue. 
Also, it seems that I wrote the default formulation is pw-sn. 
That is wrong, the default formulation is p0s1, meaning that the 
pressure primary variable is associated with the phase with 
index 0 of your fluid system, and the saturation variable is 
associated with the phase with index 1 of your fluid system. You 
can change this to p1s0, if desired.


However, from the indices you can only obtain pressureIdx or 
saturationIdx (there is no such thing as Indice::snIdx anymore), 
as DuMuX can not decide for you which phase is the wetting phase 
or which the non-wetting phase. You tell DuMux which phase is 
the wetting phase by implementing the function wettingPhase() or 
wettingPhaseAtPos() in your spatial parameters.


I hope this helps you!

Best wishes,

Dennis




On 17.12.18 13:51, lc wrote:

Hello,


On 02.11.2018 10:45, Dennis Gläser wrote:
per default, the formulation for the 2p model is pw-sn. That 
means your primary variables are the water pressure a

Re: [DuMuX] 1d simulations

2018-12-21 Thread lc

Hello,

yes, I saw the example in the dumux-lecture.

Is it the dimension induced by the Grid definition in the input file: 
Cells 100 1 ?


And consequently the system of equations solved is 1d?

Thank you,

Lorenzo

On 21.12.2018 11:52, Timo Koch wrote:



Am 21.12.2018 um 08:39 schrieb lc >:



Good morning,

I have one general question:

is it possible to run 1 dimensional test case, for example, buckely 
leverett?




yes.

Timo


Kind regards,

Lorenzo


On 19.12.2018 13:26, Timo Koch wrote:


Hi Lorenzo,

does it get better if you lower the CFL factor?

Timo

On 19.12.18 11:10, lc wrote:

Hello,

I observed an unexpected behaviour for which I'd like to ask your 
help. In the attached figure you can see a snapshot of the 
solution. In both the contour and in the line chart you may notice 
some spurious "background noize". I noticed that such effects 
starts at a certain time from the right (outlet) boundary and then 
increase entity and becomes as you see.


I think it could be due to the fact that my initial condition is 
not consistent with boundary condition but it is just an 
hypothesis. I enclose the file where you can read the IC.


I would like to ask if you ever noticed some similar effect and 
possible ways to fix it.


About fixing, I had 2 ideas:

1) to add an "epsilon" premultiplying the wetting phase saturation 
term which I expect should dump it out; (how to do it?)


2) to add a cut-off function to the initial.

Is there anything like this availble in DuMux?

Or should I use the regularization of the saturation, which now I 
don't use?


I use DuMux 2.12.


Thank you,

Lorenzo


On 17.12.2018 16:43, Dennis Gläser wrote:

Hi Lorenzo,

sorry, I didn't realize that you were using Dumux2.12. In this 
case, forget my last mail. In the future, please try to reply to 
previous mails of the conversation so that they can be read (I am 
sure you mentioned somewhere that you were using 2.12).


In DuMuX2.12 there was no support for a spatially varying 
definition of the wetting/non-wetting phase. Using 2.12 you can 
obtain the wetting/non-wetting phase mass conservation equation 
indices from the Indices class via Indices::contiWEqIdx and 
Indices::contiNEqIdx.


Best wishes,

Dennis


On 17.12.18 14:33, Dennis Gläser wrote:

Hi Lorenzo,

you have to distinguish between primary variable indices and 
equation indices. Your equations (2p model) are always the mass 
balances of the two phases, independent of you choice of primary 
variables. In 2p/implicit/incompressible/problem.hh you have an 
example on how to adress the equation indices:


using Indices = typename GetPropTypeProperties::ModelTraits>::Indices;

enum {
    pressureH2OIdx = Indices::pressureIdx,
    saturationDNAPLIdx = Indices::saturationIdx,
    contiDNAPLEqIdx = Indices::conti0EqIdx + 
FluidSystem::comp1Idx,

    waterPhaseIdx = FluidSystem::phase0Idx,
    dnaplPhaseIdx = FluidSystem::phase1Idx
};

In this case DNAPL is the non-wetting phase. The equation index 
is adressed via Indices::conti0EqIdx (which gives the index of 
the first mass balance equation within your vector of equations) 
plus the component index of the first component in the fluid system.


So, in order to determine the right equation indices for the 
phases of your fluid system within the equation vector, you need 
to use conti0EqIdx and then add the index of the respective 
components of your fluid system.


I am sorry if my last answer wasn't adressing the right issue. 
Also, it seems that I wrote the default formulation is pw-sn. 
That is wrong, the default formulation is p0s1, meaning that the 
pressure primary variable is associated with the phase with index 
0 of your fluid system, and the saturation variable is associated 
with the phase with index 1 of your fluid system. You can change 
this to p1s0, if desired.


However, from the indices you can only obtain pressureIdx or 
saturationIdx (there is no such thing as Indice::snIdx anymore), 
as DuMuX can not decide for you which phase is the wetting phase 
or which the non-wetting phase. You tell DuMux which phase is the 
wetting phase by implementing the function wettingPhase() or 
wettingPhaseAtPos() in your spatial parameters.


I hope this helps you!

Best wishes,

Dennis




On 17.12.18 13:51, lc wrote:

Hello,


On 02.11.2018 10:45, Dennis Gläser wrote:
per default, the formulation for the 2p model is pw-sn. That 
means your primary variables are the water pressure and the 
non-wetting phase saturation (in your case oil I assume). 
Therefore, Indices::swIdx does not exists as it is not part of 
your primary variables.



then, if physically I have a water (wetting) phase injection at 
inlet (which traduces into a mass flow rate) how can I impose it 
in 2p implicit model?



Best regards,

Lorenzo

___
Dumux mailing list
Dumux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listin

Re: [DuMuX] 1d simulations

2018-12-21 Thread Timo Koch


> Am 21.12.2018 um 08:39 schrieb lc :
> 
> Good morning,
> 
> I have one general question:
> 
> is it possible to run 1 dimensional test case, for example, buckely leverett?
> 

yes. 

Timo
> Kind regards,
> 
> Lorenzo
> 
> 
> 
>> On 19.12.2018 13:26, Timo Koch wrote:
>> Hi Lorenzo,
>> 
>> does it get better if you lower the CFL factor?
>> 
>> Timo
>> 
>>> On 19.12.18 11:10, lc wrote:
>>> Hello, 
>>> 
>>> I observed an unexpected behaviour for which I'd like to ask your help. In 
>>> the attached figure you can see a snapshot of the solution. In both the 
>>> contour and in the line chart you may notice some spurious "background 
>>> noize". I noticed that such effects starts at a certain time from the right 
>>> (outlet) boundary and then increase entity and becomes as you see. 
>>> 
>>> I think it could be due to the fact that my initial condition is not 
>>> consistent with boundary condition but it is just an hypothesis. I enclose 
>>> the file where you can read the IC. 
>>> 
>>> I would like to ask if you ever noticed some similar effect and possible 
>>> ways to fix it. 
>>> 
>>> About fixing, I had 2 ideas: 
>>> 
>>> 1) to add an "epsilon" premultiplying the wetting phase saturation term 
>>> which I expect should dump it out; (how to do it?) 
>>> 
>>> 2) to add a cut-off function to the initial. 
>>> 
>>> Is there anything like this availble in DuMux? 
>>> 
>>> Or should I use the regularization of the saturation, which now I don't 
>>> use? 
>>> 
>>> I use DuMux 2.12. 
>>> 
>>> 
>>> Thank you, 
>>> 
>>> Lorenzo 
>>> 
>>> 
 On 17.12.2018 16:43, Dennis Gläser wrote: 
 Hi Lorenzo, 
 
 sorry, I didn't realize that you were using Dumux2.12. In this case, 
 forget my last mail. In the future, please try to reply to previous mails 
 of the conversation so that they can be read (I am sure you mentioned 
 somewhere that you were using 2.12). 
 
 In DuMuX2.12 there was no support for a spatially varying definition of 
 the wetting/non-wetting phase. Using 2.12 you can obtain the 
 wetting/non-wetting phase mass conservation equation indices from the 
 Indices class via Indices::contiWEqIdx and Indices::contiNEqIdx. 
 
 Best wishes, 
 
 Dennis 
 
 
> On 17.12.18 14:33, Dennis Gläser wrote: 
> Hi Lorenzo, 
> 
> you have to distinguish between primary variable indices and equation 
> indices. Your equations (2p model) are always the mass balances of the 
> two phases, independent of you choice of primary variables. In 
> 2p/implicit/incompressible/problem.hh you have an example on how to 
> adress the equation indices: 
> 
> using Indices = typename GetPropType Properties::ModelTraits>::Indices;
> enum { 
> pressureH2OIdx = Indices::pressureIdx, 
> saturationDNAPLIdx = Indices::saturationIdx, 
> contiDNAPLEqIdx = Indices::conti0EqIdx + FluidSystem::comp1Idx, 
> waterPhaseIdx = FluidSystem::phase0Idx, 
> dnaplPhaseIdx = FluidSystem::phase1Idx 
> }; 
> 
> In this case DNAPL is the non-wetting phase. The equation index is 
> adressed via Indices::conti0EqIdx (which gives the index of the first 
> mass balance equation within your vector of equations) plus the component 
> index of the first component in the fluid system. 
> 
> So, in order to determine the right equation indices for the phases of 
> your fluid system within the equation vector, you need to use conti0EqIdx 
> and then add the index of the respective components of your fluid system. 
> 
> I am sorry if my last answer wasn't adressing the right issue. Also, it 
> seems that I wrote the default formulation is pw-sn. That is wrong, the 
> default formulation is p0s1, meaning that the pressure primary variable 
> is associated with the phase with index 0 of your fluid system, and the 
> saturation variable is associated with the phase with index 1 of your 
> fluid system. You can change this to p1s0, if desired. 
> 
> However, from the indices you can only obtain pressureIdx or 
> saturationIdx (there is no such thing as Indice::snIdx anymore), as DuMuX 
> can not decide for you which phase is the wetting phase or which the 
> non-wetting phase. You tell DuMux which phase is the wetting phase by 
> implementing the function wettingPhase() or wettingPhaseAtPos() in your 
> spatial parameters. 
> 
> I hope this helps you! 
> 
> Best wishes, 
> 
> Dennis 
> 
> 
> 
> 
>> On 17.12.18 13:51, lc wrote: 
>> Hello, 
>> 
>> 
>>> On 02.11.2018 10:45, Dennis Gläser wrote: 
>>> per default, the formulation for the 2p model is pw-sn. That means your 
>>> primary variables are the water pressure and the non-wetting phase 
>>> saturation (in your case oil I assume). Therefore, Indices::swIdx does 
>>> not exists as it i