Lewis number equal to unity.

1,127 views
Skip to first unread message

Martin Henke

unread,
Jun 2, 2016, 5:31:56 AM6/2/16
to Cantera Users' Group
Hi,

I am interested in doing flame simulations with Lewis number equal to one. So far, I got to know that this is not yet implemented in Cantera, although there have been a couple of posts on this topic:


I would like to know if there has been any progress in the past regarding this topic? If not, can someone please post advice how to achieve Le = 1 in flame simulations. I am hesitating to touch the C++ code myself, but will try if the implementation is easy.

Kind regards
Martin

Ray Speth

unread,
Jun 2, 2016, 5:51:13 PM6/2/16
to Cantera Users' Group
Martin,

I think there has just been no intersection between the set of people who are interested in seeing this feature implemented and the set of people who have the time and experience needed to actually do it. This would be a fairly simple task for someone reasonably proficient in C++. While I do not have the time to do this myself, I would be happy to provide some guidance to anyone who does. The main implementation work would be to add a new derived class from GasTransport which reimplements the methods for computing the diffusion coefficients, and making this class accessible through the TransportFactory interface.

Regards,
Ray

Martin Henke

unread,
Jun 9, 2016, 12:32:14 PM6/9/16
to canter...@googlegroups.com
Ray,

thank you for the offer. I have quite some experience in C++, so the programming part itself won't be problem I think.

Do you see any other way to get Le = 1, for example, after parsing the CTI file, to somehow modify the diffusion coefficient of each species in the solution object to be D = lambda / (c_p * rho) and then solve the flame with this modified solution object?

Grüße / Regards / Cordialement
Martin Henke

--
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/lHmeD5QMoww/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Ray Speth

unread,
Jun 9, 2016, 5:12:50 PM6/9/16
to Cantera Users' Group
Martin,

The idea I suggested above is essentially this. The modified transport class would ignore the fits of the binary diffusion coefficients and use the mixture thermal conductivity to compute the diffusion coefficient.

Regards,
Ray
To unsubscribe from this group and all its topics, send an email to cantera-users+unsubscribe@googlegroups.com.

Martin Henke

unread,
Jun 11, 2016, 8:23:07 AM6/11/16
to canter...@googlegroups.com
Ray,

I use the python interface of Cantera, so my question was actually if I can get Le = 1 somehow in my python scripts without touching the C++ code itself, for example, by modifying the solution-object in python. If this is not possible, then of course the only way to get Le = 1 is to implement a derived transport class.

Regards
Martin

Ray
To unsubscribe from this group and all its topics, 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.

--
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/lHmeD5QMoww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.

Ray Speth

unread,
Jun 11, 2016, 11:26:55 AM6/11/16
to Cantera Users' Group
Martin,

No, it is not possible to do this only by modifying the Python interface. The way Cantera is structured, you can write Python code that calls C++ code, but generally not the other way around, which is what would be required in order to allow this.

Regards,
Ray

Regards
Martin

Ray
To unsubscribe from this group and all its topics, send an email to cantera-users+unsubscribe@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.

--
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/lHmeD5QMoww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-users+unsubscribe@googlegroups.com.

Martin Henke

unread,
Jun 14, 2016, 7:49:43 AM6/14/16
to canter...@googlegroups.com
Ray,

I compiled and installed Cantera successfully on my system following the instructions on the Cantera homepage. I have also taken a look at the classes "GasTransport" and "TransportFactory", too.

Regarding the modifications to TransportFactory, I guess one has to modify the routine "TransportFactory::newTransport(const std::string& transportModel,  thermo_t* phase, int log_level, int ndim)" such that it is possible to create an instance of the new class for Le = 1 which I would name for instance "EqualDiffTransport"?

Regarding the new class "EqualDiffTransport" which derives from "GasTransport", can you please outline more in detail which methods need to be (re)implemented? I've seen that class "GasTransport" contains methods "GasTransport::getMixDiffCoeffs(doublereal* const d)"  and "GasTransport::getBinaryDiffCoeffs(const size_t ld, doublereal* const d)". I assume that a method named for instance "getEqualDiffCoeff" is needed in this class?

Furthermore, I guess the new class "EqualDiffTransport" needs to implement the method "void MixTransport::getSpeciesFluxes(size_t ndim, const doublereal* const grad_T, 101  size_t ldx, const doublereal* const grad_X, 102  size_t ldf, doublereal* const fluxes)"?

Regards
Martin

Ray

Regards
Martin

Ray
To unsubscribe from this group and all its topics, 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.

--
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/lHmeD5QMoww/unsubscribe.
To unsubscribe from this group and all its topics, 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.

--
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/lHmeD5QMoww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.

Ray Speth

unread,
Jun 14, 2016, 6:09:28 PM6/14/16
to Cantera Users' Group
Martin,

For TransportFactory, yes, the method that you would need to modify is newTransport. You would also need to introduce a new constant for the model and add an element to m_models in the constructor.

For your new class (which I think would be better named UnityLewisTransport, since it's more specific than just that the diffusion coefficients are equal), you would not be adding a new method (because nothing would ever call this method if it only exists in the derived class), but reimplementing one or more of the virtual methods of GasTransport so that the other methods return results consistent with Le = 1. For the 1D flame, this specifically means that getMixDiffCoeffs must return the desired values. Whether that's done by overriding getMixDiffCoeffs or by overloading updateDiff_T is something you will need to figure out so that both the mixture averaged and binary diffusion coefficients are consistent with your model. Some thought should also be given to what should be returned by the methods getMixDiffCoeffsMole and getMixDiffCoeffsMass. To avoid needing to reimplement getSpeciesFluxes, it may make sense to have the new class derive from MixTransport instead of GasTransport.

Regards,
Ray

Regards
Martin

Ray

Regards
Martin

Ray
To unsubscribe from this group and all its topics, send an email to cantera-users+unsubscribe@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.

--
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/lHmeD5QMoww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-users+unsubscribe@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.

--
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/lHmeD5QMoww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-users+unsubscribe@googlegroups.com.

Solal Amouyal

unread,
Jul 13, 2016, 9:12:13 AM7/13/16
to Cantera Users' Group
Hello Martin,


I am also interested in implementing the option of setting the Lewis number to unity in Cantera.

If you have succeeded in doing so, I would love to use your version of Cantera if you are willing to. If not, I'll try to do it myself but I would rather not reinvent the wheel if it is open source ;)

Thank you,

Solal

Martin Henke

unread,
Jul 24, 2016, 6:47:32 AM7/24/16
to canter...@googlegroups.com
Hi Solal,

I didn't have had the time yet to start with the implementation. My plan is to start with that probably in october or november as I don't have the time right now.

Grüße / Regards / Cordialement
Martin Henke

--
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/lHmeD5QMoww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.
Message has been deleted

Solal Amouyal

unread,
Jul 27, 2016, 4:52:40 AM7/27/16
to Cantera Users' Group
Hi Martin,

Thank you for answer. I actually have been able to get it right. I'll make it available online soon enough.

Regards,

Solal Amouyal

Martin Henke

unread,
Jul 29, 2016, 11:30:44 AM7/29/16
to canter...@googlegroups.com
Hi Solal,

great! I am looking forward to download and test your version. Can you estimate when it will be available?

Grüße / Regards / Cordialement
Martin Henke

--

Chris Cloney

unread,
Jun 28, 2017, 11:31:35 AM6/28/17
to Cantera Users' Group
Hi Martin and Solal,

I was wondering if this code is available?

I have a CFD code which computes transient 1D laminar burning velocity with unity Lewis number and would like to compare the answers if possible.

Thanks in advance!

arief...@gmail.com

unread,
Jun 28, 2017, 12:59:46 PM6/28/17
to canter...@googlegroups.com

Hello Chris,

If it is of help to you I can give you the numerical values for the velocity, temperature and species profiles of the laminar flame structure in Figure 6 of http://www.hysafe.org/science/KareemChin/FlowTurbulenceAndCombustion_v91_p281to317.pdf

This was obtained with multi-component diffusion (i.e. each species having its own Lewis number instead of a unity Lewis number assumption for the background fluid).

Which CFD-solver are you applying for your test-problem?

Arief Dahoe

Chris Cloney

unread,
Jun 28, 2017, 2:45:07 PM6/28/17
to Cantera Users' Group
Thanks Arief,

I actually have Cantera setup to simulate laminar methane flames at different equivalence ratios (using the python interface and with multi-component diffusion) which I can get the laminar flame structure from.

I also have OpenFoam laminar methane flame simulations (with unity lewis number) for the MP1, BFER2, DRM19, and GRI-Mech 3, reaction mechanisms (See image below).


I believe the reason for the differences between Cantera and OpenFoam using Gri-Mech (and the other mechanisms, which are not shown here for Cantera but can be seen at http://www.cerfacs.fr/cantera/mechanisms/meth.php), is due to the unity lewis number assumption compared to multi-component diffusion.

I was hoping to get a version of Cantera with the unity lewis number assumption to test my hypothesis.

Does anyone know if this code has become available, or know of any literature results showing burning velocity vs phi for methane using the unity lewis number assumption?


Thanks! 

Chris


On Wednesday, June 28, 2017 at 1:59:46 PM UTC-3, Arief Dahoe wrote:

Hello Chris,

If it is of help to you I can give you the numerical values for the velocity, temperature and species profiles of the laminar flame structure in Figure 6 of http://www.hysafe.org/science/KareemChin/FlowTurbulenceAndCombustion_v91_p281to317.pdf

This was obtained with multi-component diffusion (i.e. each species having its own Lewis number instead of a unity Lewis number assumption for the background fluid).

Which CFD-solver are you applying for your test-problem?

Arief Dahoe

arief...@gmail.com

unread,
Jun 28, 2017, 5:23:20 PM6/28/17
to canter...@googlegroups.com

Hello Chris,

Many thanks for clarifiying the question further.

Have you got the bibliographic details of the literature where you got the experimental data in the Figure below from? Or even better, have you got those papers in pf format?

Arief

Chris Cloney

unread,
Jun 30, 2017, 7:33:16 AM6/30/17
to Cantera Users' Group
Ok,

I figured it out from following the posts and information listed here: https://groups.google.com/forum/#!searchin/cantera-users/unity$20lewis$20number%7Csort:relevance/cantera-users/ZoUJYf3yVEw/Vg-2-s2TBgAJ.

For those of you who want the "hack" solution that just works 1D flames, here is an updated updateTrasnport function in StFlow:

void StFlow::updateTransport(doublereal* x, size_t j0, size_t j1)
{
     
int unityLe;

     
// CTCMod Unity Lewis number flag
     unityLe
= 1;

     
//CTCMod - add unity lewis number calculation
     
if (unityLe == 1){
   
for (size_t j = j0; j < j1; j++) {

       
// Not sure what this does (but likely sets gas params at location x in cell j)
        setGasAtMidpoint
(x,j);

       
// Compute viscosity
        m_visc
[j] = (m_dovisc ? m_trans->viscosity() : 0.0);
       
       
// Compute conductivity
        m_tcon
[j] = m_trans->thermalConductivity();

       
// Loop over all species
       
for (unsigned int k=0; k< m_nsp; k++){

       
// Compute diffusivity from unity Le assumption (assumes rho has been set)
                m_diff
[j*m_nsp+k]=m_tcon[j]/(m_rho[j]*m_cp[j]);
       
}        
   
}
     
} else if (m_do_multicomponent) {
       
for (size_t j = j0; j < j1; j++) {
            setGasAtMidpoint
(x,j);
            doublereal wtm
= m_thermo->meanMolecularWeight();
            doublereal rho
= m_thermo->density();
            m_visc
[j] = (m_dovisc ? m_trans->viscosity() : 0.0);
            m_trans
->getMultiDiffCoeffs(m_nsp, &m_multidiff[mindex(0,0,j)]);

           
// Use m_diff as storage for the factor outside the summation
           
for (size_t k = 0; k < m_nsp; k++) {
                m_diff
[k+j*m_nsp] = m_wt[k] * rho / (wtm*wtm);
           
}

            m_tcon
[j] = m_trans->thermalConductivity();
           
if (m_do_soret) {
                m_trans
->getThermalDiffCoeffs(m_dthermal.ptrColumn(0) + j*m_nsp);
           
}
       
}
   
} else { // mixture averaged transport
       
for (size_t j = j0; j < j1; j++) {
            setGasAtMidpoint
(x,j);
            m_visc
[j] = (m_dovisc ? m_trans->viscosity() : 0.0);
            m_trans
->getMixDiffCoeffs(&m_diff[j*m_nsp]);
            m_tcon
[j] = m_trans->thermalConductivity();
       
}
   
}
}

Put this in and use scons build and scons install to compile.

Here is a comparison between 1D flames with different reaction mechanisms



and here is the comparison with the openfoam flames (the differences I think are due to the conductivity assumptions in openfoam, which uses nitrogen parameters):


Arief - I will send you the references by early next week. All I have at the moment is that they are [1] Gu, [2] Rozenchang et al., and [3] Parks et al., but I need to pull the full references for a paper I am currently working on.
Auto Generated Inline Image 1
Auto Generated Inline Image 2

arief...@gmail.com

unread,
Jul 2, 2017, 10:51:49 AM7/2/17
to canter...@googlegroups.com

Hello Chris,

Many thanks. Looking forward to receiving the paper.

Regarding the laminar burning velocity. The unstretched laminar burning velocity of stoichiometric methane-air is experimentally determined to be between 37 and 40 cm/s.

In Figure 3 of the file at https://drive.google.com/open?id=0B-F0-MfGiztDRmZhcElWMkNKR28 I made a compilation of both stretched and unstretched laminar burning velocities.

It turns out that the unstretched values obtained with explosion bombs are grouped between 39 and 40 cm/s. Whereas those obtained with burner methods are grouped between 37 and 38 cm/s.

Now, looking at Figures 15 and 18 of https://drive.google.com/open?id=0B-F0-MfGiztDeFNKY0U4VE9PeFk , the vertical flow velocity component in the burner method goes through a minimum within the preheat zone. In CANTERA solutions of the flame structure there is no such minimum in the velocity profile.

(a) Are the experimental data in your graph obtained with explosion bombs or with burner setups?

(b) Could the discrepancy between the burning velocity obtained with explosion bombs and burner methods be caused by the minimum in the velocity profile within the preheat zone? Or is there another reason for this discrepancy?

Arief

From: Chris Cloney <chris.cloney...@gmail.com>
Date: Fri, Jun 30, 2017 at 12:33 PM
Subject: Re: [cantera-users] Re: Lewis number equal to unity.
To: Cantera Users' Group <canter...@googlegroups.com>


Chris Cloney

unread,
Jul 10, 2017, 11:21:31 AM7/10/17
to Cantera Users' Group

Hi Areif,

Here are the three experimental references from the plots above:

@ARTICLE{Gu2000,
  title={Laminar burning velocity and {M}arkstein lengths of methane-air mixtures},
  author={Gu, X.J. and Haw, M.Z. and Lawes, M/ and Woolley, R.},
  journal={Combustion and Flame},
  volume={121},
   pages={41--58},
  year={2000},
}

@ARTICLE{Rozenchan2002,
  title={Outware propagation, burning velocities, and chemical effects of methane flames up to 60 atm},
  author={Rozenchan, G. and Zhu, D.L. and Law, C.K. and Tse, S.D.},
  journal={Proceedings of the Combustion Institute},
  volume={29},
  pages={1461--1469},
  year={2002},
}

@ARTICLE{Park2011,
  title={Combustion characteristics of alternative gaseous fuels},
  author={Park, O. and Veloo, P.S. and Liu, N. and Egolfopoulos, F.N.},
  journal={Proceedings of the Combustion Institute},
  volume={33},
  pages={887--894},
  year={2011},
} 

On your questions, I am afraid I cannot be of much help at the moment. You can check the papers themselves for the experimental setup.

As for your more detailed questions, my work moves on to multiphase and hybrid flames but assuming planar, unstretched geometry with no flow divergence. Therefore, I have not looked into stretched single-phase flames enough to help at the moment - good luck though!

Maybe some one else knows more information in this area and can provide a better discussion?

arief...@gmail.com

unread,
Jul 11, 2017, 9:12:28 AM7/11/17
to canter...@googlegroups.com

Hello Chris,

Many thanks for the bibliographic references.


Arief

From: Chris Cloney <chris.cloney...@gmail.com>
Date: Mon, Jul 10, 2017 at 4:21 PM
Subject: Re: Re: [cantera-users] Re: Lewis number equal to unity.
To: Cantera Users' Group <canter...@googlegroups.com>


Reply all
Reply to author
Forward
0 new messages