Re: [DuMuX] using el2p with fluid flow

2019-02-25 Thread Martin Alberto Diaz Viera
Hi Bernd,

Thank you for your quick reply.
We will try your suggestions.

Best regards

Martin

Get Outlook for Android<https://aka.ms/ghei36>



From: Flemisch, Bernd
Sent: Monday, February 25, 2:41 AM
Subject: AW: [DuMuX] using el2p with fluid flow
To: DuMuX User Forum, Martin Alberto Diaz Viera


Hi,

we are pretty convinced that the model works not only for the provided test 
cases. It has been used for several journal publications and doctoral theses. 
You are welcome to clone https://git.iws.uni-stuttgart.de/dumux-pub/beck2019a 
to test other settings and also the decoupled version.

Martin Beck currently implements the Mandel problem into the abovementioned 
module. For this problem, the storage term differs slightly from the currently 
implemented one. We will let you know once it is available. Afterwards, we will 
also port the setup to 3.0 to have it available as a permanent test.

Kind regards
Bernd

--
___

Bernd Flemisch phone: +49 711 685 69162
IWS, Universität Stuttgart fax:   +49 711 685 60430
Pfaffenwaldring 61email: be...@iws.uni-stuttgart.de
D-70569 Stuttgarturl: www.hydrosys.uni-stuttgart.de
___


Von: Dumux  im Auftrag von Martin Diaz 
Viera 
Gesendet: Freitag, 22. Februar 2019 23:46
An: DuMuX User Forum; Koch, Timo; Edscott Wilson; Ed Scott Wilson Garcia; 
Martin Diaz
Betreff: Re: [DuMuX] using el2p with fluid flow

Dear Timo,

Let me introduce myself in this talk.
Edscott has been able to successfully develop a program based on Dumux 2.12 for 
the problem of low salinity water injection in the last year.
In these moments we have a geomechanics project where we are even going to 
model the effects of fractures. We start with the linear elasticity model 
(elastic) and until now everything has worked as specified in the 
documentation. But with the problems "el1p2c" and "el2p" we have serious 
difficulties. I do not know if you could be so kind to help us as it seems that 
they only work for the particular test cases.
In the problem el1p2c we would like it to be simplify to "el1p", i.e., a single 
component, and we would like to implement a Mandel-type problem (poroelastic 
problem).  We have the same problem already implemented in COMSOL and in FEniCS 
and it gives the correct results. I wonder if I send you the data you or 
anybody else from your team could try to implement it?

Thank you very much in advance.

Regards,

Martin

--
__
Dr. Martín A. Díaz Viera
Instituto Mexicano del Petróleo
Gerencia de Ingeniería de Recuperación Adicional
Edificio 6, Cubículo 112
Eje Central Lázaro Cárdenas Norte 152,
San Bartolo Atepehuacan,
Gustavo A. Madero,
Ciudad de México, C.P. 07730
Tel.: (5255) 9175-6473
E-mail: mdi...@imp.mx<mailto:mdi...@imp.mx>, 
mdiaz...@yahoo.com.mx<mailto:mdiaz...@yahoo.com.mx>
WEB Page: http://www.esmg-mx.org/


El viernes, 22 de febrero de 2019 15:25:16 GMT-6, Timo Koch 
 escribió:


Hi Edscott,

Martin Beck implemented exactly that in his PhD thesis in Dumux 2.12 and the 
code should be somewhere (check dumux-pub) or ask Martin.

Also this should be much easier to do in Dumux 3.0, as the structure was 
developed with something like sequential coupling in mind.

Timo

Am 22.02.2019 um 21:58 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:

I’ve kind of given up on this approach. What I want to try next is to create a 
multiprocess run, with an elastic model coupled sequentially with a 2p model. 
The first process will solve for the deformations (preferably with the el2p 
pdelab formula). This should give me a pressure distribution in the grid. Then 
use this pressure distribution to feed a 2p model for a single iteration with 
an outflow condition. This would have to spin until pressure converges. Once 
that happens, go back to the elastic and start again.

Basically all I want to do for the moment is to emulate a Mandel problem, where 
we have a constant vertical pressure on top, no flow on the bottom and on the 
left, no vertical deformation on the left side and no horizontal deformation on 
the bottom. The right side is  left open both the deformation and fluid flow. 
Fluid will be squished out.




