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
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
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
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
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
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
80b8cd7e2b
[1D] Remove Bdry1D::m_nv which shadowed Domain1D::m_nv
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
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
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
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
318fa04cf7
[1D] Reset negative species concentrations after a failed time step
2016-03-27 17:07:35 -04:00
Ray Speth
832ee88692
[1D] Add ability to access last successful timestepped solution
...
This can be helpful when debugging 1D solver failures.
2016-03-25 12:21:19 -04:00
Ray Speth
5a576a7c75
[1D] Tighten default negative species bounds
2016-03-25 12:21:19 -04:00
Ray Speth
011c9cb6c3
[1D] Improve finite-difference Jacobian
...
Preserve the sign of elements of the solution vector when perturbing them in
order to avoid triggering discontinuous behavior as the cross zero (which is
caused by the way rate evaluation is handled for negative species
concentrations).
2016-03-25 12:21:19 -04:00
Ray Speth
d76704912b
[1D] Fix transient mask after Jacobian update
...
The transient mask should only be zeroed when doing a full evaluation of the
residual function, since the partial evaluations done while evaluating the
Jacobian will not fill in all elements of the mask. This error was causing
Jacobian update in MultiNewton::solve to always effectively generate the
steady-state Jacobian, even when in time-stepping mode.
2016-03-25 12:21:19 -04:00
Ray Speth
d20ab891e8
[1D] add function for getting info about a solution component
2016-03-25 12:21:19 -04:00
Ray Speth
39a6819bf3
[1D] Only reset Jacobian age after successful *steady-state* solve
2016-03-25 12:21:19 -04:00
Ray Speth
60efb22b87
[Kinetics] Always initialize FalloffReaction.falloff
...
Fixes #326
2016-03-23 11:42:32 -04:00
imitrichev
7e71645efb
[CTI/CTML] Add 'nonreactant_orders' option to allow non-reactant orders
...
The flag 'allow_nonreactant_orders' in class Reaction is set to 'true' when
using this option in cti/ctml.
Resolves #317
Resolves #321
2016-02-27 14:10:35 -05:00
Ray Speth
f0e6d090dc
[Fortran] Fix for multiple definitions of '_xml' function
...
This was causing linker errors when trying to link with the Fortran library.
2016-02-24 18:59:23 -05:00
pwcnorthrop
125d2e0e23
Add RedlichKisterVPSSTP::s_update_dlnActCoeff_dlnX_diag()
...
Fixes bug in RedlichKisterVPSSTP::getlnActCoeffdlnX_diag() which would always return 0
Resolves #293
2016-02-17 23:34:36 -05:00
Ray Speth
b55c8fe813
Replace overly-specific exception types with CanteraError
...
Deprecate exception types which are now unused.
2016-02-04 19:34:26 -05:00
Ray Speth
f44b5fed57
Replace usage of int2str with cppformat and deprecate int2str
2016-02-04 19:11:49 -05:00
Ray Speth
f91afda8cb
Replace usage of fp2str with cppformat and deprecate fp2str
2016-02-04 19:11:45 -05:00
Ray Speth
b0230fb146
Modify BandMatrix to avoid unnecessary casts from size_t to int
2016-02-04 14:45:36 -05:00
Ray Speth
4c58f11dd8
Improve use of local variables in src/base
2016-02-04 14:45:36 -05:00
Ray Speth
484da253da
Use cppformat instead of stringstream in some places
2016-02-04 14:45:21 -05:00
Ray Speth
84ede11e6a
Remove unimplemented method SimpleTransport::updateViscosities_C
2016-02-02 23:14:35 -05:00
Ray Speth
8b64b6f4f7
[Matlab] Fix printing of error messages
2016-01-29 15:38:13 -05:00
Bryan W. Weber
02f0e273d9
Add a note about the state setters to PureFluidPhase
2016-01-25 13:14:50 -05:00
Bryan W. Weber
bff8d10609
[Matlab] Add interface to the new PureFluid property pairs
2016-01-25 13:14:50 -05:00
Bryan W. Weber
c1f287d648
[C API] Add interface to the new PureFluid property pairs
2016-01-25 13:14:50 -05:00
Bryan W. Weber
50a97063b7
Reduce relative tolerance of state setter in Substance
...
Reduce the relative tolerance from 3.e-8 to 1.e-8.
2016-01-25 13:07:34 -05:00
Bryan W. Weber
63cfed1503
Add functions to set property pairs specified in Sub.cpp
...
Add functions to set the unimplemented property pairs specified
in the Substance::Set function of Sub.cpp
2016-01-25 13:07:34 -05:00
Bryan W. Weber
31316b7079
Switch PureFluidPhase to use double instead of doublereal
2016-01-25 13:07:34 -05:00
Ray Speth
9276f56008
Use full string (minus white space) when matching element names/symbols
...
Also make check for element names case-insensitive.
2016-01-22 18:18:43 -05:00
Bryan W. Weber
c324386fb2
Add functions to get more information about elements.
...
Add functions to get the atomic number, name, symbol, and weight
of elements looked up by the atomic number, name, or symbol.
2016-01-22 18:18:43 -05:00
Bryan W. Weber
f3bc7a5d5b
Replace LookupWtElements with getElementWeight function
...
Deprecate LookupWtElements. Also split the atomic weights
database into one for named elements and for named isotopes.
2016-01-22 18:18:42 -05:00
Ray Speth
1c09f7f14b
[Thermo] Make continuity check for enthalpy dimensionally consistent
...
All quantities here are nondimensional, so taking h+cp*T makes no sense, and
caused the test to pass even for suspicously discontinuous thermo data (although
the bad data would generally get flagged by the tests for cp and/or s).
2015-12-15 11:41:54 -05:00