Hi Lorenzo,
De: lc [mailto:[email protected]]
Enviado el: lunes, 27 de enero de 2020 12:45 a. m.
Para: Ed Scott Wilson Garcia
Asunto: Re: [DuMuX] about BC and episodes
>Just to give you a better idea, I need to simulate the EOR with
>water-polymer-oil or water-surfactant-oil for horizontal
>and vertical wells. This implies:
>
>1) relative permeabilties, capillary pressure and viscosity also dependent on
>polymer concentration
> About this, as I understand, I should create a new Fluidsystem overloading
> the viscosity function, now including the new dependence on
>concentration, available from VolumeVariables. Then, use the concentration
>variable also in the new MateralLaw to include the dipendence in
>the material laws.
The concentration you need to update the material law parameters will come from
the solution vector, not volume variables. And since you will be using it to
modify the way the material law (BC) works, you need to access the
concentration from the materialLawParams() function in your SpatialParams class
template. In our lswi example we present two options. In BCM we use the input
concentration at the boundary for the entire grid, while with the BCMV we
access the concentration at the solution vector and use this value to modify
the way BC works. The line where we access the concentration looks likes this:
totalSalinity = elemSol[scv.indexInElement()][componentIdx]
then we modify the material law parameters with a function within the
MaterialLawParams object.
So each time Dumux asks for the MaterialLawParams object, the function which
will return the pointer to Dumux will first do any necessary changes to the way
the material law works. See file lswispatialparams.hh.
>With regards to
>2) simulate polymer slug, that is, injection of polymer for some time after or
>before water.
>About this second point I was thinking that it should enough just to change
>the Neuman BC during certain time range instead of
> using episodes for this simple scenario.
The issue here is that Dumux works with an adaptative time step. So if you want
to change boundary conditions at a certain point in time, you must use some
kind of episode so that the last suggested timestep size does not overshoot the
specified time. Once you define episodes, you can use the episode id to
determine the particular boundary conditions. See function neumann() in
lswiproblem.hh. Here we change the influx boundary condition a certain time.
>Indeed, my main concern is about BC, for phases and components.
The BC part is a little tricky since Dumux uses an effective to absolute law
template to encapsulate the material law. This requires the relative
saturations, so if you need to modify them, it should be done as suggested
above. Another option is to write a different material law with relative
saturations within the material law variables and a passthrough eff2absLaw. We
did this first and it also works.
>As I understand, what you are doing is a bit more involved than what I should
>do, but it has some features in common. So, it will be certainly >very helpful
>if you can share.
see https://github.com/edscott/dumux/tree/master/lswi-n for example files.
Comments and Dumux coding guidelines are not yet complete but it looks readable.
On 24.01.2020 21:58, Ed Scott Wilson Garcia wrote:
> Hi Lorenzo,
>
> Here we are using episodes to simulate injection of low salinity water
> into a core saturated with oil with the following a sequence:
>
> first: high salinity
> second: medium salinity
> third: low salinity
>
> At first we were using episodes from dumux 2.12, but those were no longer
> available in dumux 3.0 so we implemented our own.
>
> Brief explanation of how we use episodes: In our study we aim at determining
> the parameters for the material law (BC and BCM) which correspond to the core
> sample, and later apply these values to simulations for enhanced oil recovery
> in the field. For this we need to run thousands of simulations, for which
> dumux is quite good: friendly to perl and python scripts for unattended
> executions and programmed processing of the results.
>
> I am currently working on putting the code in accordance with dumux
> guidelines to suggest a merge into gitlab. In our approach we define the
> concept of stage, where each stage has a determined number of episodes. The
> idea behind this is that for each stage we have a determined number of
> experimental values and for each experimental value we define an episode.
> When each episode is concluded, the rms error of the simulation with regard
> to the experimental value is tabulated. The sum of rms errors is our
> objective function for minimization.
>
> The design behind our code is that the number of stages and the number of
> episodes behind each stage is specified from the input file, so that code
> does not have to be recompiled. I hope to have the merge request ready next
> week (I' an optimist), but if you're interested in looking at the code before
> hand (still missing some guideline comments and code format) I'll be happy to
> share it via my github account.
>
> BTW, using the restart command does not always work well (in 3.0), since data
> is saved as float while calculations are carried out as double.
>
> regard
>
> Edscott
>
> -----Mensaje original-----
> De: Dumux [mailto:[email protected]] En nombre
> de lc Enviado el: viernes, 24 de enero de 2020 08:14 a. m.
> Para: [email protected]
> Asunto: [DuMuX] about BC and episodes
>
> Dear Dumux-ers,
>
> I'm currently dealing with horizontal and vertical (5/9 spot patterns) wells
> with polymer and/or surfactant components in water/oil.
>
> I have a simple question:
>
>
> What is the best way to simulate the injection sequence?
>
> First: water+oil
>
> Second: polymer (in water) + oil
>
> Third: again fresh water + oil
>
> Does it make sense to define three episodes, with different Neuman BCs
> (injection) and lunching one after the other? Or is there a better way?
>
>
> Thank you,
>
> Regards,
>
> Lorenzo Campoli
>
>
> _______________________________________________
> Dumux mailing list
> [email protected]
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
> _______________________________________________
> Dumux mailing list
> [email protected]
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
--
________________________________________________________
Le informazioni
contenute in questo messaggio di posta elettronica sono strettamente riservate
e indirizzate esclusivamente al destinatario. Si prega di non leggere, fare
copia, inoltrare a terzi o conservare tale messaggio se non si è il legittimo
destinatario dello stesso. Qualora tale messaggio sia stato ricevuto per
errore, si prega di restituirlo al mittente e di cancellarlo permanentemente
dal proprio computer.
The information
contained in this e mail message is strictly confidential and intended for the
use of the addressee only. If you are not the intended recipient, please do
not read, copy, forward or store it on your computer. If you have received the
message in error, please forward it back to the sender and delete it
permanently from your computer system.
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux