Commit graph

1613 commits

Author SHA1 Message Date
Ray Speth
2a8ac43308 [SCons] Add fmt.h to system.h and improve PCH dependency handling 2016-10-28 12:40:53 -04:00
Ray Speth
e3dfc35ca1 [SCons] Use precompiled header to speed up compilation with MSVC
Update Appveyor config to turn off debug info so PCH can be used
2016-10-28 12:05:46 -04:00
Ray Speth
cbcce07981 [SCons] Use precompiled header to speed up compilation with GCC/Clang 2016-10-27 19:59:35 -04:00
Ray Speth
b25784dc09 Replace stripws with boost::algorithm::trim_copy 2016-10-27 11:28:03 -04:00
Ray Speth
367bdba551 Use boost::algorithm::split to implement tokenizeString 2016-10-27 11:28:03 -04:00
Ray Speth
2db7ebc55c [clib] Update declaration for stflow_setTransport 2016-10-24 19:00:36 -04:00
BangShiuh
859eb6b94a [1D] Deprecate 'withSoret' argument of setTransport 2016-10-24 18:57:05 -04:00
Ray Speth
ecb2868a18 [Reactor] Suppress recoverable errors in RHS function by default
Accumulate errors and show them if the integrator actually fails. In "verbose"
mode, the errors are shown as they occur.
2016-10-23 22:42:53 -04:00
Ray Speth
1dc0cedcd9 [Reactor] Use Boost's bracket_and_solve_root function
This algorithm is more robust than the simple Newton's method that it
replaces. Among its advantages is that it works with PureFluidPhase models.

Resolves #257
2016-10-22 16:17:57 -04:00
Ray Speth
28202f9fa2 [Reactor] Allow Reactor to function without requiring a Kinetics object 2016-10-22 15:50:01 -04:00
BangShiuh
04f9596cc5 [Transport] replace sumxw with mmw in GasTransport::getMixDiffCoeffs
The sumxw is redundant, so I replace it with mmw.
2016-10-21 23:17:11 -04:00
Ray Speth
3f3b96587b [Thermo] Fix finite-difference properties in two-phase region
These properties are actually infinite in the two-phase region, but attempting
to compute them by finite difference would incorrectly give a finite result, so
they need to be treated as a special case.
2016-10-21 13:28:51 -04:00
Ray Speth
a92245f683 [Thermo] Fix calculation of derivative properties of pure fluids
Calculating specific heat capacities (cp or cv) for states near the saturation
curve would give incorrect results if the finite difference method used points
within the saturation region. To avoid this, we now check the points used for
computing the properties and use values outside the saturation region to compute
the derivatives.

Fixes #273
2016-10-21 13:28:51 -04:00
Ray Speth
b1a1ce6e23 [Thermo] Fix pure fluid thermal expansion coefficient calculation 2016-10-19 19:51:31 -04:00
Ray Speth
f6df8f31b3 [TPX] Move function implementations out of Sub.h 2016-10-19 17:40:50 -04:00
BangShiuh
6d5e28ec46 [1D] Use c_offset_Y instead of literal value "4" 2016-10-19 17:40:04 -04:00
Ray Speth
478a62d2af [Thermo] Make tolerances used in state setters more consistent 2016-10-19 12:55:18 -04:00
Ray Speth
5b1a4a60bb [Thermo] Fix silent failures in HP/UV/SV/SP convergence
In cases where the specified state was non-physical (i.e. corresponded to a
negative temperature), the iteration would exit when the temperature reached a
small enough value. Computing the error in temperature relative to the current
temperature avoids this problem.

Fixes #264
2016-10-19 10:58:22 -04:00
Ray Speth
940b7ea01f [Matlab] Always allocate string buffers of an appropriate size
Never use fixed size buffers which can force content to be truncated

Resolves #118.
2016-10-18 11:21:42 -04:00
Ray Speth
8a9eabeeac [clib] Add buffer length argument to all functions returning strings
If the buffer is not long enough, the string is truncated and the return value
is the required buffer length. Otherwise, the return value is 0.
2016-10-18 11:21:42 -04:00
Ray Speth
5f0e20bf93 [clib] Rename some functions to increase consistency 2016-10-17 19:15:38 -04:00
Ray Speth
100d6db87b [clib] Combine "phase_" and "th_" prefixes as "thermo_" 2016-10-17 19:15:38 -04:00
Ray Speth
bdda7b5eaf [clib] Remove some redundant/unusable/unnecessary functions 2016-10-17 19:15:36 -04:00
Ray Speth
a8c6158543 [Matlab] Remove partial implementations of unneeded methods 2016-10-17 18:42:27 -04:00
Ray Speth
b51c1b8e4e [clib] Fix const-ness of clib function arguments 2016-10-15 20:50:15 -04:00
Ray Speth
40630a3ab4 Fix const-ness of some function arguments 2016-10-15 20:50:15 -04:00
g3bk47
e83b095c3a [Kinetics] added const version of Kinetics::reaction 2016-10-15 18:24:35 -04:00
Ray Speth
6ca9dc2cc3 [Kinetics] Remove unused m_finalized member variable 2016-10-13 18:40:03 -04:00
Ray Speth
0b5e209b40 [Kinetics] Remove unused private members of class Kinetics 2016-10-13 18:40:03 -04:00
Ray Speth
f17750e483 Make species names case-preserving instead of case-sensitive
This improves interoperability when working with mechanisms which use differing
conventions for naming species using uppercase or lowercase.
2016-10-13 18:40:03 -04:00
Ray Speth
deee889baf [clib] Make clib headers public 2016-10-13 18:40:03 -04:00
Ray Speth
ae6e7fdff7 Add license/copyright info to files that were missing it 2016-10-10 22:48:23 -04:00
Ray Speth
ecbfecd7fd Replace existing copyright notices with uniform copyright/license info 2016-10-10 22:19:01 -04:00
Ray Speth
e332fcbba2 [clib] Make clib actually usable as a C (not C++) interface
- Cannot include any C++ headers or use C++ types (e.g. 'bool')
- Functions arguments cannot have default values
- "extern C" needs to be wrapped by "#ifdef __cplusplus"
2016-09-19 18:48:40 -04:00
Ray Speth
11f6c2f993 Consolidate duplicate species checks in Phase::addSpecies 2016-09-10 21:45:24 -04:00
Ray Speth
178b452a49 [Transport] Automatically reinitialize after change in number of species
This makes it possible for GasTransport objects to work reasonably well with
ThermoPhase objects that have had species added to them. The main changes
required are to make the initialization functions idempotent.
2016-09-09 22:50:17 -04:00
Ray Speth
46b97beee7 [Transport] Restore temperature after fitting properties 2016-09-09 22:50:17 -04:00
Ray Speth
85e2e9968b [Thermo] Deprecate RedlichKisterVPSSTP::Vint 2016-09-08 17:21:20 -04:00
Ray Speth
340c1bf60a Remove some unused variables 2016-09-08 17:21:20 -04:00
Ray Speth
abf71c4cb1 Allow non-positive atomic weights for custom elements 2016-08-30 20:28:35 -04:00
Ray Speth
0bd88927f5 [Equil] Fix ElemRearrange when unused elements are present
The solver could get stuck in an infinite loop when there were elements that
were not used in any species.
2016-08-17 21:15:34 -04:00
Bryan W. Weber
8ada40f0be
[Matlab] Add interface to setChemistry 2016-08-12 11:53:53 -04:00
Bryan W. Weber
c344b4c0f8
Add methods Reactor::setChemistry and chemistryEnabled
These functions mirror the setEnergy and energyEnabled methods.
The enableChemistry and disableChemistry methods are deprecated.
2016-08-12 10:54:58 -04:00
Ray Speth
ee7c4ed463 [Kinetics] Remove dead code from InterfaceKinetics 2016-07-30 23:49:38 -04:00
Ray Speth
4582e724ee Eliminate compiler warnings issued by Visual Studio 2015 2016-07-30 23:09:17 -04:00
Ray Speth
ac7a9bd238 Deprecate copy constructors for eventually-noncopyable objects
The following classes (and their children) will be non-copyable and
non-assignable after Cantera 2.3:
  - ThermoPhase
  - Kinetics
  - Transport
  - Species
  - SpeciesThermoInterpType
  - MultiSpeciesThermo
  - VPSSMgr
  - PDSS
  - ResidJacEval
  - RootFind
2016-07-29 18:57:29 -04:00
Ray Speth
64983aaf16 Remove some unnecessary copy constructors and assignment operators
The implicitly-defined copy constructors and assignment operators work fine for
these classes.
2016-07-29 18:39:45 -04:00
Ray Speth
fe15a4fe9c [Base] Make Application::Messages non-copyable 2016-07-29 15:05:52 -04:00
Ray Speth
e851e5e9d8 [Kinetics] Fix initialization of use_motz_wise_correction 2016-07-29 15:05:52 -04:00
Ray Speth
af3de9aa4d [Numerics] Fix BandMatrix assignment operator 2016-07-29 15:05:52 -04:00