Hello,
I am struggling to do a simulation in DuMux 3.1 with a two-phase flow in
porous medium (oil + aqueous solution containing a polymer and a
surfactant). I am using the 2pnc model and the Box method, because it
allows a fully implicit solution taking into account the dependence of
material parameters on the pressure gradient. I am using a numeric
FVAssembler and UMFPack as the linear backend of the Newton method.
The simulation works, but is hugely impractical because the time
convergence is slow. The time step goes down to the length of a few seconds.
So I am considering using an analytical Jacobian here. Why so? Because
of two clues:
1. I once had trouble with a numerical Jacobian causing the method to
diverge, and analytical Jacobian helped (after a bug in its
implementation was fixed) [1].
2. There are not many software packages claiming to be able to do this
kind of simulation. One of those who do is MRST, and it advertises its
automatic differentiation approach [2]. (It also says that it uses TPFA,
but it is not a good option with DuMux in this case because there is no
possibility with TPFA to account for the pressure gradient on the
current step [3]).
Now, I can not compile my program with FVAssembler<TypeTag,
DiffMethod::analytic>, because the addFluxDerivatives method that I am
using gives an error, saying "Only fluids with constant viscosities are
allowed!". The viscosity of aqueous phase in my case is not constant
because it depends on polymer concentration. Is there any example of
analytic flux derivatives implementation for this case? If not, what
would be the general recommendations on how I canĀ implement such a
thing myself?
If you think that I am not on the right path and the numeric
differentiation should not be a problem, and the problem is something
else, feel free to let me know, too. Thank you.
Best regards,
Dmitry
[1] https://listserv.uni-stuttgart.de/pipermail/dumux/2020q2/002492.html
[2] https://www.sintef.no/projectweb/mrst/modules/ad-eor/
[3] https://listserv.uni-stuttgart.de/pipermail/dumux/2020q2/002516.html
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux