Modeling Multi-phase equilibrium

102 views
Skip to first unread message

Yue QIU

unread,
Jul 5, 2022, 2:47:45 AM7/5/22
to Cantera Users' Group
Hi all,
I am modeling gas+solid+liquid phase equilibrium based on the given example "Plasma_equilibrium.py". 
In the example, many phases are defined in only 1 yaml input file. The initial T is set as "mix.T = t". I am wondering if I can specifiy the temperature of different phases? At least between gaseous and condensed phases. 
E.g., I want to have a mixture with gaseous phase at 1500 K and liquid phases at 300 K. Theoretically it should be possible, just a change of the system enthalpy. I want to get the equilbrium T (both gas and condensed phase have the same T).

How can I realize that ?

Thank you and Best Regards,
Yue

Bryan Weber

unread,
Jul 14, 2022, 11:23:59 PM7/14/22
to Cantera Users' Group
Hi Yue,

I think you might be better served by a Quantity (https://cantera.org/documentation/docs-2.6/sphinx/html/cython/importing.html#representing-quantities-of-phases) rather than a Mixture. As the equilibrium temperature depends on the initial mass of each phase, and assuming there is no interchange between the phases, that should work for you. The other caveat is that both species have to be in the same phase. Something like:

phase_1 = ct.Solution(input file)
q1 = ct.Quantity(phase_1, mass=...)
q1.TPX = 1500, ct.one_atm, gas-species-mole-fraction

q2 = ct.Quantity(phase_1, mass=...)
q2.TPX = 300, ct.one_atm, liquid-species-mole-fraction

q3 = q1 + q2

By default, the internal energy and volume are held constant. You can change that by setting the "constant" attribute of the Quantity, check out the documentation I linked to.

Hope that helps!
Bryan

邱越

unread,
Jul 20, 2022, 5:32:28 AM7/20/22
to canter...@googlegroups.com
Thanks for the info!
But is it okay to have both gas and liquid in one phase? Then what should the "thermo" property be ? it is not ideal-gas or pure fluid now. 

Best,
Yue

Bryan Weber <bryan....@gmail.com> 于2022年7月15日周五 05:24写道:
--
You received this message because you are subscribed to a topic in the Google Groups "Cantera Users' Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cantera-users/SjeYtUaWDuk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/0ef1ad7a-1c52-435a-84d3-1b9c715bedbfn%40googlegroups.com.

Bryan Weber

unread,
Sep 5, 2022, 10:22:07 AM9/5/22
to Cantera Users' Group
Hi Yue,

Sorry for the delayed response. You probably can't include them both in the same phase definition, but you can include them both in the same input file, along with a pair of reactions to describe the evaporation and condensation. Then you can possibly have separate reservoirs for each phase and allow transfer between them by a mass flow controller, pressure controller, or valve depending on your modelling assumptions. I'm thinking something like:

r1 = ct.Reservoir(gas-phase)
r2 = ct.Reservoir(liquid-phase)
mfc = ct.MassFlowController(r1, r2)
netw = ct.ReactorNet([r1, r2])
netw.advance(some really big time)

That will integrate the system towards equilibrium, so it's not a direct approach, but it might work. Please excuse any syntax errors or such, this is just a wild idea :-)

Best,
Bryan

Reply all
Reply to author
Forward
0 new messages