Dear Lorenzo,

You might be interested to look at the implementation of adsorption (following 
very much the approach described by Timo) for the oil-water system with 
discrete fractures:

https://git.iws.uni-stuttgart.de/andrian/dumux/tree/master/dfm-ow3c

Best regards,
Nikolai



-----Original Message-----
From: Dumux <dumux-boun...@listserv.uni-stuttgart.de> On Behalf Of Timo Koch
Sent: Monday, February 17, 2020 08:57
To: DuMuX User Forum <dumux@listserv.uni-stuttgart.de>
Subject: Re: [DuMuX] adsorption/desorption term




Viele Grüße,
Timo
> Am 17.02.2020 um 07:55 schrieb lc <campoli.lore...@gmail.com>:
> 
> 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 mailing list
Dumux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to