I have to switch primary variables, similarly to what Etienne said, from secondPhaseOnly to bothPhases. So I implemented my own PrimaryVariableSwitch.

I see in TwoPTwoCCO2PrimaryVariableSwitch that the switch is not necessarily done when the condition xnw > xnwMax is met (xnw is mole fraction, xnwMax is the maximum mole fraction that is allowed in one phase).

For the switch to happen, xnw should exceed xnwMax, and then (on next call, I am not sure whether it happens on the same time step or not), xnw should exceed xnwMax * 1.02. Only then the switch is made.

I do not understand at the moment why such a two-step switch procedure was needed for.


Best regards,

Dmitry


_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to