Revision: 3418
Author:
yar...@gmail.com
Date: Sat Feb 28 00:24:32 2015 UTC
Log: [Examples/1D] Use uniform initial grids in flame simulation
examples
https://code.google.com/p/cantera/source/detail?r=3418
Modified:
/cantera/trunk/interfaces/cython/cantera/examples/onedim/adiabatic_flame.py
/cantera/trunk/interfaces/cython/cantera/examples/onedim/burner_flame.py
/cantera/trunk/interfaces/cython/cantera/examples/onedim/flame_fixed_T.py
/cantera/trunk/interfaces/cython/cantera/examples/onedim/flamespeed_sensitivity.py
=======================================
---
/cantera/trunk/interfaces/cython/cantera/examples/onedim/adiabatic_flame.py
Sat Jan 11 00:20:27 2014 UTC
+++
/cantera/trunk/interfaces/cython/cantera/examples/onedim/adiabatic_flame.py
Sat Feb 28 00:24:32 2015 UTC
@@ -4,13 +4,14 @@
"""
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)
=======================================
---
/cantera/trunk/interfaces/cython/cantera/examples/onedim/burner_flame.py
Sat Jan 11 00:20:27 2014 UTC
+++
/cantera/trunk/interfaces/cython/cantera/examples/onedim/burner_flame.py
Sat Feb 28 00:24:32 2015 UTC
@@ -3,14 +3,14 @@
"""
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)
=======================================
---
/cantera/trunk/interfaces/cython/cantera/examples/onedim/flame_fixed_T.py
Sat Jan 11 00:20:27 2014 UTC
+++
/cantera/trunk/interfaces/cython/cantera/examples/onedim/flame_fixed_T.py
Sat Feb 28 00:24:32 2015 UTC
@@ -4,7 +4,7 @@
"""
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 @@
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
=======================================
---
/cantera/trunk/interfaces/cython/cantera/examples/onedim/flamespeed_sensitivity.py
Mon Mar 24 04:03:49 2014 UTC
+++
/cantera/trunk/interfaces/cython/cantera/examples/onedim/flamespeed_sensitivity.py
Sat Feb 28 00:24:32 2015 UTC
@@ -7,13 +7,14 @@
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