Commit graph

6007 commits

Author SHA1 Message Date
Ray Speth
60eed786fa [SCons] Fix fallback behavior with explicitly-specifed Fortran compiler
If the user has explicitly specified a Fortran compiler, we shouldn't fall back
to using a different one if the specified one cannot be found.
2016-04-05 12:52:01 -04:00
Ray Speth
4799d19b39 [Doc] Drop references to the "legacy" vs "new" Python modules 2016-04-02 22:13:42 -04:00
Ray Speth
6d91b44ed6 [SCons] Fix setting of prefix when building Debian packages
'prefix' shouldn't be changed after it's used, but should be set by the
debian/rules script
2016-04-01 16:25:58 -04:00
Ray Speth
31c66378c6 [SCons] Fix Cantera.mak when blas_lapack_dir is empty
Previously, if no library directory needed to be specified for BLAS/LAPACK, the
link line would end up containing '-L -llapack -lblas' which is interpreted as
adding the directory '-llapack' to the linker search path.
2016-04-01 15:48:12 -04:00
Ray Speth
05198ddcfb Fix get_modified_time to avoid race condition on Windows
If multiple processes tried to read the same input file simultaneously,
get_modified_time would fail. With this change, get_modified_time
does not need to actually open the file in order to read the metadata.
2016-03-30 20:35:15 -04:00
Ray Speth
2bfbd73a12 [Python] Add Reaction.__contains__ method 2016-03-28 18:03:02 -04:00
Ray Speth
4c5301d6cd [1D] Initialize number-of-steps counter at start of solve
Fixes the enforcement of the maximum number of steps constraint if solve() is
called again after an exception.
2016-03-28 17:13:24 -04:00
Ray Speth
233399f899 [ck2cti] Fix conversion of NASA9 thermo with only one temperature range 2016-03-28 12:48:10 -04:00
Ray Speth
2e3726fe5f [Thermo] Mark overrides of ThermoPhase methods as virtual consistently 2016-03-28 00:01:39 -04:00
Ray Speth
bec0c88e32 [Thermo] Remove unnecessary overloads of getElectrochemPotentials 2016-03-27 23:18:26 -04:00
Ray Speth
881fcbaf6f Improve use of local variables in src/numerics 2016-03-27 22:52:49 -04:00
Ray Speth
0995725a13 [1D] Deprecate unused methods of Domain1D 2016-03-27 22:19:38 -04:00
Ray Speth
1aa28f9310 Let the constructor for std::string do its job 2016-03-27 22:19:38 -04:00
Ray Speth
9c632cf123 [1D] Remove unused / unimplemented methods from StFlow 2016-03-27 22:19:37 -04:00
Ray Speth
d52a0fdbcb [1D] Eliminate redundant parts of StFlow::showSolution 2016-03-27 21:19:45 -04:00
Ray Speth
2e56f6dee3 [SCons] Allow compiler options which contain commas
Compiler options such as '-Wl,-z,rlero' were incorrectly being split into
multiple options by SCons. Compiler options must now be separated by spaces when
specified on the SCons command line.

