[1D] Provide reasonable initial grid for ImpingingJet
This commit is contained in:
parent
9353a79da2
commit
77e3775c08
4 changed files with 17 additions and 11 deletions
|
|
@ -29,7 +29,7 @@ CounterflowPremixedFlame
|
|||
|
||||
ImpingingJet
|
||||
^^^^^^^^^^^^
|
||||
.. autoclass:: ImpingingJet(gas, grid=None)
|
||||
.. autoclass:: ImpingingJet(gas, grid=None, width=None)
|
||||
|
||||
Flow Domains
|
||||
------------
|
||||
|
|
|
|||
|
|
@ -31,10 +31,8 @@ mdot = [0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12] # kg/m^2/s
|
|||
rxnmech = 'h2o2.cti' # reaction mechanism file
|
||||
comp = 'H2:1.8, O2:1, AR:7' # premixed gas composition
|
||||
|
||||
# The solution domain is chosen to be 50 cm, and a point very near the
|
||||
# downstream boundary is added to help with the zero-gradient boundary
|
||||
# condition at this boundary.
|
||||
initial_grid = np.linspace(0.0, 0.2, 12) # m
|
||||
# The solution domain is chosen to be 20 cm
|
||||
width = 0.2 # m
|
||||
|
||||
tol_ss = [1.0e-5, 1.0e-13] # [rtol atol] for steady-state problem
|
||||
tol_ts = [1.0e-4, 1.0e-9] # [rtol atol] for time stepping
|
||||
|
|
@ -56,7 +54,7 @@ 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, grid=initial_grid)
|
||||
sim = ct.ImpingingJet(gas=gas, width=width)
|
||||
|
||||
# set the mass flow rate at the inlet
|
||||
sim.inlet.mdot = mdot[0]
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ comp1 = 'H2:0.05, O2:0.21, N2:0.78, AR:0.01'
|
|||
# composition of the inlet premixed gas for the methane/air case
|
||||
comp2 = 'CH4:0.095, O2:0.21, N2:0.78, AR:0.01'
|
||||
|
||||
# the initial grid, in meters. The inlet/surface separation is 10 cm.
|
||||
initial_grid = [0.0, 0.02, 0.04, 0.06, 0.08, 0.1] # m
|
||||
# The inlet/surface separation is 10 cm.
|
||||
width = 0.1 # m
|
||||
|
||||
# numerical parameters
|
||||
tol_ss = [1.0e-5, 1.0e-9] # [rtol, atol] for steady-state problem
|
||||
|
|
@ -65,7 +65,7 @@ surf_phase.advance_coverages(1.0)
|
|||
|
||||
# create the object that simulates the stagnation flow, and specify an initial
|
||||
# grid
|
||||
sim = ct.ImpingingJet(gas=gas, grid=initial_grid, surface=surf_phase)
|
||||
sim = ct.ImpingingJet(gas=gas, width=width, surface=surf_phase)
|
||||
|
||||
# Objects of class StagnationFlow have members that represent the gas inlet
|
||||
# ('inlet') and the surface ('surface'). Set some parameters of these objects.
|
||||
|
|
|
|||
|
|
@ -788,13 +788,18 @@ class ImpingingJet(FlameBase):
|
|||
"""An axisymmetric flow impinging on a surface at normal incidence."""
|
||||
__slots__ = ('inlet', 'flame', 'surface')
|
||||
|
||||
def __init__(self, gas, grid=None, surface=None):
|
||||
def __init__(self, gas, grid=None, width=None, surface=None):
|
||||
"""
|
||||
:param gas:
|
||||
`Solution` (using the IdealGas thermodynamic model) used to
|
||||
evaluate all gas properties and reaction rates.
|
||||
:param grid:
|
||||
Array of initial grid points
|
||||
A list of points to be used as the initial grid. Not recommended
|
||||
unless solving only on the initial grid; Use the `width` parameter
|
||||
instead.
|
||||
:param width:
|
||||
Defines a grid on the interval [0, width] with internal points
|
||||
determined automatically by the solver.
|
||||
:param surface:
|
||||
A Kinetics object used to compute any surface reactions.
|
||||
|
||||
|
|
@ -805,6 +810,9 @@ class ImpingingJet(FlameBase):
|
|||
self.inlet = Inlet1D(name='inlet', phase=gas)
|
||||
self.flame = AxisymmetricStagnationFlow(gas, name='flame')
|
||||
|
||||
if width is not None:
|
||||
grid = np.array([0.0, 0.2, 0.4, 0.6, 0.8, 1.0]) * width
|
||||
|
||||
if surface is None:
|
||||
self.surface = Surface1D(name='surface', phase=gas)
|
||||
self.surface.T = gas.T
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue