Hi Georg,

you could try to check for the phase state depending on the solution from the old _time_ step. If you have an infrastructure similar to the current multidomain models, you should have CParams which offer access to the old values via elemVolVarsPrev1/2.

Kind regards
Bernd

On 05/26/2015 03:33 PM, [email protected] wrote:

Hi Bernd,

I checked for the phase presence in the evalCoupling function of my localoperator-file. Here I couple the water component balance of the mpnc model to my membrane model by setting CouplingOutflow boundary conditions for the membrane and CouplingInflow for the mpnc domain. As I neglect miscibility in the membrane (I assume pure water here), I set the activity of water in the membrane to 1 if the liquid phase is present. Checking for the water saturation for the phase presence caused numerical problems which did not occur when I use the sum of mole fractions in the liquid phase instead. Now that I write it down it puzzles me even more… Anyway, the appearance of the liquid phase during startup of a fuel cell combined with the coupling to the membrane transport is numerically really challenging and I need to work on this topic some more. If I obtain some reliable results I will be glad to share them with you.

King regards

Georg

*Von:*Dumux [mailto:[email protected]] *Im Auftrag von *Bernd Flemisch
*Gesendet:* Dienstag, 26. Mai 2015 15:06
*An:* DuMuX User Forum
*Betreff:* Re: [DuMuX] Check for phase presence in the mpnc model

Hi Georg,

On 05/22/2015 08:24 AM, [email protected] <mailto:[email protected]> wrote:

    Hello DuMuX,

    I started working with the mpnc model and I wonder how I can check
    for the phase presence. Just accessing the phase saturation does
    not seem to be a safe way since during newton iterations the value
    may differ from zero even though the phase is not present (am I
    right here?). Right now I check if the sum of all mole fractions
    in the phase of interest is equal to 1. This seems to work,
    however I wonder whether I should include a threshold (something
    like: sumMolefractions[phaseIdx] > 1 – eps_). Or is there a better
    way?

I am not sure if one criterion is better than the other. Before the Newton converges, values for saturations can be "wrong", but so can the values for the mole fractions. If a solution at some Newton iteration shows a positive saturation value, then the corresponding phase is present for this solution. However, values may change for the converged solution. So I would be careful with making decisions based on intermediate solutions.

Can you describe in more detail what you mean by "This seems to work"? Does it not work with checking the saturation values?

Kind regards
Bernd


Thanks for your help

Georg Futter

——————————————————————————

*German Aerospace Center *(DLR)

Institute of Engineering Thermodynamics | Computational Electrochemistry | Pfaffenwaldring 38-40 | 70569 Stuttgart

Dipl.-Ing. *Georg Futter* | Ph.D. student

Telefon 0711/6862-8135 | [email protected] <mailto:[email protected]>

www.DLR.de <http://www.dlr.de/>




_______________________________________________
Dumux mailing list
[email protected]  <mailto:[email protected]>
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux




--
_______________________________________________________________
Bernd Flemisch phone: +49 711 685 69162
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61            email:[email protected]  
<mailto:[email protected]>
D-70569 Stuttgart            url:www.hydrosys.uni-stuttgart.de  
<http://www.hydrosys.uni-stuttgart.de>
_______________________________________________________________


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


--
_______________________________________________________________

Bernd Flemisch                         phone: +49 711 685 69162
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61            email: [email protected]
D-70569 Stuttgart            url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________

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

Reply via email to