[Cython/1D] Fixed setting of steady and transient tolerances

Previously, the transient tolerances were being used to solve the steady-state
problem.
This commit is contained in:
Ray Speth 2013-03-07 18:51:27 +00:00
parent 01bc55e1bb
commit d20476df8e
4 changed files with 8 additions and 8 deletions

View file

@ -12,7 +12,7 @@ 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
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
tol_ts = [1.0e-4, 1.0e-13] # [rtol atol] for time stepping
loglevel = 1 # amount of diagnostic output (0 to 8)
refine_grid = True # 'True' to enable refinement, 'False' to disable

View file

@ -20,7 +20,7 @@ comp_f = 'C2H6:1' # fuel composition
initial_grid = np.linspace(0, 0.02, 6)
tol_ss = [1.0e-5, 1.0e-12] # [rtol, atol] for steady-state problem
tol_ts = [5.0e-4, 1.0e-9] # [rtol, atol] for time stepping
tol_ts = [5.0e-4, 1.0e-11] # [rtol, atol] for time stepping
loglevel = 1 # amount of diagnostic output (0 to 5)
refine_grid = 1 # 1 to enable refinement, 0 to disable

View file

@ -77,7 +77,7 @@ cdef class Domain1D:
unspecified components. The keyword *Y* can be used to stand for all
species mass fractions in flow domains.
"""
self._set_tolerances(0, default, Y, kwargs)
self._set_tolerances(1, default, Y, kwargs)
def set_transient_tolerances(self, *, default=None, Y=None, **kwargs):
"""
@ -89,7 +89,7 @@ cdef class Domain1D:
unspecified components. The keyword *Y* can be used to stand for all
species mass fractions in flow domains.
"""
self._set_tolerances(1, default, Y, kwargs)
self._set_tolerances(-1, default, Y, kwargs)
def _set_tolerances(self, is_transient, default, Y, components):
if default is not None:

View file

@ -49,8 +49,8 @@ class TestOnedim(utilities.CanteraTest):
class TestFreeFlame(utilities.CanteraTest):
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
tol_ss = [1.0e-5, 1.0e-14] # [rtol atol] for steady-state problem
tol_ts = [1.0e-4, 1.0e-11] # [rtol atol] for time stepping
def create_sim(self, p, Tin, reactants):
@ -265,8 +265,8 @@ class TestDiffusionFlame(utilities.CanteraTest):
oxidizer='O2:0.2, AR:0.8', T_ox=300, mdot_ox=0.72):
initial_grid = np.linspace(0, 0.02, 6) # m
tol_ss = [1.0e-5, 1.0e-12] # [rtol, atol] for steady-state problem
tol_ts = [5.0e-4, 1.0e-9] # [rtol, atol] for time stepping
tol_ss = [2.0e-5, 1.0e-11] # [rtol, atol] for steady-state problem
tol_ts = [5.0e-4, 1.0e-11] # [rtol, atol] for time stepping
# IdealGasMix object used to compute mixture properties
self.gas = ct.Solution('h2o2.xml', 'ohmech')