On the Computation of Viscosity

334 views
Skip to first unread message

Andrew Mizener

unread,
Feb 2, 2016, 3:36:15 AM2/2/16
to Cantera Users' Group
Good morning, all.

I have a question that is less "please fix my specific problem" and more "please help me understand a bit more about how Cantera works".
As mentioned in my last thread (helpfully resolved by Dr. Speth), I'm using Cantera 2.2.0 to calculate detonation properties with the Shock & Detonation Toolbox in the Matlab interface.

I need to do heat transfer calculations, so I will need viscosity and thermal conductivity in the post-detonation state. However, some of the mechanisms I'm using do not implement these.

I tried two sets of mechanisms:
 - For Hydrogen-Oxygen detonation I used h2o2_highT.cti and h2o2.cti. The former does not have "transport = gas_transport(" lines and does not implement viscosity; the latter does, and does.
 - For Methane-Oxygen detonation I used gri30_highT.cti and gri30.cti. Both of these have "transport = gas_transport(" lines. In fact, with the exception of the temperature polynomials being extended to high temperatures, these mechanisms are identical.

Ultimately, I would like to be able to model the following propellant combinations (no, they do not all need to use the same mechanism):
 - Hydrogen-Oxygen and Hydrogen-Air
 - Methane-Oxygen and Methane-Air
 - Ethylene-Oxygen and Ethylene Air

If possible, I'd also like to implement propane and perhaps a few other light-to-medium-weight simple hydrocarbons. (Octane would be the heaviest I'd try.)

So, my questions are as follows:
1) How can I tell if a given mechanism implements viscosity and thermal conductivity?
2) How do I find mechanisms that implement viscosity and thermal conductivity?
3) How do I determine what a propellants a given mechanism (that satisfies #1) is good for?

Thank you very much!

-- Andrew

PS: I've only tried this in Cantera 2.2.0. I'll be installing 2.2.1 in the morning, and will update if anything changes. (Somehow, I doubt it.)

Matei Radulescu

unread,
Feb 2, 2016, 4:02:25 PM2/2/16
to canter...@googlegroups.com
Andrew,
Whether the mechanism file has the transport data for each specie that is required to calculate mixture transport properties (mass, momentum and energy diffusivities), can be checked by seeing whether the “transport” field exists for each specie in the .cti file.  For example:
species(name='N2',
        atoms='N:2',
        thermo=(NASA([300.00, 1000.00],
                     [ 3.29867700E+00,  1.40824040E-03, -3.96322200E-06,
                       5.64151500E-09, -2.44485400E-12, -1.02089990E+03,
                       3.95037200E+00]),
                NASA([1000.00, 5000.00],
                     [ 2.92664000E+00,  1.48797680E-03, -5.68476000E-07,
                       1.00970380E-10, -6.75335100E-15, -9.22797700E+02,
                       5.98052800E+00])),
        transport=gas_transport(geom='linear',
                                diam=3.621,
                                well_depth=97.53,
                                polar=1.76,
                                rot_relax=4.0),
        note='000000')

There are many mechanisms one can use for small hydrocarbons.  A good place to start is the SANDIEGO mechanism, for which the CTI file can be generated using the ck2cti command using the inputs from:
I hope this helps.
Matei  

--
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 post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

Andrew Mizener

unread,
Feb 2, 2016, 5:13:17 PM2/2/16
to Cantera Users' Group
Matei,

That is what I thought, but it appears to not be working for the gri30_highT.cti and gri30.cti mechanisms. Both of them have "transport" fields. This is from the former:


species(name = "H2",
    atoms = " H:2 ",
    thermo = (
       NASA( [  200.00,  1000.00], [  2.344331120E+00,   7.980520750E-03, 
               -1.947815100E-05,   2.015720940E-08,  -7.376117610E-12,
               -9.179351730E+02,   6.830102380E-01] ),
       NASA( [ 1000.00,  6000.00], [  2.932865790E+00,   8.266079670E-04, 
               -1.464023350E-07,   1.541003590E-11,  -6.888044320E-16,
               -8.130655970E+02,  -1.024328870E+00] )
             ),
    transport = gas_transport(
                     geom = "linear",
                     diam =     2.92,
                     well_depth =    38.00,
                     polar =     0.79,
                     rot_relax =   280.00),
    note = "TPIS78"
       )


Yet when I call "viscosity(gas)", I get the following error (between the double lines):

==================================================
Error using ctmethods


************************************************
                Cantera Error!
************************************************


Procedure: Transport::viscosity
Error:   Not implemented.

Error in trans_get (line 5)
    v = ctmethods(50, n, job);

Error in Transport/viscosity (line 12)
v = trans_get(a.id, 1);

Error in demo_CJstate_minimal (line 42)
mu = viscosity(gas);
==================================================

I get an equivalent error when I call "thermalConductivity(gas)".

Would it help to post my code again?

Thanks,

-- Andrew

Ray Speth

unread,
Feb 2, 2016, 6:27:19 PM2/2/16
to Cantera Users' Group
Andrew,

The gri30.cti (and the high-T variant) each contain three phase definitions, which differ in which transport model they specify. These phases are named: "gri30", "gri30_mix", and "gri30_multi", and implement respectively no transport, mixture averaged transport, and multicomponent transport. When you write:

importPhase(filename)

you will get a phase defined using the first phase definition in the file, which is the one that does not implement a transport model. To get a phase using one of the other definitions, you need to use the form:

importPhase(filename, phasename)

e.g.

importPhase('gri30_highT.cti', 'gri30_mix')

The reason you do not see this behavior with h2o2.cti is because the first phase definition specifies a mixture-averaged transport model.

Regards,
Ray

Andrew Mizener

unread,
Feb 2, 2016, 7:00:18 PM2/2/16
to Cantera Users' Group
Aha!

That didn't 100% fix my problem, but it led me to one: the detonation package functions CJspeed.m and PostShock_eq.m call for the mixture, but not the gas state. It didn't allow me to set a phase to enable transport.

I fixed it by creating a new mechanism file, "gri30_highT_Mix.cti" which enabled transport without requiring a gas state input.

Thank you very much for your assistance again.

-- Andrew
Reply all
Reply to author
Forward
0 new messages