
:html_theme.sidebar_secondary.remove:

.. py:currentmodule:: cantera


.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "examples/python/onedim/flame_initial_guess.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_examples_python_onedim_flame_initial_guess.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_examples_python_onedim_flame_initial_guess.py:


Saving, loading, and restarting 1D calculations
===============================================

A freely-propagating, premixed methane-air flame.
Examples of saving and loading a flame and restarting
with different initial guesses.

Requires: cantera >= 3.0

.. tags:: Python, combustion, 1D flow, flame speed, premixed flame, saving output

.. GENERATED FROM PYTHON SOURCE LINES 13-21

.. code-block:: Python

    import sys
    from pathlib import Path
    import cantera as ct
    try:
        import pandas as pd
    except ImportError:
        pd = None








.. GENERATED FROM PYTHON SOURCE LINES 22-24

Initialization
--------------

.. GENERATED FROM PYTHON SOURCE LINES 24-58

.. code-block:: Python


    # Simulation parameters
    p = ct.one_atm  # pressure [Pa]
    Tin = 300.0  # unburned gas temperature [K]
    reactants = "CH4:0.45, O2:1.0, N2:3.76"

    width = 0.03  # m

    # Solution object used to compute mixture properties
    gas = ct.Solution("gri30.yaml")
    gas.TPX = Tin, p, reactants

    # Flame object
    f = ct.FreeFlame(gas, width=width)
    # These refine criteria are for a relatively quick convergence for the example
    # and may not be suitable for a publication-quality flame speed calculation
    refine_criteria = {"ratio": 3, "slope": 0.1, "curve": 0.2}
    f.set_refine_criteria(**refine_criteria)
    f.solve(loglevel=1, auto=True)

    def describe(flame):
        """Print a short description of the flame, with a few properties."""
        print(f"\nFlame speed                    = {flame.velocity[0] * 100 :.2f} cm/s")
        print(f"Maximum temperature            = {flame.T.max() :.0f} K")
        # Find the location of the peak OH mole fraction
        oh_index = flame.gas.species_index("OH")
        grid_index = flame.X[oh_index].argmax()
        oh_peak = flame.grid[grid_index]
        print(f"Peak OH mole fraction location = {oh_peak * 100 :.2f} cm")
        print(f"Solved with {flame.grid.size} grid points\n")


    describe(f)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


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

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 2.136e-05  log(ss)= 4.776     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.0005474  log(ss)= 3.985     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.01403    log(ss)= 3.476     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.0004681  log(ss)= 4.589     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 1.758e-05  log(ss)= 6.658     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.0001001  log(ss)= 5.399     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.003848   log(ss)= 3.671     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.06575    log(ss)= 0.6248    

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [9] point grid(s).
    grid refinement disabled.

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

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [9] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 1 2 3 4 5 6 
        to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NCO NO NO2 O O2 OH T velocity 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.0001709  log(ss)= 4.735     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 8.553e-06  log(ss)= 6.701     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.0001461  log(ss)= 4.928     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [15] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 0 3 4 5 6 7 8 
        to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N N2 N2O NCO NO NO2 O O2 OH T point 0 velocity 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.0001709  log(ss)= 4.857     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [22] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 3 5 6 7 8 9 10 11 12 13 
        to resolve C C2H C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCCOH HCN HCNO HCO HNCO HO2 N N2 N2O NCO NH3 NO NO2 O O2 OH T point 3 velocity 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 7.594e-05  log(ss)= 5.452     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [32] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 9 10 11 12 13 14 15 16 17 18 20 
        to resolve C C2H C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCCOH HCN HCNO HCO HNCO HO2 N N2 N2O NCO NO NO2 O O2 OH T velocity 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [43] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 11 12 13 14 15 16 17 18 19 20 21 39 
        to resolve C C2H C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCCOH HCN HCNO HCO HNCO HO2 N N2 N2O NCO NO NO2 O O2 OH T velocity 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [55] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 52 
        to resolve C C2H C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO H H2 H2O H2O2 HCCO HCCOH HCN HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [73] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 71 
        to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH H H2O2 HCCO HCCOH HCN HCO HO2 NO2 O OH point 71 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [97] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 40 41 42 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 
        to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2OH CH3 CH3CHO HCCO HCO 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [117] point grid(s).
    no new points needed in flame

    Flame speed                    = 34.45 cm/s
    Maximum temperature            = 2138 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 117 grid points





.. GENERATED FROM PYTHON SOURCE LINES 59-61

Save the flame in a few different formats
-----------------------------------------

.. GENERATED FROM PYTHON SOURCE LINES 61-85

.. code-block:: Python


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

    print("Save YAML")
    yaml_filepath = output_path / "flame.yaml"
    f.save(yaml_filepath, name="solution", description="Initial methane flame",
           overwrite=True)

    print("Save CSV")
    csv_filepath = output_path / "flame.csv"
    f.save(csv_filepath, basis="mole", overwrite=True)

    if "native" in ct.hdf_support():
        # HDF is not a required dependency
        hdf_filepath = output_path / "flame.h5"
        hdf_filepath.unlink(missing_ok=True)
        f.save(hdf_filepath, name="freeflame", description="Initial methane flame",
               overwrite=True)
        print("Save HDF\n")
    else:
        print(f"Skipping HDF: Cantera compiled without HDF support\n")
        hdf_filepath = None





.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    Save YAML
    Save CSV
    Save HDF





.. GENERATED FROM PYTHON SOURCE LINES 86-90

Restore the flame from different formats
----------------------------------------

Restore solution from YAML

.. GENERATED FROM PYTHON SOURCE LINES 90-95

.. code-block:: Python

    gas.TPX = Tin, p, reactants
    f2 = ct.FreeFlame(gas, width=width)
    f2.restore(yaml_filepath, name="solution")
    describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.45 cm/s
    Maximum temperature            = 2138 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 117 grid points





.. GENERATED FROM PYTHON SOURCE LINES 96-97

Restore solution from HDF

.. GENERATED FROM PYTHON SOURCE LINES 97-103

.. code-block:: Python

    if hdf_filepath:
        gas.TPX = Tin, p, reactants
        f2 = ct.FreeFlame(gas, width=width)
        f2.restore(hdf_filepath, name="freeflame")
        describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.45 cm/s
    Maximum temperature            = 2138 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 117 grid points





.. GENERATED FROM PYTHON SOURCE LINES 104-107

Restore the flame via initial guess
-----------------------------------
Load initial guess from CSV file directly

.. GENERATED FROM PYTHON SOURCE LINES 107-112

.. code-block:: Python

    gas.TPX = Tin, p, reactants  # set the gas T back to the inlet before making new flame
    f2 = ct.FreeFlame(gas, width=width)
    f2.set_initial_guess(data=csv_filepath)
    describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.45 cm/s
    Maximum temperature            = 2138 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 117 grid points





.. GENERATED FROM PYTHON SOURCE LINES 113-114

Load initial guess from HDF file directly

.. GENERATED FROM PYTHON SOURCE LINES 114-120

.. code-block:: Python

    if hdf_filepath:
        gas.TPX = Tin, p, reactants  # set the gas T back to the inlet before making new flame
        f2 = ct.FreeFlame(gas, width=width)
        f2.set_initial_guess(data=hdf_filepath, group="freeflame")
        describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.45 cm/s
    Maximum temperature            = 2138 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 117 grid points





.. GENERATED FROM PYTHON SOURCE LINES 121-122

Load initial guess from HDF file via SolutionArray

.. GENERATED FROM PYTHON SOURCE LINES 122-131

.. code-block:: Python

    if hdf_filepath:
        arr2 = ct.SolutionArray(gas)
        # the flame domain needs to be specified as subgroup
        arr2.restore(hdf_filepath, name="freeflame", sub="flame")
        gas.TPX = Tin, p, reactants  # set the gas T back to the inlet before making new flame
        f2 = ct.FreeFlame(gas, width=width)
        f2.set_initial_guess(data=arr2)
        describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.45 cm/s
    Maximum temperature            = 2138 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 117 grid points





.. GENERATED FROM PYTHON SOURCE LINES 132-137

.. code-block:: Python

    if pd is None:
        # skip remaining examples, as optional dependency 'pandas' is not installed
        print("All done")
        sys.exit()








.. GENERATED FROM PYTHON SOURCE LINES 138-139

Load initial guess from CSV file via Pandas

.. GENERATED FROM PYTHON SOURCE LINES 139-145

.. code-block:: Python

    df = pd.read_csv(csv_filepath)
    gas.TPX = Tin, p, reactants  # set the gas T back to the inlet before making new flame
    f2 = ct.FreeFlame(gas, width=width)
    f2.set_initial_guess(data=df)
    describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.45 cm/s
    Maximum temperature            = 2138 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 117 grid points





.. GENERATED FROM PYTHON SOURCE LINES 146-147

Load initial guess from CSV file via Pandas and SolutionArray

.. GENERATED FROM PYTHON SOURCE LINES 147-155

.. code-block:: Python

    df = pd.read_csv(csv_filepath)
    arr2 = ct.SolutionArray(gas)
    arr2.from_pandas(df)
    gas.TPX = Tin, p, reactants  # set the gas T back to the inlet before making new flame
    f2 = ct.FreeFlame(gas, width=width)
    f2.set_initial_guess(data=arr2)
    describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.45 cm/s
    Maximum temperature            = 2138 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 117 grid points





.. GENERATED FROM PYTHON SOURCE LINES 156-159

Restart flame simulations with modified initial guesses
-------------------------------------------------------
Load initial guess from CSV file via Pandas, with modifications.

.. GENERATED FROM PYTHON SOURCE LINES 159-161

.. code-block:: Python

    df = pd.read_csv(csv_filepath)








.. GENERATED FROM PYTHON SOURCE LINES 162-163

Modify the Pandas dataframe, removing half the grid points

.. GENERATED FROM PYTHON SOURCE LINES 163-170

.. code-block:: Python

    df_pruned = df[::2]  # remove half of the grid points
    gas.TPX = Tin, p, reactants  # set the gas T back to the inlet before making new flame
    f2 = ct.FreeFlame(gas, width=width)
    f2.set_refine_criteria(**refine_criteria)
    f2.set_initial_guess(data=df_pruned)
    f2.solve()





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [59] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 46 47 48 50 51 53 54 55 56 
        to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH H H2 H2O2 HCCO HCN HCO HO2 NO NO2 O 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [108] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 35 106 
        to resolve C2H5 point 106 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [110] point grid(s).
    no new points needed in flame




.. GENERATED FROM PYTHON SOURCE LINES 171-172

We wouldn't expect the flame solutions to be exactly the same

.. GENERATED FROM PYTHON SOURCE LINES 172-174

.. code-block:: Python

    describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.66 cm/s
    Maximum temperature            = 2139 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 110 grid points





.. GENERATED FROM PYTHON SOURCE LINES 175-177

Modify the Pandas dataframe, removing half the grid points and all but the first 20
species

.. GENERATED FROM PYTHON SOURCE LINES 177-184

.. code-block:: Python

    df_pruned = df.iloc[::2, :24]
    gas.TPX = Tin, p, reactants  # set the gas T back to the inlet before making new flame
    f2 = ct.FreeFlame(gas, width=width)
    f2.set_refine_criteria(**refine_criteria)
    f2.set_initial_guess(data=df_pruned)
    f2.solve()





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 2.813e-06  log(ss)= 7.869     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 1.424e-05  log(ss)= 7.133     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.0001081  log(ss)= 6.09      

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.001232   log(ss)= 5.139     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve failed.

    Attempt 10 timesteps.
    Final timestep info: dt= 0.01403    log(ss)= 3.626     

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [59] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 46 47 48 50 51 53 54 55 56 
        to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH H H2 H2O2 HCCO HCN HCO HO2 NO NO2 O 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [108] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 35 106 
        to resolve C2H5 point 106 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [110] point grid(s).
    no new points needed in flame




.. GENERATED FROM PYTHON SOURCE LINES 185-186

We wouldn't expect the flame solutions to be exactly the same

.. GENERATED FROM PYTHON SOURCE LINES 186-188

.. code-block:: Python

    describe(f2)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 34.66 cm/s
    Maximum temperature            = 2139 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 110 grid points





.. GENERATED FROM PYTHON SOURCE LINES 189-190

Modify the Pandas dataframe, removing half the grid points, and raise the T by 50 K

.. GENERATED FROM PYTHON SOURCE LINES 190-198

.. code-block:: Python

    df_pruned = df.iloc[::2]
    # set the gas T back to the (new) inlet before making new flame
    gas.TPX = (Tin + 50, p, reactants)
    f2 = ct.FreeFlame(gas, width=width)
    f2.set_refine_criteria(**refine_criteria)
    f2.set_initial_guess(data=df_pruned)
    f2.solve()





.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [59] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 40 41 42 43 46 47 48 50 51 53 54 55 56 
        to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH H H2 H2O2 HCCO HCN HCO HO2 NO NO2 O 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [106] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 34 35 40 42 104 
        to resolve C2H5 C3H8 point 104 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [111] point grid(s).
    ##############################################################################
    Refining grid in flame.
        New points inserted after grid points 108 
        to resolve NO 
    ##############################################################################

    Attempt Newton solution of steady-state problem.
    Newton steady-state solve succeeded.

    Problem solved on [112] point grid(s).
    no new points needed in flame




.. GENERATED FROM PYTHON SOURCE LINES 199-200

We expect these flames to be different because we raised the temperature.

.. GENERATED FROM PYTHON SOURCE LINES 200-201

.. code-block:: Python

    describe(f2)




.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    Flame speed                    = 44.82 cm/s
    Maximum temperature            = 2169 K
    Peak OH mole fraction location = 1.12 cm
    Solved with 112 grid points






.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (1 minutes 24.926 seconds)


.. _sphx_glr_download_examples_python_onedim_flame_initial_guess.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: flame_initial_guess.ipynb <flame_initial_guess.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: flame_initial_guess.py <flame_initial_guess.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: flame_initial_guess.zip <flame_initial_guess.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