Fixes #320
2016-03-27 20:21:56 -04:00
Ray Speth
92ccda85fc [1D/Examples] Use 'auto' to simplify 1D examples 2016-03-27 17:07:37 -04:00
Ray Speth
2315da5230 [1D/Test] Add more tests for counterflow premixed flames 2016-03-27 17:07:37 -04:00
Ray Speth
dfb4d62e12 [1D/Test] Add test for ImpingingJet and ReactingSurface1D 2016-03-27 17:07:37 -04:00
Ray Speth
3e371c8093 [1D] Add tests for burner stabilized flames 2016-03-27 17:07:37 -04:00
Ray Speth
522d263979 [1D/Test] Test diffusion flames where non-extinct solutions are expected
Several of the tested sets of parameters are ones where the solver would
previously only find the non-reacting solution.
2016-03-27 17:07:36 -04:00
Ray Speth
1730036976 [1D/Test] Add more cases to test FreeFlame for basic convergence
The additional test cases are selected from conditions under which the solver
would previously fail
2016-03-27 17:07:36 -04:00
Ray Speth
77c744204e [1D] Try harder to find non-extinct diffusion flames when using 'auto'
Increasing the density of grid points is more likely to lead to a non-extinct
solution, but takes longer to solve. To give good average-case performance,
first try solving on a grid with few points, then increase the number of points
until a reacting solution is found, if possible.
2016-03-27 17:07:36 -04:00
Ray Speth
b56094b183 [1D/Examples] eliminate unnecessary setting of tolerances
For most problems, these new default tolerances for both time stepping and
steady state solves are more likely to converge than tighter tolerances, but
still give well-resolved results. Tighter tolerances are required in some cases,
e.g. when evaluating sensitivity coefficients by finite difference.
2016-03-27 17:07:36 -04:00
Ray Speth
059e657fe4 [1D/Examples] Use new default values for Jacobian and time stepping settings
These values were selected for optimal performance across a large set of flames
in each configuration and using mechanisms of various sizes to give good average
performance. It should not generally be necessary for users to change these
values.
2016-03-27 17:07:36 -04:00
Ray Speth
6c466f65fa [1D] Use better guess for CounterflowDiffusionFlame initial position
The new formula is based on a set of test flames where the density ratio of the
fuel and oxidizer streams was varied by changing temperature and fuel
composition and the flame position was calculated as the centroid of the H2O
mass fraction profile.
2016-03-27 17:07:36 -04:00
Ray Speth
5e35ca5486 [1D] Allow replacing flow domain grid after creating Sim1D
This makes it possible to try solving on a different grid if the initial
solution attempt fails without needing to recreate the Sim1D object.
2016-03-27 17:07:36 -04:00
Ray Speth
77e3775c08 [1D] Provide reasonable initial grid for ImpingingJet 2016-03-27 17:07:36 -04:00
Ray Speth
9353a79da2 [1D] Switch to "steady mode" before attempting steady-state solve
The solver could previously get left in transient mode if an exception occurred
during time stepping, making it impossible to make a new attempt at solving the
steady-state problem.
2016-03-27 17:07:36 -04:00
Ray Speth
85c3bf5ba6 [1D] Improve initial guess for FreeFlame velocity profile
If mdot is not specified, use the estimated mdot value when providing
the initial guess for the velocity.
2016-03-27 17:07:36 -04:00
Ray Speth
d2793c07a1 [1D/Python] Introduce 'auto' option to Sim1D.solve
Specifying this option allows the user to automatically execute the efficient
sequence of solving on the initial grid, enabling the energy equation, refining,
tightening tolerances, and enabling multicomponent transport in a single call to
Sim1D.solve.
2016-03-27 17:07:36 -04:00
Ray Speth
7d14677db2 [1D] Add tests for setting and getting tolerances 2016-03-27 17:07:36 -04:00
Ray Speth
f13e2715bb [1D] Add accessor functions for steady and relative tolerances
The existing functions for getting tolerances are difficult to use because
they return the tolerances based on the steady/unsteady mode of the solver
which the user shouldn't have to care about (and can't easily set).
2016-03-27 17:07:36 -04:00
Ray Speth
809223f670 [1D/Python] Fix range of components used when settings species tolerances
Boundaries do not necessarily have species variables, so setting species
tolerances will now raise an exception. This approach also avoids making
the assumption that the index of the first species equation is 4 in flow
domains.
2016-03-27 17:07:36 -04:00
Ray Speth
80b8cd7e2b [1D] Remove Bdry1D::m_nv which shadowed Domain1D::m_nv 2016-03-27 17:07:36 -04:00
Ray Speth
c799edff90 [Python/1D] Fix error in setting tolerances for specific components
Keyword arguments other than 'default' and 'Y' could not previously be
specified.
2016-03-27 17:07:36 -04:00
Ray Speth
9f3821db82 [1D] Use most prevalent species to impose sum-of-mass-fractions constraint
Previously, the first species was always used, which could cause problems with
negative mass fractions in cases where the first species has a mass fraction
near zero.
2016-03-27 17:07:36 -04:00
Ray Speth
011a64aaa2 [Cython] Add wrapper for SurfPhase::setCoveragesNoNorm 2016-03-27 17:07:36 -04:00
Ray Speth
b99ba44f13 Fix SurfPhase::setCoveragesNoNorm to retain negative coverages
This prevents Jacobian singularities due to (trivial) negative coverages,
e.g. in ReactingSurf1D.
2016-03-27 17:07:36 -04:00
Ray Speth
af5bbf74a4 [1D] Improve Jacobian evaluation for ReactingSurf1D
Don't normalize coverages when evaluating the residual normally -- only as part
of recovering from a failed timestep, like what is done in StFlow.
2016-03-27 17:07:36 -04:00
Ray Speth
8e81292558 [1D] Provide reasonable default grid for CounterflowDiffusionFlame 2016-03-27 17:07:36 -04:00
Ray Speth
87a8419380 [1D] Provide reasonable initial grid for BurnerFlame 2016-03-27 17:07:36 -04:00
Ray Speth
1f3e8dd0d7 [1D] Raise exception if previous solution does not exist 2016-03-27 17:07:36 -04:00
Ray Speth
7ba668109e [1D] Increase default value for maximum timestep
This accelerates convergence of the solver in some cases.
2016-03-27 17:07:36 -04:00
Ray Speth
81074b2b4a [1D] Add function for restoring last successful steady-state solution 2016-03-27 17:07:36 -04:00
Ray Speth
29b704916c [1D] Set limit on number of timesteps without reaching steady state 2016-03-27 17:07:36 -04:00
Ray Speth
532e132788 [1D] Add accessors for solver statistics
Previously, this information was only available in the text output of the
'showStats' function.
2016-03-27 17:07:35 -04:00
Ray Speth
11b665b00a [1D] Keep track of number of time steps taken before each steady-state solve 2016-03-27 17:07:35 -04:00
Ray Speth
2d82c78c37 [1D] Retain negative species when retrieving solution state
This can be useful when debugging issues with the 1D solver.
2016-03-27 17:07:35 -04:00
Ray Speth
318fa04cf7 [1D] Reset negative species concentrations after a failed time step 2016-03-27 17:07:35 -04:00