De: Dumux [mailto:dumux-boun...@listserv.uni-stuttgart.de] En nombre de Timo 
Koch
Enviado el: viernes, 22 de febrero de 2019 02:47 p. m.
Para: DuMuX User Forum
Asunto: Re: [DuMuX] using el2p with fluid flow


Am 21.02.2019 um 23:50 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:

I'm trying to use the el2p example program to construct a program with 
inflow/outflow. In order to test the feasibility, after simplifying to 2 
dimensions instead of 3, I have used the data from a working problem with the 
2p model. On the first test, set the boundary conditions all

Re: [DuMuX] using el2p with fluid flow

2019-02-25 Thread Ed Scott Wilson Garcia
Thanks a lot, Bernd. I've cloned the branches specified in the README.md file 
and will work on it today and let you know how things turn out, one way or 
another.

Best regards,

Edscott

Saludos!




On Mon, Feb 25, 2019 at 4:41 AM -0600, "Flemisch, Bernd" 
mailto:bernd.flemi...@iws.uni-stuttgart.de>>
 wrote:


Hi,


we are pretty convinced that the model works not only for the provided test 
cases. It has been used for several journal publications and doctoral theses. 
You are welcome to clone https://git.iws.uni-stuttgart.de/dumux-pub/beck2019a 
to test other settings and also the decoupled version.


Martin Beck currently implements the Mandel problem into the abovementioned 
module. For this problem, the storage term differs slightly from the currently 
implemented one. We will let you know once it is available. Afterwards, we will 
also port the setup to 3.0 to have it available as a permanent test.


Kind regards

Bernd


--
___

Bernd Flemisch phone: +49 711 685 69162
IWS, Universität Stuttgart fax:   +49 711 685 60430
Pfaffenwaldring 61email: be...@iws.uni-stuttgart.de
D-70569 Stuttgarturl: www.hydrosys.uni-stuttgart.de
___



Von: Dumux  im Auftrag von Martin Diaz 
Viera 
Gesendet: Freitag, 22. Februar 2019 23:46
An: DuMuX User Forum; Koch, Timo; Edscott Wilson; Ed Scott Wilson Garcia; 
Martin Diaz
Betreff: Re: [DuMuX] using el2p with fluid flow

Dear Timo,

Let me introduce myself in this talk.
Edscott has been able to successfully develop a program based on Dumux 2.12 for 
the problem of low salinity water injection in the last year.
In these moments we have a geomechanics project where we are even going to 
model the effects of fractures. We start with the linear elasticity model 
(elastic) and until now everything has worked as specified in the 
documentation. But with the problems "el1p2c" and "el2p" we have serious 
difficulties. I do not know if you could be so kind to help us as it seems that 
they only work for the particular test cases.
In the problem el1p2c we would like it to be simplify to "el1p", i.e., a single 
component, and we would like to implement a Mandel-type problem (poroelastic 
problem).  We have the same problem already implemented in COMSOL and in FEniCS 
and it gives the correct results. I wonder if I send you the data you or 
anybody else from your team could try to implement it?

Thank you very much in advance.

Regards,

Martin

--
__
Dr. Martín A. Díaz Viera
Instituto Mexicano del Petróleo
Gerencia de Ingeniería de Recuperación Adicional
Edificio 6, Cubículo 112
Eje Central Lázaro Cárdenas Norte 152,
San Bartolo Atepehuacan,
Gustavo A. Madero,
Ciudad de México, C.P. 07730
Tel.: (5255) 9175-6473
E-mail: mdi...@imp.mx<mailto:mdi...@imp.mx>, 
mdiaz...@yahoo.com.mx<mailto:mdiaz...@yahoo.com.mx>
WEB Page: http://www.esmg-mx.org/


El viernes, 22 de febrero de 2019 15:25:16 GMT-6, Timo Koch 
 escribió:


Hi Edscott,

Martin Beck implemented exactly that in his PhD thesis in Dumux 2.12 and the 
code should be somewhere (check dumux-pub) or ask Martin.

Also this should be much easier to do in Dumux 3.0, as the structure was 
developed with something like sequential coupling in mind.

Timo

Am 22.02.2019 um 21:58 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:


I’ve kind of given up on this approach. What I want to try next is to create a 
multiprocess run, with an elastic model coupled sequentially with a 2p model. 
The first process will solve for the deformations (preferably with the el2p 
pdelab formula). This should give me a pressure distribution in the grid. Then 
use this pressure distribution to feed a 2p model for a single iteration with 
an outflow condition. This would have to spin until pressure converges. Once 
that happens, go back to the elastic and start again.



Basically all I want to do for the moment is to emulate a Mandel problem, where 
we have a constant vertical pressure on top, no flow on the bottom and on the 
left, no vertical deformation on the left side and no horizontal deformation on 
the bottom. The right side is  left open both the deformation and fluid flow. 
Fluid will be squished out.









De: Dumux [mailto:dumux-boun...@listserv.uni-stuttgart.de] En nombre de Timo 
Koch
Enviado el: viernes, 22 de febrero de 2019 02:47 p. m.
Para: DuMuX User Forum
Asunto: Re: [DuMuX] using el2p with fluid flow





Am 21.02.2019 um 23:50 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:



I'm trying to use the el2p example program to construct a program with 
inflow/outflow. In order to test the feasibility, after simplifying to 2 
dimensions instead of 3, I have used the data from a working prob

Re: [DuMuX] using el2p with fluid flow

2019-02-25 Thread Ed Scott Wilson Garcia
Thank you Timo, I will look into it today, following the link provided by 
Bernd. I agree with you with respect to dumux 3.0, as it gives the user greater 
control on what happens within the main simulation loop, but for now I'm stuck 
with 2.12, which is also good code.

Best regards,

Edscott

Saludos!




On Fri, Feb 22, 2019 at 3:25 PM -0600, "Timo Koch" 
mailto:timo.k...@iws.uni-stuttgart.de>> wrote:

Hi Edscott,

Martin Beck implemented exactly that in his PhD thesis in Dumux 2.12 and the 
code should be somewhere (check dumux-pub) or ask Martin.

Also this should be much easier to do in Dumux 3.0, as the structure was 
developed with something like sequential coupling in mind.

Timo

Am 22.02.2019 um 21:58 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:

I’ve kind of given up on this approach. What I want to try next is to create a 
multiprocess run, with an elastic model coupled sequentially with a 2p model. 
The first process will solve for the deformations (preferably with the el2p 
pdelab formula). This should give me a pressure distribution in the grid. Then 
use this pressure distribution to feed a 2p model for a single iteration with 
an outflow condition. This would have to spin until pressure converges. Once 
that happens, go back to the elastic and start again.

Basically all I want to do for the moment is to emulate a Mandel problem, where 
we have a constant vertical pressure on top, no flow on the bottom and on the 
left, no vertical deformation on the left side and no horizontal deformation on 
the bottom. The right side is  left open both the deformation and fluid flow. 
Fluid will be squished out.




De: Dumux [mailto:dumux-boun...@listserv.uni-stuttgart.de] En nombre de Timo 
Koch
Enviado el: viernes, 22 de febrero de 2019 02:47 p. m.
Para: DuMuX User Forum
Asunto: Re: [DuMuX] using el2p with fluid flow


Am 21.02.2019 um 23:50 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:

I'm trying to use the el2p example program to construct a program with 
inflow/outflow. In order to test the feasibility, after simplifying to 2 
dimensions instead of 3, I have used the data from a working problem with the 
2p model. On the first test, set the boundary conditions allDirichlet for uxIdx 
and uyIdx and equal to zero. This would be equivalent to null elasticity and 
the model should reduce to the 2p model.
Hi Edscott,

why would it reduce to 2p? You can still have deformations inside the domain.


Formulation was changed from the default to pNsW. And the fluidsystem was 
changed to the oil/water fluidsystem used a working 2p problem.

The boundary conditions are set to:

void boundaryTypesAtPos(BoundaryTypes , const GlobalPosition& 
globalPos) const
{
values.setDirichlet(uxIdx);
values.setDirichlet(uyIdx);

Scalar top = this->bBoxMax()[1];
Scalar bottom = this->bBoxMin()[1];
if (globalPos[1] > top - eps_)
{
   values.setDirichlet(pressureIdx); //  nonwetting pressure
   values.setOutflow(Indices::contiNEqIdx);
}
else // Neumann for the remaining boundaries
   values.setAllNeumann();
}

