Detached flat flame stabilized at a stagnation point#

This script simulates a lean hydrogen-oxygen flame stabilized in a strained flowfield at an axisymmetric stagnation point on a non-reacting surface. The solution begins with a flame attached to the inlet (burner), and the mass flow rate is progressively increased, causing the flame to detach and move closer to the surface.

This example illustrates use of the new ‘prune’ grid refinement parameter, which allows grid points to be removed if they are no longer required to resolve the solution. This is important here, since the flamefront moves as the mass flowrate is increased. Without using ‘prune’, a large number of grid points would be concentrated upstream of the flame, where the flamefront had been previously. (To see this, try setting prune to zero.)

Requires: cantera >= 3.0

Tags: Python combustion 1D flow premixed flame strained flame

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> inlet <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

    Mass Flux:         0.06 kg/m^2/s
    Temperature:        373 K
    Mass Fractions:
                      H2     0.01151
                      O2      0.1015
                      AR       0.887



>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> flame <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

    Pressure:        5066 Pa

-------------------------------------------------------------------------------
          z    velocity  spread_rate           T      lambda      eField
-------------------------------------------------------------------------------
          0       1.142           0         373           0           0
       0.04      0.9133           0        1559           0           0
       0.08       0.685           0        2153           0           0
       0.12      0.4567           0        2153           0           0
       0.16      0.2283           0        1602           0           0
        0.2           0           0         500           0           0

-------------------------------------------------------------------------------
          z          H2           H           O          O2          OH
-------------------------------------------------------------------------------
          0     0.01151           0           0      0.1015           0
       0.04     0.00408   2.922e-05    0.000304     0.04156    0.001912
       0.08    0.000365   4.383e-05    0.000456     0.01159    0.002868
       0.12    0.000365   4.383e-05    0.000456     0.01159    0.002868
       0.16    0.000365   4.383e-05    0.000456     0.01159    0.002868
        0.2    0.000365   4.383e-05    0.000456     0.01159    0.002868

-------------------------------------------------------------------------------
          z         H2O         HO2        H2O2          AR          N2
-------------------------------------------------------------------------------
          0           0           0           0       0.887           0
       0.04     0.06512   2.517e-07   9.293e-09       0.887           0
       0.08     0.09768   3.776e-07   1.394e-08       0.887           0
       0.12     0.09768   3.776e-07   1.394e-08       0.887           0
       0.16     0.09768   3.776e-07   1.394e-08       0.887           0
        0.2     0.09768   3.776e-07   1.394e-08       0.887           0

-------------------------------------------------------------------------------
          z
-------------------------------------------------------------------------------
          0
       0.04
       0.08
       0.12
       0.16
        0.2


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> surface <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

    Temperature:        500 K


************ Solving on 6 point grid with energy equation enabled ************

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0001139       4.89
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.002919      4.575
Attempt Newton solution of steady-state problem...    success.

Problem solved on [6] point grid(s).

..............................................................................
grid refinement disabled.

******************** Solving with grid refinement enabled ********************

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [6] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T spread_rate velocity
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0002563      5.119
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.004379      4.025
Attempt Newton solution of steady-state problem...    success.

Problem solved on [11] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T spread_rate velocity
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.931
Attempt Newton solution of steady-state problem...    success.

Problem solved on [21] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 15 16 17 18 19
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T spread_rate velocity
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.565
Attempt Newton solution of steady-state problem...    success.

Problem solved on [30] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 24 25 26 27 28
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T spread_rate velocity
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [40] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 33 34 35 36 37 38
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T spread_rate velocity
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [52] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 48 49 50
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T spread_rate velocity
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [64] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 62
    to resolve H2O2 HO2 OH spread_rate
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [70] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve H2O2 HO2 OH
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [77] point grid(s).

..............................................................................
no new points needed in flame

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [77] point grid(s).

..............................................................................
no new points needed in flame

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [77] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 14 15 16 17 18 26 27 30 31
    to resolve AR H H2O H2O2 O O2
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [86] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 20
    to resolve H2O2
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [87] point grid(s).

..............................................................................
no new points needed in flame

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.361
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568      4.011
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps        0.1122      1.144
Attempt Newton solution of steady-state problem...    success.

Problem solved on [87] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 25 26 27 28 29 36 37 38 39 40 41 42 43 44 45 46 47 48 50 78 83 84 85
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T spread_rate velocity
##############################################################################
refine: discarding point at 0.00015625000000000003
refine: discarding point at 0.0004687500000000001
refine: discarding point at 0.0007812500000000002
refine: discarding point at 0.00109375
refine: discarding point at 0.0014062500000000004
refine: discarding point at 0.0017187500000000002
refine: discarding point at 0.00203125

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [103] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 46 47 48 49 50 51 52 53 54 55 56 57 58 59
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH
##############################################################################
refine: discarding point at 0.00031250000000000006
refine: discarding point at 0.0009375000000000002
refine: discarding point at 0.0015625000000000003
refine: discarding point at 0.0021875
refine: discarding point at 0.0025000000000000005
refine: discarding point at 0.0028125000000000008
refine: discarding point at 0.0031250000000000006
refine: discarding point at 0.0040625
refine: discarding point at 0.004687500000000001
refine: discarding point at 0.005312500000000001
refine: discarding point at 0.005937500000000002

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [106] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 39 40 41 42 43 44 48 49 50 51 52 55 56 57 58 59 60 61 62 63 66
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH point 63
##############################################################################
refine: discarding point at 0.0006250000000000001
refine: discarding point at 0.0023437500000000003
refine: discarding point at 0.0032812500000000003
refine: discarding point at 0.005000000000000001
refine: discarding point at 0.006250000000000001
refine: discarding point at 0.006875000000000001
refine: discarding point at 0.0075000000000000015
refine: discarding point at 0.00875

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [119] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 43 44 45 56 57 58 73 74
    to resolve H H2 H2O H2O2 O O2 point 74
##############################################################################
refine: discarding point at 0.0026562500000000006
refine: discarding point at 0.0034375000000000005
refine: discarding point at 0.006562500000000001
refine: discarding point at 0.009375000000000001
refine: discarding point at 0.010000000000000002
refine: discarding point at 0.010625000000000002
refine: discarding point at 0.011250000000000003

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [120] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 58 59 74 75 76
    to resolve H2O2 O O2 point 74
##############################################################################
refine: discarding point at 0.0018750000000000004
refine: discarding point at 0.0037500000000000007
refine: discarding point at 0.008125
refine: discarding point at 0.009687500000000002
refine: discarding point at 0.011562500000000003
refine: discarding point at 0.012187500000000004

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [119] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 56 76
    to resolve H2O2 point 76
##############################################################################
refine: discarding point at 0.010937500000000003
refine: discarding point at 0.012500000000000002
refine: discarding point at 0.013125000000000001

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [118] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 55
    to resolve H2O2
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [119] point grid(s).

..............................................................................
no new points needed in flame

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.284
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568      4.056
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps       0.03325      2.127
Attempt Newton solution of steady-state problem...    success.

