sry, delete ‘static’ from my comment

Timo

> 5. sep. 2021 kl. 17:17 skrev Timo Koch <koch_t...@hotmail.com>:
> 
>  should be ok. Creating the new law is the same cost as creating the old 
> params, because the static functions have zero size. 
> 
> Timo
> 
>>> 5. sep. 2021 kl. 16:18 skrev Dmitry Pavlov <dmitry.pav...@outlook.com>:
>>> 
>> 
>> Timo,
>> 
>> Ah, I see, the krw and krn in PcKrSw are not static, so I can, as you say, 
>> effectively have any kind of state in the material law.
>> 
>> Will not it damage the performance though? In my problem formulation, krw 
>> and krn continuously depend on surfactant mole fraction. So I will have to 
>> create as many FluidMatrixInteractions as there are cells. Is it OK?
>> 
>> Best regards,
>> 
>> Dmitry
>> 
>> 
>> 
>> 
>> 
>>> On 05.09.2021 03:32, Timo Koch wrote:
>>> Hi Dmitry,
>>> 
>>> sure this is still possible. If you want you can think of the 
>>> FluidMatrixInteraction as a collection of MaterialLawParams only that these 
>>> “params” now additionally have functions like sw(pc). So they are the 
>>> (parametrized) “law”.  Instead of separating parameters and (stateless) 
>>> functions there are now in one class with state. So, if you want a law 
>>> parametrized with different parameters, you construct a new law with new 
>>> parameters (within the SpatialParams::fluidMatrixInteraction function). 
>>> 
>>> Hope this helps
>>> 
>>> Timo
>>> 
>>>> 5. sep. 2021 kl. 00:41 skrev Dmitry Pavlov <dmitry.pav...@outlook.com>:
>>>> 
>>>> Hello,
>>>> 
>>>> I have a confession to make. For quite some time, I have been using DuMux 
>>>> 3.3, refusing to upgrade because my code uses MaterialLawParams 
>>>> extensively, and in DuMux 3.4 it is no longer available. I saw the 
>>>> deprecation notice in 3.3, but was too busy/lazy to look into the 
>>>> alternative.
>>>> 
>>>> Now I started to think about upgrade and... I do not know how to do with 
>>>> FluidMatrixInteraction the things I have been doing with 
>>>> MaterialLawParams. The changelog says: "A caller does not have to pass a 
>>>> `parameters` object to the laws anymore". See, the necessity (capability) 
>>>> to pass this object around allowed me to make by krw and krn effectively 
>>>> depending not only on sw, but also on the concentration of a component 
>>>> (surfactant), and on the pressure gradient.
>>>> 
>>>> I obtained the surfactant concentration and pressure gradient in 
>>>> SpatialParams::materialLawParams, then used them to calculate the 
>>>> capillary desaturation coefficients, and then wrapped them into the 
>>>> returned instance of MaterialLawParams, which was later happily passed to 
>>>> krw() and krn().
>>>> 
>>>> With DuMux 3.4 I see examples with different implementations of 
>>>> FluidMatrixInteraction being used depending on position etc., but no 
>>>> example where fluid variables other than sw affect the relative 
>>>> permeability. Is this possible?
>>>> 
>>>> Regards,
>>>> 
>>>> Dmitry
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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
> _______________________________________________
> 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