[Examples/1D] Use uniform initial grids in flame simulation examples
This commit is contained in:
parent
603e321a37
commit
eca79a5332
4 changed files with 9 additions and 9 deletions
|
|
@ -4,13 +4,14 @@ transport properties.
|
|||
"""
|
||||
|
||||
import cantera as ct
|
||||
import numpy as np
|
||||
|
||||
# Simulation parameters
|
||||
p = ct.one_atm # pressure [Pa]
|
||||
Tin = 300.0 # unburned gas temperature [K]
|
||||
reactants = 'H2:1.1, O2:1, AR:5' # premixed gas composition
|
||||
|
||||
initial_grid = [0.0, 0.001, 0.01, 0.02, 0.029, 0.03] # m
|
||||
initial_grid = np.linspace(0.0, 0.03, 7) # m
|
||||
tol_ss = [1.0e-5, 1.0e-13] # [rtol atol] for steady-state problem
|
||||
tol_ts = [1.0e-4, 1.0e-13] # [rtol atol] for time stepping
|
||||
loglevel = 1 # amount of diagnostic output (0 to 8)
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ A burner-stabilized lean premixed hydrogen-oxygen flame at low pressure.
|
|||
"""
|
||||
|
||||
import cantera as ct
|
||||
import numpy as np
|
||||
|
||||
p = 0.05 * ct.one_atm
|
||||
tburner = 373.0
|
||||
mdot = 0.06
|
||||
reactants = 'H2:1.5, O2:1, AR:7' # premixed gas composition
|
||||
|
||||
initial_grid = [0.0, 0.02, 0.04, 0.06, 0.08, 0.1,
|
||||
0.15, 0.2, 0.4, 0.49, 0.5] # m
|
||||
initial_grid = np.linspace(0.0, 0.5, 10) # m
|
||||
tol_ss = [1.0e-5, 1.0e-13] # [rtol atol] for steady-state problem
|
||||
tol_ts = [1.0e-4, 1.0e-10] # [rtol atol] for time stepping
|
||||
loglevel = 1 # amount of diagnostic output (0 to 5)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ multicomponent transport properties and a specified temperature profile.
|
|||
"""
|
||||
|
||||
import cantera as ct
|
||||
|
||||
import numpy as np
|
||||
|
||||
# read temperature vs. position data from a file.
|
||||
# The file is assumed to have one z, T pair per line, separated by a comma.
|
||||
|
|
@ -50,10 +50,8 @@ tburner = 373.7 # burner temperature
|
|||
mdot = 0.04 # kg/m^2/s
|
||||
comp = 'CH4:0.65, O2:1, N2:3.76' # premixed gas composition
|
||||
|
||||
# The solution domain is chosen to be 1 cm, and a point very near the
|
||||
# downstream boundary is added to help with the zero-gradient boundary
|
||||
# condition at this boundary.
|
||||
initial_grid = [0.0, 0.0025, 0.005, 0.0075, 0.0099, 0.01] # m
|
||||
# The solution domain is chosen to be 1 cm
|
||||
initial_grid = np.linspace(0.0, 0.01, 6) # m
|
||||
|
||||
tol_ss = [1.0e-5, 1.0e-9] # [rtol atol] for steady-state problem
|
||||
tol_ts = [1.0e-5, 1.0e-4] # [rtol atol] for time stepping
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@ to each reaction rate constant.
|
|||
from __future__ import print_function
|
||||
|
||||
import cantera as ct
|
||||
import numpy as np
|
||||
|
||||
# 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'
|
||||
|
||||
initial_grid = [0.0, 0.01, 0.02, 0.03] # m
|
||||
initial_grid = np.linspace(0, 0.03, 5) # m
|
||||
tol_ss = [1.0e-9, 1.0e-14] # [rtol atol] for steady-state problem
|
||||
tol_ts = [1.0e-5, 1.0e-14] # [rtol atol] for time stepping
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue