Hi Nikolai,
I don't really have time to look into it more but I would like to know
if the saturation profile in the original code looks fine over time, or
does it also look weird? Is it just the beginning? How about setting
Neumann values at the inflow boundary. How does the pressure evolve then
at the very beginning?
We don't usually consider ghost cells. The value is assumed on the face
of the boundary cell, i.e. at the boundary. You have the same material
as inside the cell. Try setting your water saturation to 1-Snr instead
of 0. If you go below the residual saturation, the capillary pressure is
extremely large (actually it's not defined, you just get a value because
it's regularized). By setting an 1-Snr you say anyway that this amount
of oil is going to be immobile, so this shouldn't influence your solution.
If you want a water cell at the boundary you can try adding an actual
layer of cells at the boundary that have a different material law (maybe
pc=0) and a high porosity and high permeability (to model a non-porous
medium). Then you can also set Sw=1 / Sn = 0;
Best wishes
Timo
On 09.08.2018 19:18, Nikolai Andrianov wrote:
Dear DuMuX experts,
I managed to get the boundary values right by modifying darcyslaw.hh
as follows around line 205:
// Obtain inside and outside pressures
//const auto pInside = insideVolVars.pressure(phaseIdx);
//const auto pOutside = outsideVolVars.pressure(phaseIdx);
Scalar pInside, pOutside;
if (!scvf.boundary()) {
// Inside the domain calculate the phase flux using
phase pressures (with pn = pw + pc)
pInside = insideVolVars.pressure(phaseIdx);
pOutside = outsideVolVars.pressure(phaseIdx);
}
else {
// Do not include the contributions from capillary
forces for boundary fluxes
//static_assert( (VolumeVariables::priVarFormulation()
== TwoPFormulation::p0s1), "darcyslaw.hh: BC implemented for p0s1
formulation only!");
pInside = insideVolVars.pressure(0); // Set pn :=
pw, i.e. pc = 0 for the cells adjacent to the boundary face
pOutside = outsideVolVars.pressure(0);
}
// return flux
return fluxVarsCache.advectionTij()*(pInside - pOutside);
In effect, I am trying to remove the contribution from capillary
forces in Dirichlet ghost cells (there is no porous medium in ghost
cells).
However, both the pressure and the saturation field still look weird,
see the attached screenshots. It seems that the water front is not
really moving into the domain.
Your help is greatly appreciated!
Many thanks,
Nikolai
------------------------------------------------------------------------
*From:* Dumux <dumux-boun...@listserv.uni-stuttgart.de> on behalf of
Nikolai Andrianov <nand...@dtu.dk>
*Sent:* Wednesday, August 8, 2018 10:23 AM
*To:* Timo Koch; DuMuX User Forum
*Subject:* Re: [DuMuX] Non-constant pressure BC for non-zero capillary
pressure
Hi Timo,
Thank you for your feedback.
I have updated the README.md of the project with some screenshots and
more detailed description of the problem, please have a look at
https://git.iws.uni-stuttgart.de/andrian/rate-sens-nofrac.
Agree on your points for the cell-centered TPFA scheme, but as you can
see at the README.md, there are order of magnitude difference between
the obtained and expected pressure fields…
Can it be that I am setting pressure BC not on a wetting pressure but
some other quantity?. How can I set the pressure BC on the wetting
phase pressure?
Thanks,
Nikolai
*From:*Timo Koch <timo.k...@iws.uni-stuttgart.de>
*Sent:* Tuesday, August 7, 2018 18:41
*To:* DuMuX User Forum <dumux@listserv.uni-stuttgart.de>
*Cc:* Nikolai Andrianov <nand...@dtu.dk>
*Subject:* Re: [DuMuX] Non-constant pressure BC for non-zero capillary
pressure
Hi Nikolai,
It's a bit hard to say without seeing the results. Can you provide
some screenshot or something so that it is clear how much the pressure
is deviation where and when (only at the beginning of the simulation)?
One thing that might help: you are using the cell-centered TPFA scheme
so Dirichlet boundary conditions are imposed weakly on the boundary
faces. This means that if you visualize the cell center degrees of
freedom, they are not actually equal to the boundary values, they are
rather the values half a cell away from the boundary. So if you start
with a large saturation gradient (from sw=swr to sw=1 at the boundary)
it might take some time until the pressure in the boundary cell is
close to the Dirichlet value.
Best wishes
Timo
On 07.08.2018 18:00, Nikolai Andrianov wrote:
Dear DuMuX experts,
I wonder what can be the reason for the following strange behavior
I observe with a simple waterflooding simulation.
It is a water injection into an oil-saturated 2D block, the fluids
are considered as incompressible. Dirichlet boundary conditions
are imposed at left and right boundaries, whereas there are
no-flow at top and bottom boundaries. Brooks-Corey relative
permeabilities and capillary pressure curve are used.
Despite the fact, that the boundary conditions are set for the
wetting phase pressure, the pressure values at the boundary appear
to be quite different from the prescribed ones in case of non-zero
capillary pressure. If Pc=0, the pressure boundary values do take
the values prescribed in the problem formulation.
The project is available at
https://git.iws.uni-stuttgart.de/andrian/rate-sens-nofrac, and I
would appreciate if you could comment on what’s going wrong.
Thanks,
Nikolai
PS: I work with the dumux-course branch.
_______________________________________________
Dumux mailing list
Dumux@listserv.uni-stuttgart.de
<mailto:Dumux@listserv.uni-stuttgart.de>
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:timo.k...@iws.uni-stuttgart.de
<mailto:timo.k...@iws.uni-stuttgart.de>
D-70569 Stuttgart url:www.hydrosys.uni-stuttgart.de
<http://www.hydrosys.uni-stuttgart.de>
_______________________________________________________________
--
_______________________________________________________________
Timo Koch phone: +49 711 685 64676
IWS, Universität Stuttgart fax: +49 711 685 60430
Pfaffenwaldring 61 email: timo.k...@iws.uni-stuttgart.de
D-70569 Stuttgart url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________
_______________________________________________
Dumux mailing list
Dumux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux