heterogeneous reactions

461 views
Skip to first unread message

ann

unread,
Oct 13, 2009, 1:31:53 PM10/13/09
to Cantera User's Group
Hello everybody!

I recently heard about Cantera and I am curious if it can also handle
heterogeneous reactions , kinetics or at least equilibrium. I am
dealing with a combustion system, with particles that have different
mineral composition. Depending on the local gaseous composition
different heterogeneous reaction are possible.

ann

Steven DeCaluwe

unread,
Oct 13, 2009, 2:23:24 PM10/13/09
to canter...@googlegroups.com
Hi Ann,

Yes, the Cantera code is well set-up to handle heterogeneous chemistry.

A look through the 'surface_chemistry' folder inside the 'examples'
folder yeilds two useful examples to get you started. The 'diamond'
example was particularly useful for me, as I just wanted to calculate
the reaction rates to integrate in a code built in-house. The
'catcomb' example is also quite helpful, though, if you want to use
cantera's rather extensive modeling capabilities.

Best of luck,
Steven

ann

unread,
Nov 4, 2009, 4:16:49 AM11/4/09
to Cantera User's Group
First of all. Thank for the answer - I try to follow your advice I ve
been playing around with Cantera. I ve "run" the examples for the
homogeneous reactions and looked at the runDiamond.cpp and
surfdemo.cpp (diamond.py ). (I have to use C++ since I will have to
implement this in a CFD code as well).

As I understand for a heterogeneous reaction one has to create: a bulk
gas, a bulk solid and an interface. If I am looking in the diamond.cpp
I can see all this 3 being created, however in surfdemo.cpp there are
only the bulk gas and the interface created...I dont know why is that.

Following this two examples I try to rewrite the runDiamond.cpp using
the classes (as recommended) - the problem is when I try to declare
the stoichiometric solid. I couldn't find the class for this - I tried
using the Metal or IncompressibleSolid class, but i think something
was not right, since when reading the interface an error would appear
that I can only have the gas and the interface defined.

If somebody has an advice on this, I will be very grateful.

Steven DeCaluwe

unread,
Nov 4, 2009, 8:29:36 AM11/4/09
to canter...@googlegroups.com
Hi Ann,

The bulk phase is not specifically required - if there are no
reactions between the bulk and the interface, then the bulk doesn't
need to be declared. More specifically, the interface only looks for
whichever phases you list inside the interface declaration in the cti
file. For example, in the diamond.cti file, the interface
declaration is:

ideal_interface(name = "diamond_100',
elements = ' H C',
species = 'c6HH c6H* c6*H etc... ',
reactions = 'all',
phases = 'gas diamond',
etc...
)

while the ptcombust.cti (used in surfdemo) has the following
interface definition:

ideal_interface(name = "Pt_surf",
elements = " Pt H O C",
species = """ OT(S) H(S) etc...
""",
phases = " gas ",
etc...
)


When you create the diamond interface phase in your code, you must
already have created phases that refer to the 'gas' and 'diamond'
phases in that same cti file, and pass them with the function call,
whereas the Pt_surf phase only looks for a 'gas' phase when it is
created.

Regarding your problem re-writing the 'diamond' example: could you
post the lines of code where you create the phases, and the specific
error code that you get?

Regards,
Steven

ann

unread,
Nov 6, 2009, 6:05:35 AM11/6/09
to Cantera User's Group
Hallo Steve,

thank you for taking time to reply to my post.
I am more or less in the same position as yesterday:

1. the diamond.cti used - the standard one:

ideal_gas(name = 'gas',
elements = 'H C O',
species = 'gri30: H H2 CH3 CH4 O O2',
initial_state = state(temperature = 1200.0,
pressure = 20.0*OneAtm/760.0,
mole_fractions = 'H:0.002, H2:1
CH4:0.01 CH3:0.0002'))


stoichiometric_solid(name = 'diamond',
elements = 'C',
species = 'Cs',
density = (3.52, 'g/cm3'),
initial_state = state(temperature = 300.0,
pressure = OneAtm)
)
species(name = 'Cs',
atoms = 'C:1',
thermo = const_cp() )


ideal_interface(name = 'diamond_100',
elements = 'H C',
species = 'c6H* c6HH c6*H c6** c6HM c6HM* c6*M c6B ',
reactions = 'all',
phases = 'gas diamond',
site_density = (3.0e-9, 'mol/cm2'),
initial_state = state(temperature = 1200.0,
coverages = 'c6H*:0.1, c6HH:
0.9'))


2. the cpp file - based on surfdemo.cpp, trying to replicate
runDiamond.cpp

int main() {

try {
// create the gas phase + initial state
IdealGasMix gas("diamond.cti", "gas");
gas.setState_TPX(1200.0, 20.0*OneAtm/760.0,
"H:0.002, H2:1 CH4:0.01 CH3:0.0002 ");

// create the interface + initial coverage
vector<ThermoPhase*> phases;
phases.push_back(&gas);
Interface surf("diamond.cti", "diamond_100", phases);
vector_fp cov;
cov.push_back(0.1);
cov.push_back(0.9);

// creat bulk phase
// how?

// steady state coverages 100 s
surf.advanceCoverages(100);

// return the net production rates (kmol/m2/s) due to surface
chemistry
//for all species.
// The gas-phase species are first in the sdot array, followed by the
//surface species

vector_fp wdot(gas.nSpecies() + surf.nSpecies());
surf.getNetProductionRates(DATA_PTR(wdot));
int k;
for (k = 0; k < gas.nSpecies(); k++)
cout << gas.speciesName(k) << " " << wdot[k] << endl;

for (k = 0; k < surf.nSpecies(); k++)
cout << surf.speciesName(k) << " "
<< wdot[k+gas.nSpecies()] << endl;

}
catch (CanteraError) {
showErrors(cout);
}
return 0;
}

The error: Procedure: importKinetics
Error: phase diamond not found. Supplied phases are: gas
diamond_100 gas diamond_100
- I expected this since i am not sure that he actually reads and
proceeds with "diamond".

My problems:

1) I cannt find a way to call the bulk phase. There is no
"StoichiometricSolid.h", as I expected. I have tried very chaotic
some old call functions ...also including Metal.h and declaring it as
metal...i am not sure.
2) I did read the information that comes online with Cantera, but I am
not sure that I understand right how it works. What I have to model is
transformation/deposition/condensation of mineral particles and
alkali compounds on the walls.
So, assuming that I have an ash particle containg Fe in an O2
environment one of the possible reactions could lead to FeO, Fe2O3
etc. I want to get the deposition growth of all Fe containing species.
So I will need the solid bulk phase, or?

a. define bulk gas phase: the combustion environment
b. define solid bulk: Fe ?
c. define the ideal_interface: FeO Fe2O3 etc

Best regards,
Ann

Steven DeCaluwe

unread,
Nov 12, 2009, 4:09:28 PM11/12/09
to canter...@googlegroups.com
Hi Ann,

The two phases that I've always used for my bulk solids are 'metal' and 'incompressible_solid.'

In general, I'm still uncertain from your description whether your simulation requires a bulk phase: do adsorbed species on the surface/interface participate in reactions with condensed bulk solid species?  If not, then you do not need a bulk phase.  Just declare an ideal interface that contains the species you require.  

However, if the surface species do react with the bulk, of if perhaps you have Fe-containing species that adsorb on top of one another (and hence surface species become 'bulk' species, in as much as they are no longer at the surface..."sub-surface" may be more appropriate), then you will probably want a bulk phase.  

You may want to create an 'incompressible_solid' bulk phase, to keep track of the species that become bulk, via net production rates.  If I understand correctly, and incompressible solid seems more appropriate for your situation anyway, rather than a stoichiometric solid.

However, if you absolutely need to figure out how to call a stoichiometric solid, here are my recommendations:
a) Hope somebody else is reading this, and knows the answer;
b) Try and trace the function calls back through the c++ code from 'surfdemo.cpp' to see how a stoichiometric solid is created.


Also, maybe this doesn't apply inside the c++ code, but in matlab and python you would need to create your bulk phase before you create the interface (in the code you include below, you have the bulk phase created after the interface).

Best of luck,
Steven



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cantera User's Group" group.
To post to this group, send email to canter...@googlegroups.com
To unsubscribe from this group, send email to cantera-user...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cantera-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Reply all
Reply to author
Forward
0 new messages