All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Handling Mixtures in Cantera Objective 1. Use the "moles" method/function of the A object and explain how…
AKSHAY UNNIKRISHNAN
updated on 06 Apr 2021
Handling Mixtures in Cantera
Objective
1. Use the "moles" method/function of the A object and explain how it was calculated. You need to use this after line number 9.
2. Use the method mole_fraction_dict() of the A object and explain the result that you get. Here is how you need to use it. print(A.mass_fraction_dict())
3. What is happenging in lines 15 and 16? Make sure you explain what 1546 means? Is that reasonable?
4. What changes do you need to put in place to get the right value of AFT in line 22?. The right answer is 2224K. Hint: The change needs to be done in line number 10. You have to compute the right number of moles of A.
Theory
Cantera seems to follow Meter-Kilogram-second(MKS) system.i.e cantera seems to assume the mass of quantity to be 1 kg if the mass of quantity is not defined yet.Also for example when we use mole function cantera returns the result in no. of kilomoles present in a kilogram of quantity(k-Mol/Kg) can also be shorted down to (mol/g)
Solutions:
1.Using moles function to find out no. of moles in 1g the number of moles/g is 0.0346612761450006
to get the number of moles in 1g theoretically we have to calculate using the atomic weights of the individual elements
mass of O2=15.999*2=31.998g
mass of N2=14.0067*2=28.01348g
so per gram,no.of moles in A will be
(0.21*( 1/31.998) )+(0.79*(1/28.01348))
= 0.03476345518 theoretically
2.using mole fraction dict in A to find mole fraction and to find mass fraction
Theoretically we have
mass of 1 mole of O2 is 31.998g and similarly N2 is 28.01348g
mass of A=(0.21*31.998+0.79*28.01348)g=28.8503972g
there for mass fraction of O2 is (0.21*31.998)/(28.8503972)
=0.23291700122
ands for N2 (0.79*28.01348)/(28.8503972)
=0.76708299877
almost correct with cantera
3.In code line 15-16
4.Changes to put in place
from these 3 question we found out that we need to specify the number of moles for the species and we need to follow the rules of python and cantera coding
from my perspective i figured this as an combustion process where A(oxygen and nitrogen mixture) and B (CH4) is equilibrated in constant pressure | enthalpy environment to determine AFT
we have :
therefore number of moles in CH4=1
in O2 and N2=(2+3.76*2)=9.52
complete code is given below
results;
AFT is 2224.4118993147486k
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week 6 - Multivariate Newton Rhapson Solver
MULTIVARIATE NEWTON RAPHSON SOLVER FOR ODE'S Objective Solve the problem using Implicit Euler Method/Backward Differencing, assume…
05 Jul 2021 07:51 PM IST
Week 9 - Senstivity Analysis Assignment
…
02 Jun 2021 02:06 PM IST
Week 7 - Auto ignition using Cantera
AUTO IGNITION USING CANTERA Objective To detrmine auto ignition and ignition delay time for methane combustion reaction for various…
02 Jun 2021 08:48 AM IST
Week 5.2 - Literature review: ODE Stability
ODE STABILITY Objective Literature review of ODE stability Theory Numerical solution schemes are often referred…
25 Apr 2021 12:30 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.