Problem solved on [119] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 62 63 64 65 69 70 71 72 73 74 75 76 77 78 79 80 81
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.013437500000000002
refine: discarding point at 0.014062500000000002
refine: discarding point at 0.014687500000000003
refine: discarding point at 0.015312500000000001
refine: discarding point at 0.0159375
refine: discarding point at 0.0165625
refine: discarding point at 0.0171875
refine: discarding point at 0.017812500000000002
refine: discarding point at 0.018437500000000002
refine: discarding point at 0.019062500000000003
refine: discarding point at 0.019687500000000004
refine: discarding point at 0.020312500000000004
refine: discarding point at 0.020937500000000005
refine: discarding point at 0.021562500000000005
refine: discarding point at 0.022187500000000006
refine: discarding point at 0.022812500000000006
refine: discarding point at 0.023437500000000007
refine: discarding point at 0.024062500000000007
refine: discarding point at 0.024687500000000008
refine: discarding point at 0.0253125
refine: discarding point at 0.025937500000000002
refine: discarding point at 0.026562500000000003
refine: discarding point at 0.027187500000000003

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [113] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 47 58 59 60 61 62 63 64 65 66 67 68 69 70
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.012812500000000001
refine: discarding point at 0.014375000000000002
refine: discarding point at 0.015625
refine: discarding point at 0.016875
refine: discarding point at 0.018125000000000002
refine: discarding point at 0.019375000000000003
refine: discarding point at 0.020625000000000004
refine: discarding point at 0.021875000000000006
refine: discarding point at 0.023125000000000007
refine: discarding point at 0.024375000000000008
refine: discarding point at 0.025625000000000002
refine: discarding point at 0.027500000000000004

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [115] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
    to resolve AR H H2 H2O H2O2 O O2
##############################################################################
refine: discarding point at 0.027812500000000004
refine: discarding point at 0.029375000000000005

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [129] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 69 70
    to resolve H2O2
##############################################################################
refine: discarding point at 0.03125
refine: discarding point at 0.031875

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [129] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 71 79 80
    to resolve AR H2O2
##############################################################################
refine: discarding point at 0.030625000000000003
refine: discarding point at 0.0321875

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [130] point grid(s).

..............................................................................
no new points needed in flame

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.236
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568       3.98
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps        0.1122        1.1
Attempt Newton solution of steady-state problem...    success.

Problem solved on [130] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 71 72 73 74 75 82 83 84 85 86 87 88 89 90 91 93
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.015000000000000003
refine: discarding point at 0.0175
refine: discarding point at 0.020000000000000004
refine: discarding point at 0.022500000000000006
refine: discarding point at 0.026250000000000002
refine: discarding point at 0.028125000000000004
refine: discarding point at 0.0328125
refine: discarding point at 0.0334375
refine: discarding point at 0.0340625
refine: discarding point at 0.0346875
refine: discarding point at 0.035312500000000004
refine: discarding point at 0.035937500000000004
refine: discarding point at 0.036562500000000005
refine: discarding point at 0.037187500000000005
refine: discarding point at 0.037812500000000006
refine: discarding point at 0.038437500000000006
refine: discarding point at 0.03906250000000001
refine: discarding point at 0.03968750000000001
refine: discarding point at 0.04031250000000001
refine: discarding point at 0.04093750000000001
refine: discarding point at 0.04156250000000001
refine: discarding point at 0.04218750000000001
refine: discarding point at 0.04281250000000001
refine: discarding point at 0.04343750000000001
refine: discarding point at 0.04406250000000001

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [121] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 56 70 71 72 73 74 75 76 77 78 79 80
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.0325
refine: discarding point at 0.03375
refine: discarding point at 0.035
refine: discarding point at 0.036250000000000004
refine: discarding point at 0.037500000000000006
refine: discarding point at 0.03875000000000001
refine: discarding point at 0.04000000000000001
refine: discarding point at 0.04125000000000001
refine: discarding point at 0.04250000000000001
refine: discarding point at 0.04437500000000001

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [123] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 48 69 70 71 72 73 74 75 76 77 78 79 80
    to resolve AR H H2 H2O H2O2 HO2 O O2
##############################################################################
refine: discarding point at 0.034375
refine: discarding point at 0.036875000000000005
refine: discarding point at 0.03937500000000001
refine: discarding point at 0.04312500000000001
refine: discarding point at 0.04500000000000001
refine: discarding point at 0.04562500000000001

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [130] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 72
    to resolve H2O2
##############################################################################
refine: discarding point at 0.04468750000000001
refine: discarding point at 0.04593750000000001

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [129] point grid(s).

..............................................................................
no new points needed in flame

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.191
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568      3.854
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps       0.04988       2.25
Attempt Newton solution of steady-state problem...    success.

Problem solved on [129] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 73 74 75 76 77 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.046562500000000014
refine: discarding point at 0.047187500000000014
refine: discarding point at 0.047812500000000015
refine: discarding point at 0.048437500000000015
refine: discarding point at 0.049062500000000016
refine: discarding point at 0.04968750000000001
refine: discarding point at 0.05031250000000001
refine: discarding point at 0.050937500000000004
refine: discarding point at 0.051562500000000004
refine: discarding point at 0.052187500000000005
refine: discarding point at 0.052812500000000005
refine: discarding point at 0.053437500000000006
refine: discarding point at 0.054062500000000006
refine: discarding point at 0.05468750000000001
refine: discarding point at 0.05531250000000001
refine: discarding point at 0.05593750000000001
refine: discarding point at 0.05656250000000001
refine: discarding point at 0.05718750000000001
refine: discarding point at 0.05781250000000001

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [130] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 80 81 82 83 84 85 86 87 88 89
    to resolve AR H H2 H2O H2O2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.04625000000000001
refine: discarding point at 0.047500000000000014
refine: discarding point at 0.048750000000000016
refine: discarding point at 0.05000000000000001
refine: discarding point at 0.051250000000000004
refine: discarding point at 0.052500000000000005
refine: discarding point at 0.053750000000000006
refine: discarding point at 0.05500000000000001
refine: discarding point at 0.05625000000000001
refine: discarding point at 0.05843750000000001

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [130] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 82 83 84 85 86 87
    to resolve AR H H2 H2O O O2
##############################################################################
refine: discarding point at 0.048125000000000015
refine: discarding point at 0.050625
refine: discarding point at 0.053125000000000006
refine: discarding point at 0.05687500000000001

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [132] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 39 50 51
    to resolve H2O2 HO2
##############################################################################

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [135] point grid(s).

..............................................................................
no new points needed in flame

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844       4.15
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568      3.794
Attempt Newton solution of steady-state problem...    success.

Problem solved on [135] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 77 78 79 80 81 82 83 84 85 86 87 88 93 94 95 96 97 104
    to resolve AR H H2 H2O H2O2 O O2 OH velocity
##############################################################################
refine: discarding point at 0.05875000000000001
refine: discarding point at 0.05937500000000001
refine: discarding point at 0.06000000000000001
refine: discarding point at 0.06062500000000001
refine: discarding point at 0.061250000000000006
refine: discarding point at 0.061875
refine: discarding point at 0.0625
refine: discarding point at 0.063125
refine: discarding point at 0.06375
refine: discarding point at 0.064375
refine: discarding point at 0.065
refine: discarding point at 0.065625

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [141] point grid(s).

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 89 96 97 98 99 100 101
    to resolve AR H H2 H2O H2O2 O O2
##############################################################################
refine: discarding point at 0.05812500000000001
refine: discarding point at 0.05968750000000001
refine: discarding point at 0.060937500000000006
refine: discarding point at 0.0621875
refine: discarding point at 0.06343750000000001
refine: discarding point at 0.06468750000000001
refine: discarding point at 0.06625

..............................................................................
Attempt Newton solution of steady-state problem...    success.

Problem solved on [141] point grid(s).

..............................................................................
no new points needed in flame
refine: discarding point at 0.06031250000000001
refine: discarding point at 0.0628125

Statistics:

 Grid   Timesteps  Functions      Time  Jacobians      Time
    8           0        414    0.0054         13    0.0067
   13          20        375    0.0086          9    0.0093
   23          10        142    0.0063          4    0.0083
   32          10         84    0.0059          3    0.0107
   42           0         14    0.0012          1    0.0041
   54           0         20    0.0022          1    0.0053
   66           0         10    0.0013          1    0.0065
   72           0          8    0.0012          1    0.0072
   79           0          6    0.0010          1    0.0079
   79           0          2    0.0003          1    0.0079
   79           0         26    0.0042          1    0.0079
   88           0          6    0.0011          1    0.0089
   89           0          4    0.0007          1    0.0089
   89          30        369    0.0669         11    0.0996
  105           0         90    0.0192          4    0.0427
  108           0         31    0.0068          2    0.0220
  121           0         38    0.0093          1    0.0123
  122           0         34    0.0084          1    0.0125
  121           0         32    0.0078          1    0.0124
  120           0         28    0.0068          1    0.0123
  121           0         26    0.0064          1    0.0124
  121          30        371    0.0922         14    0.1735
  115           0         20    0.0047          1    0.0119
  117           0         26    0.0062          1    0.0120
  131           0         30    0.0080          1    0.0134
  131           0         24    0.0065          1    0.0158
  132           0         14    0.0038          1    0.0135
  132          30        345    0.0927         13    0.1762
  123           0         20    0.0050          1    0.0127
  125           0         22    0.0056          1    0.0127
  132           0         26    0.0070          1    0.0134
  131           0         20    0.0053          1    0.0133
  131          30        558    0.1504         16    0.2153
  132           0         16    0.0043          1    0.0136
  132           0         20    0.0053          1    0.0133
  134           0         22    0.0060          1    0.0135
  137           0         18    0.0049          1    0.0139
  137          20        290    0.0798         11    0.1544
  143           0         24    0.0069          1    0.0145
  143           0         20    0.0057          1    0.0144

from pathlib import Path
import cantera as ct


# parameter values
p = 0.05 * ct.one_atm  # pressure
tburner = 373.0  # burner temperature
tsurf = 500.0

# each mdot value will be solved to convergence, with grid refinement, and
# then that solution will be used for the next mdot
mdot = [0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12]  # kg/m^2/s

rxnmech = 'h2o2.yaml'  # reaction mechanism file
comp = 'H2:1.8, O2:1, AR:7'  # premixed gas composition

# The solution domain is chosen to be 20 cm
width = 0.2  # m

loglevel = 1  # amount of diagnostic output (0 to 5)

# Grid refinement parameters
ratio = 3
slope = 0.1
curve = 0.2
prune = 0.06

# Set up the problem
gas = ct.Solution(rxnmech)

# set state to that of the unburned gas at the burner
gas.TPX = tburner, p, comp

# Create the stagnation flow object with a non-reactive surface.  (To make the
# surface reactive, supply a surface reaction mechanism. See example
# catalytic_combustion.py for how to do this.)
sim = ct.ImpingingJet(gas=gas, width=width)

# set the mass flow rate at the inlet
sim.inlet.mdot = mdot[0]

# set the surface state
sim.surface.T = tsurf

sim.set_grid_min(1e-4)
sim.set_refine_criteria(ratio=ratio, slope=slope, curve=curve, prune=prune)

sim.set_initial_guess(products='equil')  # assume adiabatic equilibrium products
sim.show()

sim.solve(loglevel, auto=True)

output_path = Path() / "stagnation_flame_data"
output_path.mkdir(parents=True, exist_ok=True)

if "native" in ct.hdf_support():
    output = output_path / "stagnation_flame.h5"
else:
    output = output_path / "stagnation_flame.yaml"
output.unlink(missing_ok=True)

for m, md in enumerate(mdot):
    sim.inlet.mdot = md
    sim.solve(loglevel)
    sim.save(output, name=f"mdot-{m}", description=f"mdot = {md} kg/m2/s")

    # write the velocity, temperature, and mole fractions to a CSV file
    sim.save(output_path / f"stagnation_flame_{m}.csv", basis="mole", overwrite=True)

sim.show_stats()

Total running time of the script: (0 minutes 2.947 seconds)

Gallery generated by Sphinx-Gallery