void neumannAtPos(PrimaryVariables , const GlobalPosition& 
globalPos) const
{
if (globalPos[1] < eps_)
{
auto wflow = -1.37e-3; // water flow at bottom
values[Indices::contiWEqIdx] = wflow;
values[Indices::contiNEqIdx] = 0; // oil flow at bottom
} else {
// no-flow on the remaining Neumann-boundaries.
values[Indices::contiWEqIdx] = 0;
values[Indices::contiNEqIdx] = 0;
}

}

void dirichletAtPos(PrimaryVariables , const GlobalPosition& 
globalPos) const
{
values = 0.0;
Scalar top = this->bBoxMax()[1];
Scalar bottom = this->bBoxMin()[1];
Scalar right = this->bBoxMin()[0];
if (globalPos[1] > top - eps_){
values[Indices::pressureIdx] = 1.72e7;
}
}

  Since "void initialAtPos(PrimaryVariables ,   const GlobalPosition 
)" is ignored, the initial pressure is set withinitial pressure is 
set with:

void initializePressure()
{
for(const auto& vertex : vertices(gridView_))
{
int vIdxGlobal = this->vertexMapper().index(vertex);
GlobalPosition globalPos = vertex.geometry().corner(0);

// initial approximate pressure distribution at start of 
initialization run
pInit_[vIdxGlobal] = -1.72e7;
}
}

Gravity is disabled so depthBore should not have any effect.

Expected result: Should reproduce the 2p flow problem.


why?




Result: Segment violation crash. This is the gdb output following compilation 
with -O0.

Looks like the fluid state is uninitialized. Did you debug and check why it is 
uninitialized? Is the error in Dumux code (does it occur in an

Re: [DuMuX] using el2p with fluid flow

2019-02-25 Thread Flemisch, Bernd
Hi,


we are pretty convinced that the model works not only for the provided test 
cases. It has been used for several journal publications and doctoral theses. 
You are welcome to clone https://git.iws.uni-stuttgart.de/dumux-pub/beck2019a 
to test other settings and also the decoupled version.


Martin Beck currently implements the Mandel problem into the abovementioned 
module. For this problem, the storage term differs slightly from the currently 
implemented one. We will let you know once it is available. Afterwards, we will 
also port the setup to 3.0 to have it available as a permanent test.


Kind regards

Bernd


--
___

Bernd Flemisch phone: +49 711 685 69162
IWS, Universität Stuttgart fax:   +49 711 685 60430
Pfaffenwaldring 61email: be...@iws.uni-stuttgart.de
D-70569 Stuttgarturl: www.hydrosys.uni-stuttgart.de
___



Von: Dumux  im Auftrag von Martin Diaz 
Viera 
Gesendet: Freitag, 22. Februar 2019 23:46
An: DuMuX User Forum; Koch, Timo; Edscott Wilson; Ed Scott Wilson Garcia; 
Martin Diaz
Betreff: Re: [DuMuX] using el2p with fluid flow

Dear Timo,

Let me introduce myself in this talk.
Edscott has been able to successfully develop a program based on Dumux 2.12 for 
the problem of low salinity water injection in the last year.
In these moments we have a geomechanics project where we are even going to 
model the effects of fractures. We start with the linear elasticity model 
(elastic) and until now everything has worked as specified in the 
documentation. But with the problems "el1p2c" and "el2p" we have serious 
difficulties. I do not know if you could be so kind to help us as it seems that 
they only work for the particular test cases.
In the problem el1p2c we would like it to be simplify to "el1p", i.e., a single 
component, and we would like to implement a Mandel-type problem (poroelastic 
problem).  We have the same problem already implemented in COMSOL and in FEniCS 
and it gives the correct results. I wonder if I send you the data you or 
anybody else from your team could try to implement it?

Thank you very much in advance.

Regards,

Martin

--
__
Dr. Martín A. Díaz Viera
Instituto Mexicano del Petróleo
Gerencia de Ingeniería de Recuperación Adicional
Edificio 6, Cubículo 112
Eje Central Lázaro Cárdenas Norte 152,
San Bartolo Atepehuacan,
Gustavo A. Madero,
Ciudad de México, C.P. 07730
Tel.: (5255) 9175-6473
E-mail: mdi...@imp.mx<mailto:mdi...@imp.mx>, 
mdiaz...@yahoo.com.mx<mailto:mdiaz...@yahoo.com.mx>
WEB Page: http://www.esmg-mx.org/


El viernes, 22 de febrero de 2019 15:25:16 GMT-6, Timo Koch 
 escribió:


Hi Edscott,

Martin Beck implemented exactly that in his PhD thesis in Dumux 2.12 and the 
code should be somewhere (check dumux-pub) or ask Martin.

Also this should be much easier to do in Dumux 3.0, as the structure was 
developed with something like sequential coupling in mind.

Timo

Am 22.02.2019 um 21:58 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:


I’ve kind of given up on this approach. What I want to try next is to create a 
multiprocess run, with an elastic model coupled sequentially with a 2p model. 
The first process will solve for the deformations (preferably with the el2p 
pdelab formula). This should give me a pressure distribution in the grid. Then 
use this pressure distribution to feed a 2p model for a single iteration with 
an outflow condition. This would have to spin until pressure converges. Once 
that happens, go back to the elastic and start again.



Basically all I want to do for the moment is to emulate a Mandel problem, where 
we have a constant vertical pressure on top, no flow on the bottom and on the 
left, no vertical deformation on the left side and no horizontal deformation on 
the bottom. The right side is  left open both the deformation and fluid flow. 
Fluid will be squished out.









De: Dumux [mailto:dumux-boun...@listserv.uni-stuttgart.de] En nombre de Timo 
Koch
Enviado el: viernes, 22 de febrero de 2019 02:47 p. m.
Para: DuMuX User Forum
Asunto: Re: [DuMuX] using el2p with fluid flow





Am 21.02.2019 um 23:50 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:



I'm trying to use the el2p example program to construct a program with 
inflow/outflow. In order to test the feasibility, after simplifying to 2 
dimensions instead of 3, I have used the data from a working problem with the 
2p model. On the first test, set the boundary conditions allDirichlet for uxIdx 
and uyIdx and equal to zero. This would be equivalent to null elasticity and 
the model should reduce to the 2p model.

Hi Edscott,



why would it reduce to 2p? You can still have deformations inside the domain.



Formulation was

Re: [DuMuX] using el2p with fluid flow

2019-02-22 Thread Martin Diaz Viera
 Dear Timo,
Let me introduce myself in this talk. 
Edscott has been able to successfully develop a program based on Dumux 2.12 for 
the problem of low salinity water injection in the last year.
In these moments we have a geomechanics project where we are even going to 
model the effects of fractures. We start with the linear elasticity model 
(elastic) and until now everything has worked as specified in the 
documentation. But with the problems "el1p2c" and "el2p" we have serious 
difficulties. I do not know if you could be so kind to help us as it seems that 
they only work for the particular test cases.
In the problem el1p2c we would like it to be simplify to "el1p", i.e., a single 
component, and we would like to implement a Mandel-type problem (poroelastic 
problem).  We have the same problem already implemented in COMSOL and in FEniCS 
and it gives the correct results. I wonder if I send you the data you or 
anybody else from your team could try to implement it?

Thank you very much in advance.

Regards,
Martin
-- 
__ 
Dr. Martín A. Díaz Viera 
Instituto Mexicano del Petróleo 
Gerencia de Ingeniería de Recuperación Adicional 
Edificio 6, Cubículo 112 
Eje Central Lázaro Cárdenas Norte 152, 
San Bartolo Atepehuacan, 
Gustavo A. Madero, 
Ciudad de México, C.P. 07730 
Tel.: (5255) 9175-6473
E-mail: mdi...@imp.mx, mdiaz...@yahoo.com.mx
WEB Page: http://www.esmg-mx.org/


El viernes, 22 de febrero de 2019 15:25:16 GMT-6, Timo Koch 
 escribió:  
 
 Hi Edscott,
Martin Beck implemented exactly that in his PhD thesis in Dumux 2.12 and the 
code should be somewhere (check dumux-pub) or ask Martin. 
Also this should be much easier to do in Dumux 3.0, as the structure was 
developed with something like sequential coupling in mind. 
Timo
Am 22.02.2019 um 21:58 schrieb Ed Scott Wilson Garcia :



#yiv1963932208 #yiv1963932208 -- _filtered #yiv1963932208 
{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv1963932208 
#yiv1963932208 p.yiv1963932208MsoNormal, #yiv1963932208 
li.yiv1963932208MsoNormal, #yiv1963932208 div.yiv1963932208MsoNormal 
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:New 
serif;}#yiv1963932208 a:link, #yiv1963932208 span.yiv1963932208MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv1963932208 a:visited, #yiv1963932208 
span.yiv1963932208MsoHyperlinkFollowed 
{color:purple;text-decoration:underline;}#yiv1963932208 
span.yiv1963932208EstiloCorreo17 
{font-family:sans-serif;color:#1F497D;}#yiv1963932208 
.yiv1963932208MsoChpDefault {font-size:10.0pt;} _filtered #yiv1963932208 
{margin:70.85pt 3.0cm 70.85pt 3.0cm;}#yiv1963932208 
div.yiv1963932208WordSection1 {}#yiv1963932208 
I’ve kind of given up on this approach. What I want to try next is to create a 
multiprocess run, with an elastic model coupled sequentially with a 2p model. 
The first process will solve for the deformations (preferably with the el2p 
pdelab formula). This should give me a pressure distribution in the grid. Then 
use this pressure distribution to feed a 2p model for a single iteration with 
an outflow condition. This would have to spin until pressure converges. Once 
that happens, go back to the elastic and start again.
 
  
 
Basically all I want to do for the moment is to emulate a Mandel problem, where 
we have a constant vertical pressure on top, no flow on the bottom and on the 
left, no vertical deformation on the left side and no horizontal deformation on 
the bottom. The right side is  left open both the deformation and fluid flow. 
Fluid will be squished out.
 
  
 
  
 
  
 
  
 
De: Dumux [mailto:dumux-boun...@listserv.uni-stuttgart.de]En nombre de Timo Koch
Enviado el: viernes, 22 de febrero de 2019 02:47 p. m.
Para: DuMuX User Forum
Asunto: Re: [DuMuX] using el2p with fluid flow
 
  
 
  
 
Am 21.02.2019 um 23:50 schrieb Ed Scott Wilson Garcia :
 

  
 
I'm trying to use the el2p example program to construct a program with 
inflow/outflow. In order to test the feasibility, after simplifying to 2 
dimensions instead of 3, I have used the data from a working problem with the 
2p model. On the first test, set the boundary conditions allDirichlet for uxIdx 
and uyIdx and equal to zero. This would be equivalent to null elasticity and 
the model should reduce to the 2p model.
 

Hi Edscott, 
 
  
 
why would it reduce to 2p? You can still have deformations inside the domain. 
 



 

Formulation was changed from the default to pNsW. And the fluidsystem was 
changed to the oil/water fluidsystem used a working 2p problem.
 
  
 
The boundary conditions are set to:
 
  
 
    void boundaryTypesAtPos(BoundaryTypes , const GlobalPosition& 
globalPos) const
    {
    values.setDirichlet(uxIdx);
    values.setDirichlet(uyIdx);

    Scalar top = this->bBoxMax()[1];
    Scalar bottom = this->bBoxMin()[1];
    if (globalPos[1] > top - eps_)
    {
   values.setDiri

Re: [DuMuX] using el2p with fluid flow

2019-02-22 Thread Timo Koch
Hi Edscott,

Martin Beck implemented exactly that in his PhD thesis in Dumux 2.12 and the 
code should be somewhere (check dumux-pub) or ask Martin. 

Also this should be much easier to do in Dumux 3.0, as the structure was 
developed with something like sequential coupling in mind. 

Timo

> Am 22.02.2019 um 21:58 schrieb Ed Scott Wilson Garcia :
> 
> I’ve kind of given up on this approach. What I want to try next is to create 
> a multiprocess run, with an elastic model coupled sequentially with a 2p 
> model. The first process will solve for the deformations (preferably with the 
> el2p pdelab formula). This should give me a pressure distribution in the 
> grid. Then use this pressure distribution to feed a 2p model for a single 
> iteration with an outflow condition. This would have to spin until pressure 
> converges. Once that happens, go back to the elastic and start again.
>  
> Basically all I want to do for the moment is to emulate a Mandel problem, 
> where we have a constant vertical pressure on top, no flow on the bottom and 
> on the left, no vertical deformation on the left side and no horizontal 
> deformation on the bottom. The right side is  left open both the deformation 
> and fluid flow. Fluid will be squished out.
>  
>  
>  
>  
> De: Dumux [mailto:dumux-boun...@listserv.uni-stuttgart.de] En nombre de Timo 
> Koch
> Enviado el: viernes, 22 de febrero de 2019 02:47 p. m.
> Para: DuMuX User Forum
> Asunto: Re: [DuMuX] using el2p with fluid flow
>  
>  
> Am 21.02.2019 um 23:50 schrieb Ed Scott Wilson Garcia :
> 
>  
> I'm trying to use the el2p example program to construct a program with 
> inflow/outflow. In order to test the feasibility, after simplifying to 2 
> dimensions instead of 3, I have used the data from a working problem with the 
> 2p model. On the first test, set the boundary conditions allDirichlet for 
> uxIdx and uyIdx and equal to zero. This would be equivalent to null 
> elasticity and the model should reduce to the 2p model.
> Hi Edscott,
>  
> why would it reduce to 2p? You can still have deformations inside the domain. 
> 
> 
> Formulation was changed from the default to pNsW. And the fluidsystem was 
> changed to the oil/water fluidsystem used a working 2p problem.
>  
> The boundary conditions are set to:
>  
> void boundaryTypesAtPos(BoundaryTypes , const GlobalPosition& 
> globalPos) const
> {
> values.setDirichlet(uxIdx);
> values.setDirichlet(uyIdx);
> 
> Scalar top = this->bBoxMax()[1];
> Scalar bottom = this->bBoxMin()[1];
> if (globalPos[1] > top - eps_)
> {
>values.setDirichlet(pressureIdx); //  nonwetting pressure
>values.setOutflow(Indices::contiNEqIdx);
> }
> else // Neumann for the remaining boundaries
>values.setAllNeumann();
> }   
> 
>  
> void neumannAtPos(PrimaryVariables , const GlobalPosition& 
> globalPos) const
> {
> if (globalPos[1] < eps_) 
> {
> auto wflow = -1.37e-3; // water flow at bottom 
> values[Indices::contiWEqIdx] = wflow; 
> values[Indices::contiNEqIdx] = 0; // oil flow at bottom
> } else {
> // no-flow on the remaining Neumann-boundaries.
> values[Indices::contiWEqIdx] = 0;
> values[Indices::contiNEqIdx] = 0;
> }
> 
> }   
>  
> void dirichletAtPos(PrimaryVariables , const GlobalPosition& 
> globalPos) const
> {
> values = 0.0;
> Scalar top = this->bBoxMax()[1];
> Scalar bottom = this->bBoxMin()[1];
> Scalar right = this->bBoxMin()[0];
> if (globalPos[1] > top - eps_){
> values[Indices::pressureIdx] = 1.72e7;  
> }
> }
>  
>   Since "void initialAtPos(PrimaryVariables ,   const 
> GlobalPosition )" is ignored, the initial pressure is set 
> withinitial pressure is set with:
>  
> void initializePressure()
> {
> for(const auto& vertex : vertices(gridView_))
> {
> int vIdxGlobal = this->vertexMapper().index(vertex);
> GlobalPosition globalPos = vertex.geometry().corner(0);
> 
> // initial approximate pressure distribution at start of 
> initialization run
> pInit_[vIdxGlobal] = -1.72e7;
> }
> }
>  
> Gravity is disabled so depthBore should not have any effect.
>  
> Expected result: Should reproduce the 2p flow problem.
>  
> 
> why?
>  
> 
> 
>  
> Result: Segment violation crash. This is the gdb output following compilation 
> 

Re: [DuMuX] using el2p with fluid flow

2019-02-22 Thread Ed Scott Wilson Garcia
I’ve kind of given up on this approach. What I want to try next is to create a 
multiprocess run, with an elastic model coupled sequentially with a 2p model. 
The first process will solve for the deformations (preferably with the el2p 
pdelab formula). This should give me a pressure distribution in the grid. Then 
use this pressure distribution to feed a 2p model for a single iteration with 
an outflow condition. This would have to spin until pressure converges. Once 
that happens, go back to the elastic and start again.

Basically all I want to do for the moment is to emulate a Mandel problem, where 
we have a constant vertical pressure on top, no flow on the bottom and on the 
left, no vertical deformation on the left side and no horizontal deformation on 
the bottom. The right side is  left open both the deformation and fluid flow. 
Fluid will be squished out.




De: Dumux [mailto:dumux-boun...@listserv.uni-stuttgart.de] En nombre de Timo 
Koch
Enviado el: viernes, 22 de febrero de 2019 02:47 p. m.
Para: DuMuX User Forum
Asunto: Re: [DuMuX] using el2p with fluid flow


Am 21.02.2019 um 23:50 schrieb Ed Scott Wilson Garcia 
mailto:edsc...@imp.mx>>:

I'm trying to use the el2p example program to construct a program with 
inflow/outflow. In order to test the feasibility, after simplifying to 2 
dimensions instead of 3, I have used the data from a working problem with the 
2p model. On the first test, set the boundary conditions allDirichlet for uxIdx 
and uyIdx and equal to zero. This would be equivalent to null elasticity and 
the model should reduce to the 2p model.
Hi Edscott,

why would it reduce to 2p? You can still have deformations inside the domain.


Formulation was changed from the default to pNsW. And the fluidsystem was 
changed to the oil/water fluidsystem used a working 2p problem.

The boundary conditions are set to:

void boundaryTypesAtPos(BoundaryTypes , const GlobalPosition& 
globalPos) const
{
values.setDirichlet(uxIdx);
values.setDirichlet(uyIdx);

Scalar top = this->bBoxMax()[1];
Scalar bottom = this->bBoxMin()[1];
if (globalPos[1] > top - eps_)
{
   values.setDirichlet(pressureIdx); //  nonwetting pressure
   values.setOutflow(Indices::contiNEqIdx);
}
else // Neumann for the remaining boundaries
   values.setAllNeumann();
}

void neumannAtPos(PrimaryVariables , const GlobalPosition& 
globalPos) const
{
if (globalPos[1] < eps_)
{
auto wflow = -1.37e-3; // water flow at bottom
values[Indices::contiWEqIdx] = wflow;
values[Indices::contiNEqIdx] = 0; // oil flow at bottom
} else {
// no-flow on the remaining Neumann-boundaries.
values[Indices::contiWEqIdx] = 0;
values[Indices::contiNEqIdx] = 0;
}

}

void dirichletAtPos(PrimaryVariables , const GlobalPosition& 
globalPos) const
{
values = 0.0;
Scalar top = this->bBoxMax()[1];
Scalar bottom = this->bBoxMin()[1];
Scalar right = this->bBoxMin()[0];
if (globalPos[1] > top - eps_){
values[Indices::pressureIdx] = 1.72e7;
}
}

  Since "void initialAtPos(PrimaryVariables ,   const GlobalPosition 
)" is ignored, the initial pressure is set withinitial pressure is 
set with:

void initializePressure()
{
for(const auto& vertex : vertices(gridView_))
{
int vIdxGlobal = this->vertexMapper().index(vertex);
GlobalPosition globalPos = vertex.geometry().corner(0);

// initial approximate pressure distribution at start of 
initialization run
pInit_[vIdxGlobal] = -1.72e7;
}
}

Gravity is disabled so depthBore should not have any effect.

Expected result: Should reproduce the 2p flow problem.


why?




Result: Segment violation crash. This is the gdb output following compilation 
with -O0.

Looks like the fluid state is uninitialized. Did you debug and check why it is 
uninitialized? Is the error in Dumux code (does it occur in an unmodified 
setup)? You seem to use a custom fluid system with a member function 
“saturation()”?! It’s not clear to me why any fluid system should have such a 
function...



(gdb) run
Starting program: 
/home/FreeBSD12/home/edscott/geomecanica/projects/el2p/build-cmake/src/el2p 
-ParameterFile ./pd1-el2p.input
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Detaching after fork from child process 26597]
[New Thread 0x747fc700 (LWP 26605)]
[New Thread 0x73eeb700 (LWP 26609)]

Don't panic... !

El2P_TestProblem: Initializing the fluid system for the el2p model
myOilBrine-nt: Using non tabulated H20 properties.
episode set to: 1
Initializing problem 'el2p'
 problem init()
el2pmodel calls: initialPressSat
InitialPr