I have a few questions about the calculation of enthalpy and entropy of mixtures and would like to ask for your help.

70 views
Skip to first unread message

李济超

unread,
Jul 13, 2022, 6:32:33 PM7/13/22
to Cantera Users' Group
 First of all, when using equilibrate function for mixtures, what equation of state is it based on, is it PR or some other actual gas equation of state, is it optional. For example, are the enthalpy and entropy values of M in the code below calculated from the actual gas equation of state or the ideal gas equation of state?

# Stream A (air)
A = ct.Quantity(gas, constant='HP')
A.TPX = 300.0, ct.one_atm, 'O2:0.21, N2:0.78, AR:0.01'

# Stream B (methane)
B = ct.Quantity(gas, constant='HP')
B.TPX = 300.0, ct.one_atm, 'CH4:1'

# Set the molar flow rates corresponding to stoichiometric reaction,
# CH4 + 2 O2 -> CO2 + 2 H2O
A.moles = 1
nO2 = A.X[A.species_index('O2')]
B.moles = nO2 * 0.5

# Compute the mixed state
M = A + B
print(M.report())

# Show that this state corresponds to stoichiometric combustion
M.equilibrate('HP')


Also, the equilibrate function is based on the Gibbs free energy minimum calculation, where can I see the solver about the Gibbs free energy minimum.

Finally, what equation of state is used to calculate the enthalpy-entropy of a pure substance or a mixture.

The programming language I use is python.

Steven DeCaluwe

unread,
Jul 13, 2022, 9:34:37 PM7/13/22
to canter...@googlegroups.com
Hi, the equations state used are whatever you have specified in your yaml input file for that phase. You can even mix and match, if you so choose. 

Sent from my iPhone

On Jul 14, 2022, at 5:32 AM, '李济超' via Cantera Users' Group <canter...@googlegroups.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/a94b8e7a-fdf3-4613-9bc1-6d7a52af4979n%40googlegroups.com.

李济超

unread,
Sep 16, 2022, 9:44:18 AM9/16/22
to Cantera Users' Group

Thank you very much for your answer.
Do you mean that the choice of equation of state is reflected in the following statement
gas = ct.Solution('gri30.yaml')

If I want to use PR or PRBM, STEAM-TA, etc., how do I write this statement?

Steven DeCaluwe

unread,
Sep 17, 2022, 1:39:29 AM9/17/22
to Cantera Users' Group
Hi.

If you look at the contents of gri30.yaml, the phase declaration specifies the EoS:

- name: gri30
thermo: ideal-gas

I don’t know what steam -TA or PRBM are, But Cantera does have a Peng-Robinson and Redlich-Kwong phase models.  You can see examples of the relevant input files here and here.

Best,
Steven

——————————————————
Steven C. DeCaluwe, Ph.D | Associate Professor of Mechanical Engineering
COLORADOSCHOOLOFMINES
Brown Building W410B
Golden, CO 80401

Twitter: @CORESresearch
He / Him / His





李济超

unread,
Sep 19, 2022, 12:29:59 PM9/19/22
to Cantera Users' Group

Thank you very much for your answer, it helped me a lot.     Do H and h represent enthalpy and specific enthalpy respectively in cantera, but the help file gives the unit of H as J/kg.

Air_GT2 = ct.Quantity(gas, constant='HP')
Air_GT2.TPX = 298.15, ct.one_atm, 'O2:0.21, N2:0.79'
Air_GT2.mass = 2
print(Air_GT2.H, Air_GT2.h)
-411.9256920213989 -205.96284601069945

Steven DeCaluwe

unread,
Sep 19, 2022, 12:31:54 PM9/19/22
to Cantera Users' Group
Where are you getting those help file contents?  If I create a quantity from a Solution object and type
>>> help(air_2.__class__.H)

I get:

Help on property:

    Get the total enthalpy [J] represented by the `Quantity`.

Reply all
Reply to author
Forward
0 new messages