Re: [DuMuX] adsorption/desorption term

2020-02-16 Thread Timo Koch



Viele Grüße,
Timo
> Am 17.02.2020 um 07:55 schrieb lc :
> 
> Dear Dumux community,
> 
> speaking about adsorption in Dumux, I'd like to ask some clarification.
> 
> With respect to the following answer and considering a 1p2c model, in 
> equilibrium.
> 
> I need to implement an adsorption term such as d(c+A(c))/dt ... where c is 
> the generic concentration (mass or molar fraction component) and A is the 
> adsorption function term, which could Langmuir-like A(c) = k1*c/(1+k2*c).
> 
> So, clearly, this term should enter in time derivative and cannot be a 
> source/sink term. Does the computeStorage function fit for this? As I 
> understand it may compute the partial time derivative (rate of change) of all 
> conservation quantities in the sub-volume, so it should be appropriate. But 
> maybe it depends on the model?
> 
> Which custom LocalResidual should I consider for my 1p2c equilibrium model?
> 
Dear Lorenzo,

you implement a new LocalResidual class which inherits from the 
CompositionalLocalResidual and just overloads the computeStorage function. In 
the implementation of computeStorage you can call 
CompositionalLocalResidual::computeStorage first and then add your A(c) term to 
the storage. 

Then set the type of the property LocalResidual to your new class. 

Good luck
Timo

> 
> Thank you,
> 
> Lorenzo
> 
>> On 18.11.2019 18:58, Timo Koch wrote:
>> 3) Depends on if you want to model an equilibrium process or a 
>> non-equilibrium process. For non-equilibrium, you can use the mineralization 
>> models in Dumux (e.g. 2pncmin). They add another equation for balancing the 
>> mass of surfactant adsorbed on the solid matrix. The exchange between solid 
>> and fluid is implemented as a regular source term in the "Problem" class. If 
>> you want an equilibrium process, you probably just want to add something to 
>> your storage term. To this end, you can implement a custom "LocalResidual" 
>> and add the term in the function "computeStorage". 
> ___
> Dumux mailing list
> Dumux@listserv.uni-stuttgart.de
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

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


[DuMuX] adsorption/desorption term

2020-02-16 Thread lc

Dear Dumux community,

speaking about adsorption in Dumux, I'd like to ask some clarification.

With respect to the following answer and considering a 1p2c model, in 
equilibrium.


I need to implement an adsorption term such as d(c+A(c))/dt ... where c 
is the generic concentration (mass or molar fraction component) and A is 
the adsorption function term, which could Langmuir-like A(c) = 
k1*c/(1+k2*c).


So, clearly, this term should enter in time derivative and cannot be a 
source/sink term. Does the computeStorage function fit for this? As I 
understand it may compute the partial time derivative (rate of change) 
of all conservation quantities in the sub-volume, so it should be 
appropriate. But maybe it depends on the model?


Which custom LocalResidual should I consider for my 1p2c equilibrium model?


Thank you,

Lorenzo

On 18.11.2019 18:58, Timo Koch wrote:
3) Depends on if you want to model an equilibrium process or a 
non-equilibrium process. For non-equilibrium, you can use the 
mineralization models in Dumux (e.g. 2pncmin). They add another 
equation for balancing the mass of surfactant adsorbed on the solid 
matrix. The exchange between solid and fluid is implemented as a 
regular source term in the "Problem" class. If you want an equilibrium 
process, you probably just want to add something to your storage term. 
To this end, you can implement a custom "LocalResidual" and add the 
term in the function "computeStorage". 

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


Re: [DuMuX] C++17 conforming compiler required

2020-02-16 Thread Christoph Grüninger
Great news!
Having the ability to use C++17 will lead, at least in some places, to
better readable code.
Your announcement prompted me to ask the Dune developers to do the same.
And we agreed to follow DuMuX with Dune 2.8.
Cf. https://dune-project.org/community/meetings/2020-02-devmeeting/

Bye
Christoph


Am 07.02.20 um 12:50 schrieb Flemisch, Bernd:
> Dear Dumux users,
> 
> 
> Thank you for your feedback concerning the mail "Can we require C++17?"
> from the end of last year.
> 
> 
> With commit 47163f51 on master and from release 3.2 on, we require a
> C++17 conforming compiler, meaning gcc >= 7 or clang >= 5.
> 
> 
> Kind regards
> 
> Bernd

-- 
Mit Kurzschlafwettkampfbestzeit
[Tua von Die Orsons - Sowas von egal]
___
Dumux mailing list
Dumux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux