Re: [DuMux] hydrogen injection setup

2022-05-12 Thread Timo Koch


On 12. May 2022, at 18:27, Pham, Vuong Van 
mailto:vuongvanp...@ku.edu>> wrote:

Hi Timo,
I appreciate your swift response. Thanks for your support, I am now capable of 
setting up my own DuMux model using the resources you suggested.
Regarding the recent recommendation you mentioned in your previous email, I 
went through most of them as you directed. Some additional concerns I have are 
detailed as below:

  1.  In the biomineralization example, there exists “new” solid & fluid 
system(s) in the system as I could not find these systems in my DuMux 
installation folders. In specific, I refer to these files:
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/solidsystems/biominsolids.hh
 (solid system)
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/fluidsystems/icpcomplexsalinitybrine.hh
 (complex brine)
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/fluidsystems/biominsimplechemistry.hh
  2.  Also in the biomineralization example, there exists these files that I am 
not certain about:
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/components/biofilm.hh
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/components/suspendedbiomass.hh

Hi Vuong,

the idea is that you write these files yourself for your specific problem and 
then “inject” them by setting the corresponding property (e.g. FluidSystem) to 
your custom implementation.
So the example gives you an idea how to write such custom solid/fluidsystems 
and components. The same goes for the Problem and SpatialParams classes that 
are always case-specific and therefore custom implementations (usually based on 
some default implementation)
and set via the property system. (Almost every test folder contains a 
“problem.hh”, “spatialparams.hh” and “properties.hh”.)

 *

Taking a look at these files, my conclusion is that, these files are 
problem-specific and are coded inherited on the “base” files or “available” 
files provided in DuMux installation files. So, is there a guideline to code 
such new files (if the system model requires) in order to be compliant with the 
current DuMux installation files? Are there any structures that the new files 
shall follow in order to be compatible with the DuMux installation files?

I agree that this can be a bit tricky. Essentially, in order to find the 
minimal set of interface functions you need to implement you could start from 
(talking about fluid system as an example) an empty class and then add the 
functions that the compiler complains about missing. In practice it’s easier to 
start from a given implementation that you expect to be close to your use case. 
If you are unsure if you really need to implement a certain interface function 
(e.g. fugacityCoefficient) for your model, you can just delete it and see if 
the program still compiles. (The files that come with Dumux are often more 
general so that they can be used by many different models and therefore may 
have more functions implemented than needed by a specific model). The compiler 
will complain when a necessary function is missing.

Sometimes, there is a base class that all implementation inherit from which 
make it possible to only implement a subset of the interface required by Dumux 
(e.g. for the fluid system).
I recommend looking at the tests/examples/lecture/course and try to use these 
implementations as inspiration.

Best wishes
Timo


I hope my question is not that awkward and at least you may give me certain 
instructions. For my recent research needs, DuMux is the most feasible option 
to use.

Best regards,
Vuong Van Pham
Graduate Research Assistant (GRA)
Department of Chemical and Petroleum Engineering (CPE), University of Kansas
Email: vuongvanp...@ku.edu
Phone: +1-(785)-979-2664




From: Timo Koch mailto:timok...@math.uio.no>>
Sent: 12 Tháng Năm 2022 10:28 SA
To: DuMuX User Forum 
mailto:dumux@listserv.uni-stuttgart.de>>
Cc: Pham, Vuong Van mailto:vuongvanp...@ku.edu>>
Subject: Re: [DuMux] hydrogen injection setup

Hi Vuong,

first of all a brief answer:
yes, you can definitely do these things with Dumux,
and no, there is most likely not going to be a ready executable that will 
exactly solve your specific problem.

Did you try the suggestions A) and B) of the answer to your last post? The 
dumux course material should hopefully make it more clear how to setup your own 
model in Dumux.
This is also what the user did whose presentation you linked from the User 
Meeting 2015.

You would usually try to find the model that is closest to your used case, as 
described in the answer to your last post.

As an example:
Let’s say you are going to have hydrogen and water 

Re: [DuMux] hydrogen injection setup

2022-05-12 Thread Pham, Vuong Van
Hi Timo,
I appreciate your swift response. Thanks for your support, I am now capable of 
setting up my own DuMux model using the resources you suggested.
Regarding the recent recommendation you mentioned in your previous email, I 
went through most of them as you directed. Some additional concerns I have are 
detailed as below:

  1.  In the biomineralization example, there exists “new” solid & fluid 
system(s) in the system as I could not find these systems in my DuMux 
installation folders. In specific, I refer to these files:
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/solidsystems/biominsolids.hh
 (solid system)
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/fluidsystems/icpcomplexsalinitybrine.hh
 (complex brine)
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/fluidsystems/biominsimplechemistry.hh
  2.  Also in the biomineralization example, there exists these files that I am 
not certain about:
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/components/biofilm.hh
 *   
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/examples/biomineralization/material/components/suspendedbiomass.hh
Taking a look at these files, my conclusion is that, these files are 
problem-specific and are coded inherited on the “base” files or “available” 
files provided in DuMux installation files. So, is there a guideline to code 
such new files (if the system model requires) in order to be compliant with the 
current DuMux installation files? Are there any structures that the new files 
shall follow in order to be compatible with the DuMux installation files?

I hope my question is not that awkward and at least you may give me certain 
instructions. For my recent research needs, DuMux is the most feasible option 
to use.

Best regards,
Vuong Van Pham
Graduate Research Assistant (GRA)
Department of Chemical and Petroleum Engineering (CPE), University of Kansas
Email: vuongvanp...@ku.edu
Phone: +1-(785)-979-2664




From: Timo Koch 
Sent: 12 Tháng Năm 2022 10:28 SA
To: DuMuX User Forum 
Cc: Pham, Vuong Van 
Subject: Re: [DuMux] hydrogen injection setup

Hi Vuong,

first of all a brief answer:
yes, you can definitely do these things with Dumux,
and no, there is most likely not going to be a ready executable that will 
exactly solve your specific problem.

Did you try the suggestions A) and B) of the answer to your last post? The 
dumux course material should hopefully make it more clear how to setup your own 
model in Dumux.
This is also what the user did whose presentation you linked from the User 
Meeting 2015.

You would usually try to find the model that is closest to your used case, as 
described in the answer to your last post.

As an example:
Let’s say you are going to have hydrogen and water in an aquifer, you will most 
likely have a two-phase two-component system where the components can be 
miscible.
So you could start from a 2p2c test (all tests are located in the “test” folder 
sorted by model type). The test might use water and air instead of water and 
hydrogen. So you have to exchange the constitutive relations in the fluid 
system to your needs (described in the dumux-course).
You might have to increase the number of components so you could have a look at 
a 2pnc (n components) test or at the documented biomineralization example 
(https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/tree/master/examples/biomineralization).

Descriptions of different models can be found in the code documentation (e.g. 
here 
https://dumux.org/docs/doxygen/master/a01603.html),
 or for 2p2c specifically here 
https://dumux.org/docs/doxygen/master/a18478.html

Re: [DuMux] hydrogen injection setup

2022-05-12 Thread Timo Koch
Hi Vuong,

first of all a brief answer:
yes, you can definitely do these things with Dumux,
and no, there is most likely not going to be a ready executable that will 
exactly solve your specific problem.

Did you try the suggestions A) and B) of the answer to your last post? The 
dumux course material should hopefully make it more clear how to setup your own 
model in Dumux.
This is also what the user did whose presentation you linked from the User 
Meeting 2015.

You would usually try to find the model that is closest to your used case, as 
described in the answer to your last post.

As an example:
Let’s say you are going to have hydrogen and water in an aquifer, you will most 
likely have a two-phase two-component system where the components can be 
miscible.
So you could start from a 2p2c test (all tests are located in the “test” folder 
sorted by model type). The test might use water and air instead of water and 
hydrogen. So you have to exchange the constitutive relations in the fluid 
system to your needs (described in the dumux-course).
You might have to increase the number of components so you could have a look at 
a 2pnc (n components) test or at the documented biomineralization example 
(https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/tree/master/examples/biomineralization).

Descriptions of different models can be found in the code documentation (e.g. 
here https://dumux.org/docs/doxygen/master/a01603.html), or for 2p2c 
specifically here https://dumux.org/docs/doxygen/master/a18478.html

Best wishes
Timo


On 11. May 2022, at 18:28, Pham, Vuong Van 
mailto:vuongvanp...@ku.edu>> wrote:

Hi Timo,

I hope this email finds you well. I write this email to concern about the 
capability of DuMux in:

  1.  Simulating hydrogen injection into a reservoir
  2.  Hydrodynamic and biochemical effects are included in the simulation task 
(similarly described in this link that I found in DuMux 
material:https://dumux.org/docs/usermeeting2015/hagemann_dumux.pdf)

Since I spent time searching for the necessary .hh files in DuMux GitLab, but I 
could not find any relevant .hh files to serve the simulation purpose mentioned 
as above. Therefore, I hope that you may give me some advice.

Best regards,
Vuong Van Pham
Graduate Research Assistant (GRA)
Department of Chemical and Petroleum Engineering (CPE), University of Kansas
Email: vuongvanp...@ku.edu
Phone: +1-(785)-979-2664



From: Timo Koch mailto:koch_t...@hotmail.com>>
Sent: 28 Tháng Ba 2022 6:12 SA
To: DuMuX User Forum 
mailto:dumux@listserv.uni-stuttgart.de>>
Cc: Pham, Vuong Van mailto:vuongvanp...@ku.edu>>
Subject: [DuMux] hydrogen injection setup

Hi Vuong,

in short, yes, this is something that Dumux should be good for.

As you didn’t succeed with the help of the examples and tests so far I would 
first recommend two other resources:

A) Try to complete the Dumux course material 
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course
In particular it discusses the basics of using Dumux. And it has an exercise 
and some explanations regarding 2-phase immiscible and compositional models 
(which directly apply to your use case).
More over there are exercises on how to change the fluid system (which you need 
for your hydrogen + water fluid system).

B) There is also some lecture material for 2-phase models here: 
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-lecture/-/tree/master/lecture/efm

In case I have misunderstood your setup and you have a three phase system 
(water, oil, gas) you need to use the 3p (immiscible) or 3p3c (compositional) 
model.
But the resources will still be helpful.

If you know the basics, you need to know which equations you are trying to 
solve and what software components are required for your specific setup.
Some short answers for your point
1. Define grid by Grid.LowerLeft/UpperRight/Cells in the input file (using 
YaspGrid)
2. Implement the well as a source term in the “problem” class (functions 
“source” (interface for volumetric source terms) or “pointSource” (interface 
for points sourc

[DuMux] Dumux 3.5 Release Candidate

2022-05-12 Thread Wang, Yue
Hello everyone,

The first release-candidate for the Dumux Release 3.5 is available. You can 
download the most up-to-date release target here:

https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/tags/3.5.0-rc1,

or just checkout the tag 3.5.0-rc1.

Please keep testing, and let everyone know what errors you get on which 
compilers/versions before May 22.

Thanks for all the patience regarding the delay, and for all of the hard remote 
work!

Yue
___
DuMux mailing list
DuMux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux