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.894
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.001946      4.573
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.132
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.004379      4.015
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.961
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.594
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 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.36
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568      3.965
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 30 31 36 37 38 39 40 41 42 43 44 45 46 47 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

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 26 27 28 50 51 52 53 54 55 56 57 58 59 60 61
    to resolve AR H H2 H2O H2O2 HO2 O O2
##############################################################################
refine: discarding point at 0.00031250000000000006
refine: discarding point at 0.0009375000000000002
refine: discarding point at 0.0012500000000000002
refine: discarding point at 0.0015625000000000003
refine: discarding point at 0.0018750000000000004
refine: discarding point at 0.0021875
refine: discarding point at 0.0025000000000000005
refine: discarding point at 0.0028125000000000008
refine: discarding point at 0.0031250000000000006

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 46 47 48 49 53 54 55 56 62 63 64 65 66 67 68
    to resolve AR H H2 H2O H2O2 O O2
##############################################################################
refine: discarding point at 0.00109375
refine: discarding point at 0.0017187500000000002
refine: discarding point at 0.0023437500000000003
refine: discarding point at 0.0032812500000000003
refine: discarding point at 0.0040625
refine: discarding point at 0.004687500000000001
refine: discarding point at 0.005312500000000001
refine: discarding point at 0.005937500000000002
refine: discarding point at 0.006562500000000001
refine: discarding point at 0.007187500000000001

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 33 44 45 46 55 56 57 58 66 67 68 69 70 71 72 76
    to resolve AR H H2 H2O H2O2 HO2 O O2
##############################################################################
refine: discarding point at 0.0006250000000000001
refine: discarding point at 0.0026562500000000006
refine: discarding point at 0.0034375000000000005
refine: discarding point at 0.005000000000000001
refine: discarding point at 0.006250000000000001
refine: discarding point at 0.0075000000000000015
refine: discarding point at 0.008125
refine: discarding point at 0.00875
refine: discarding point at 0.009375000000000001
refine: discarding point at 0.010000000000000002

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 57 58
    to resolve H2O2
##############################################################################
refine: discarding point at 0.00203125
refine: discarding point at 0.0037500000000000007
refine: discarding point at 0.0078125
refine: discarding point at 0.009062500000000001
refine: discarding point at 0.010312500000000002
refine: discarding point at 0.010937500000000003

..............................................................................
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
##############################################################################
refine: discarding point at 0.011250000000000003

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

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

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

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.288
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568      4.069
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps       0.04988      2.018
Attempt Newton solution of steady-state problem...    success.

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 55 56 57 58 65 66 67 69 70 71 72 73 74 75 76 78
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.010625000000000002
refine: discarding point at 0.012500000000000002
refine: discarding point at 0.013125000000000001
refine: discarding point at 0.013750000000000002
refine: discarding point at 0.014375000000000002
refine: discarding point at 0.015000000000000003
refine: discarding point at 0.015625
refine: discarding point at 0.01625
refine: discarding point at 0.016875
refine: discarding point at 0.0175
refine: discarding point at 0.018125000000000002
refine: discarding point at 0.018750000000000003
refine: discarding point at 0.019375000000000003
refine: discarding point at 0.020000000000000004
refine: discarding point at 0.020625000000000004
refine: discarding point at 0.021250000000000005
refine: discarding point at 0.021875000000000006
refine: discarding point at 0.022500000000000006
refine: discarding point at 0.023125000000000007

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 48 49 56 61 62 63 64 65 66 67 68 69 70 71
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.012187500000000004
refine: discarding point at 0.013437500000000002
refine: discarding point at 0.014687500000000003
refine: discarding point at 0.0159375
refine: discarding point at 0.0171875
refine: discarding point at 0.018437500000000002
refine: discarding point at 0.019687500000000004
refine: discarding point at 0.020937500000000005
refine: discarding point at 0.022187500000000006
refine: discarding point at 0.023437500000000007
refine: discarding point at 0.024062500000000007
refine: discarding point at 0.024687500000000008

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
    to resolve AR H H2 H2O H2O2 HO2 O O2
##############################################################################
refine: discarding point at 0.023750000000000007
refine: discarding point at 0.025000000000000005
refine: discarding point at 0.025625000000000002
refine: discarding point at 0.026250000000000002
refine: discarding point at 0.026875000000000003

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 63 64 65 66 67 68 84 85 88
    to resolve H H2O H2O2 O O2 OH point 85
##############################################################################
refine: discarding point at 0.0253125
refine: discarding point at 0.027187500000000003
refine: discarding point at 0.027812500000000004
refine: discarding point at 0.028437500000000004
refine: discarding point at 0.029062500000000005

..............................................................................
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 70 71 80 81 84 86 87
    to resolve AR H2O H2O2 O O2 point 87
##############################################################################
refine: discarding point at 0.026562500000000003
refine: discarding point at 0.028125000000000004
refine: discarding point at 0.029375000000000005
refine: discarding point at 0.030000000000000006
refine: discarding point at 0.030625000000000003

..............................................................................
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 69 88
    to resolve H2O2 point 88
##############################################################################
refine: discarding point at 0.029687500000000006
refine: discarding point at 0.0309375

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

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

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

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.245
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568      3.964
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps       0.04988      2.231
Attempt Newton solution of steady-state problem...    success.

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 69 70 71 72 73 79 80 81 82 83 86 87 88 89 90 91 92 94
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.0056250000000000015
refine: discarding point at 0.012812500000000001
refine: discarding point at 0.015312500000000001
refine: discarding point at 0.017812500000000002
refine: discarding point at 0.020312500000000004
refine: discarding point at 0.031875
refine: discarding point at 0.0325
refine: discarding point at 0.033125
refine: discarding point at 0.03375
refine: discarding point at 0.034375
refine: discarding point at 0.035
refine: discarding point at 0.035625000000000004
refine: discarding point at 0.036250000000000004
refine: discarding point at 0.036875000000000005
refine: discarding point at 0.037500000000000006
refine: discarding point at 0.038125000000000006
refine: discarding point at 0.03875000000000001
refine: discarding point at 0.03937500000000001
refine: discarding point at 0.04000000000000001
refine: discarding point at 0.04062500000000001
refine: discarding point at 0.04125000000000001
refine: discarding point at 0.04187500000000001
refine: discarding point at 0.04250000000000001
refine: discarding point at 0.04312500000000001

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 55 76 77 78 79 80 81 82 83 84
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.03125
refine: discarding point at 0.0328125
refine: discarding point at 0.0340625
refine: discarding point at 0.035312500000000004
refine: discarding point at 0.036562500000000005
refine: discarding point at 0.037812500000000006
refine: discarding point at 0.03906250000000001
refine: discarding point at 0.04031250000000001
refine: discarding point at 0.04156250000000001
refine: discarding point at 0.04343750000000001

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 71 72 75 76 77 78 79 80 81
    to resolve AR H H2 H2O H2O2 O O2
##############################################################################
refine: discarding point at 0.0334375
refine: discarding point at 0.035937500000000004
refine: discarding point at 0.038437500000000006
refine: discarding point at 0.04218750000000001
refine: discarding point at 0.04406250000000001
refine: discarding point at 0.04468750000000001

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

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

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

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

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

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

..............................................................................
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps     0.0003844      4.202
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps      0.006568      3.899
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps       0.03325      2.868
Attempt Newton solution of steady-state problem...    failure.
Take 10 timesteps        0.1683      1.447
Attempt Newton solution of steady-state problem...    success.

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 70 71 72 73 74 75 77 78 79 81 82 83 84 85 86 87 88 89 90 91 92
    to resolve AR H H2 H2O H2O2 HO2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.04531250000000001
refine: discarding point at 0.04625000000000001
refine: discarding point at 0.046875000000000014
refine: discarding point at 0.047500000000000014
refine: discarding point at 0.048125000000000015
refine: discarding point at 0.048750000000000016
refine: discarding point at 0.049375000000000016
refine: discarding point at 0.05000000000000001
refine: discarding point at 0.050625
refine: discarding point at 0.051250000000000004
refine: discarding point at 0.051875000000000004
refine: discarding point at 0.052500000000000005
refine: discarding point at 0.053125000000000006
refine: discarding point at 0.053750000000000006
refine: discarding point at 0.05437500000000001
refine: discarding point at 0.05500000000000001
refine: discarding point at 0.05562500000000001
refine: discarding point at 0.05625000000000001

..............................................................................
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 78 79 80 81 84 85 86 87 88 89
    to resolve AR H H2 H2O H2O2 O O2 OH T velocity
##############################################################################
refine: discarding point at 0.046562500000000014
refine: discarding point at 0.047812500000000015
refine: discarding point at 0.049062500000000016
refine: discarding point at 0.05031250000000001
refine: discarding point at 0.051562500000000004
refine: discarding point at 0.052812500000000005
refine: discarding point at 0.054062500000000006
refine: discarding point at 0.05531250000000001
refine: discarding point at 0.05656250000000001

..............................................................................
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 83 84 85 86 87 88
    to resolve AR H H2 H2O O O2
##############################################################################
refine: discarding point at 0.048437500000000015
refine: discarding point at 0.050937500000000004
refine: discarding point at 0.053437500000000006

..............................................................................
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 39 52
    to resolve H2O2 HO2
##############################################################################

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

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

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

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

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

..............................................................................
##############################################################################
Refining grid in flame.
    New points inserted after grid points 77 78 79 84 85 86 87 88 93 94 95 96 97 98 99
    to resolve AR H H2 H2O H2O2 O O2 OH
##############################################################################
refine: discarding point at 0.05718750000000001
refine: discarding point at 0.05781250000000001
refine: discarding point at 0.05843750000000001
refine: discarding point at 0.05906250000000001
refine: discarding point at 0.05968750000000001
refine: discarding point at 0.06031250000000001
refine: discarding point at 0.060937500000000006
refine: discarding point at 0.061562500000000006
refine: discarding point at 0.0621875
refine: discarding point at 0.0628125
refine: discarding point at 0.06343750000000001

..............................................................................
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 72 73 86 87 95 96 97 98 99 100
    to resolve AR H H2 H2O H2O2 O O2
##############################################################################
refine: discarding point at 0.05687500000000001
refine: discarding point at 0.05812500000000001
refine: discarding point at 0.05937500000000001
refine: discarding point at 0.06062500000000001
refine: discarding point at 0.061875
refine: discarding point at 0.06375
refine: discarding point at 0.064375
refine: discarding point at 0.065

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

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

..............................................................................
no new points needed in flame
refine: discarding point at 0.05875000000000001
refine: discarding point at 0.0625
refine: discarding point at 0.0640625

Statistics:

 Grid   Timesteps  Functions      Time  Jacobians      Time
    8           0        395    0.0027         12    0.0037
   13          20        345    0.0043          8    0.0049
   23          10        112    0.0026          4    0.0050
   32          10         86    0.0028          3    0.0054
   42           0         14    0.0006          1    0.0024
   54           0         14    0.0008          1    0.0032
   66           0         10    0.0007          1    0.0040
   72           0         10    0.0008          1    0.0044
   79           0          8    0.0007          1    0.0048
   79           0          2    0.0002          1    0.0048
   79           0         30    0.0025          1    0.0049
   88           0         10    0.0010          1    0.0054
   89           0          6    0.0006          1    0.0055
   89          20        332    0.0315         17    0.0934
  107           0         46    0.0053          2    0.0133
  113           0         79    0.0096          3    0.0212
  118           0        118    0.0150          3    0.0222
  124           0         76    0.0101          2    0.0156
  120           0         66    0.0085          2    0.0150
  120           0         54    0.0069          2    0.0150
  119          30        503    0.0643         18    0.1344
  116           0         34    0.0043          1    0.0073
  118           0         44    0.0056          2    0.0150
  128           0         44    0.0063          2    0.0167
  132           0         58    0.0083          2    0.0169
  134           0         46    0.0068          2    0.0174
  134           0         40    0.0057          1    0.0087
  133          30        582    0.0844         23    0.1960
  127           0         24    0.0033          1    0.0081
  127           0         36    0.0049          1    0.0080
  130           0         44    0.0061          2    0.0163
  130           0         32    0.0045          1    0.0081
  129          40        891    0.1242         31    0.2541
  132           0         30    0.0042          1    0.0082
  134           0         20    0.0028          1    0.0084
  137           0         42    0.0062          1    0.0086
  139           0         18    0.0027          1    0.0088
  139           0         62    0.0094          6    0.0535
  143           0         60    0.0091          2    0.0181
  145           0         32    0.0049          1    0.0091

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.072 seconds)

Gallery generated by Sphinx-Gallery