Commit graph

1744 commits

Author SHA1 Message Date
Ray Speth
c1067aa6e9 [1D] Move functions from FreeFlame and AxiStagnFlow into StFlow
This makes it possible to implement alternative constitutive relations
(e.g. ionized or non-ideal gases) as a derived class from StFlow and have them
support all of the standard flame configurations (freely propagating, burner
stabilized, counterflow).
2018-08-10 18:15:36 -04:00
Ray Speth
fb68cae145 [Thermo] Keep PureFluidPhase state data consistent
Previously, calls to setTemperature, setDensity, and setState_TR did not result
in the underlying Substance object being updated. In addition, the
isothermalCompressibility and thermalExpansionCoeff methods did not synchronize
the state.

Now, setting the state of the PureFluidPhase object always sets the state of the
Substance object, and no synchronization is required in property calculation
functions.
2018-08-03 15:18:30 -04:00
Ray Speth
fd57936b18 [ck2cti] Fix spurious 'unexpected output' warnings
When calling ck2cti via the C++ wrapper function, the output of the
'convertMech' function (usually an empty list) would be printed. Fixes a bug
introduced in db90a7c.
2018-07-30 11:25:27 -04:00
Ray Speth
e79cf6f8cb [Transport] Add temperature dependence of rotational relaxation
Results in increase in mixture-averaged thermal conductivity of ~1% or less, and
a similar increase in laminar flame speeds, at least for some test cases.
2018-07-30 10:47:49 -04:00
Ray Speth
c3ba264284 [1D] Fix IonFlame instability due to negative electron concentration 2018-07-30 10:47:49 -04:00
Bryan W. Weber
2f3a0122d6 [Doc] Fix some style typos in the Doxygen docs 2018-07-29 17:47:14 -04:00
Ray Speth
35aa8be61e [Transport] Fix to enable 'CK_Mix' and 'CK_Multi' model specifications
These model strings were being treated in TransportFactory in a way that
effectively resulted in creation of regular 'Mix' and 'Multi' transport objects.
2018-07-11 14:13:16 -04:00
BangShiuh
fa9b9374cf [1D] Add polyfit for electron transport profile 2018-06-15 10:44:46 -04:00
bangshiuh
f7852ad84c [Transport] Add use Blancs law to calculate mobilities 2018-06-15 10:44:46 -04:00
bangshiuh
eeb27d84a9 [1D] Remove charge neutrality solver option from IonFlow 2018-06-15 10:44:46 -04:00
BangShiuh
3a0f46eb56 [Transport] Add class IonGasTransport 2018-06-15 10:44:46 -04:00
BangShiuh
b7e32e4604 [Transport] add dispersion coefficient and quadrupole polarizability 2018-06-15 10:44:46 -04:00
Armin Wehrfritz
d38d9da32c [Transport] Add unity Lewis number transport model 2018-06-07 13:52:26 -04:00
Ray Speth
3c978cdff6 [Equil] Deprecate get/setElementPotentials 2018-06-06 11:54:14 -04:00
Ray Speth
74167cc3eb [Equil] Don't use saved element potentials as initial guess
Saved element potentials are only valid at equilibrium, and may not be a good
guess for calls to equilibrate() after the state has changed.

By always using the estimation method for the element potentials at the start of
the ChemEquil algorithm, the results of equilibrate() are repeatable, and do not
depend on the results of previous calls to equilibrate().

Resolves #524
2018-06-06 11:54:14 -04:00
Bryan W. Weber
6b3c912ec3 Fix MemoryWriter is no longer available from fmtlib
In fmtlib 5.0.0, MemoryWriter was removed. The recommendation is to
replace it with memory_buffer
2018-05-30 14:16:27 -04:00
Ray Speth
55490de871 Fix compiler warning about m_Faraday_dim 2018-05-19 22:04:57 -04:00
Ray Speth
07eed363fe Use std::sort to eliminate need for vcs_optMax 2018-05-19 22:04:57 -04:00
Ray Speth
277aa0b913 [ck2cti] Allow convertMech function to be called multiple times
Each call to convertMech now creates a new Parser object to do the conversion,
rather than requiring the user to do so themselves.

Fixes #528.
2018-05-16 13:50:33 -04:00
Ray Speth
5b4a977df7 [Equil] Improve control of logging in ChemEquil solver
Use the 'loglevel' argument to the 'equilibrate' function to set the logging
level of the ChemEquil (element potential) solver, instead of relying on the
undocumented, static 'ChemEquil_print_lvl' variable which can only be set from
the C++ interface.
2018-04-14 16:16:51 -04:00
Ray Speth
d09161716f Fix duplicate key check in parseCompString
The check was being done at a stage where the token being checked could be just
a part of a key (if the key contained a colon), where this partial key could
correspond to another valid key.

Fixes #525
2018-04-13 15:33:35 -04:00
Bryan W. Weber
a03afbd56e
[1D] Throw an exception if transport state is inconsistent
The user can enable Soret (thermal) diffusion or multicomponent
transport in either order, but attempts to solve flame problems with
Soret enabled and the mixture-averaged transport approximation will
result in an error
2018-03-13 10:11:52 -04:00
Ray Speth
6d22be2a6b Mark unused/untested classes as deprecated
Deprecated thermo classes: Adsorbate, MetalSHEelectrons, MineralEQ3,
MolarityIonicVPSSTP, PhaseCombo_Interaction

Deprecated kinetics classes: AqueousKinetics

Deprecated transport classes: LTPSpecies, LiquidTranInteraction,
LiquidTransport, LiquidTransportData, LiquidTransportParams, SimpleTransport,
SolidTransport, SolidTransportData, Tortuosity

See #267
2018-02-15 23:50:11 -05:00
Ray Speth
9c50f7528c Add support for Sundials 3.1.0 (also 3.0.0) 2018-02-14 22:22:42 -05:00
Ray Speth
50a3fecb23 Rename Sundials-related macros to avoid name conflicts 2018-02-14 22:22:42 -05:00
Ray Speth
536158b402 [Matlab] Remove broken demo running script 2018-01-24 16:31:42 -05:00
Steven DeCaluwe
89fded32d4 Fixes ConstDensityThermo::standardConcentration()
`ConstDensityThermo::standardConcentration(k)` is now calculated
as `density()/molecularWeight(k)`, rather than the previously
incorrect `molarDensity()`.

Note that this causes a problem for any species where
`molecularWeight(k)=0` (i.e. vacancies).  Such species should be
avoided, in this phase model.

For that reason, `sofc-test.xml` is changed so that the oxide bulk
is modeled as an `IdealSolidSolution`
2017-12-06 10:57:15 -05:00
Ray Speth
1eebd3efdb [Equil] Fix invalid memory access in VCS solver
Before bba0d8edf, the vector m_molNumSpecies_new was of a size greater than
m_nsp, with elements m_nsp through the end always filled with zeros. Thus the
check removed here always passed. In bba0d8edf, the vector size was reduced to
be the correct size (m_nsp), so this resulted in this check accessing
unallocated memory, causing the check to fail randomly in the TestKOH_Equil
test. The resulting exception was always caught internally, so the solver wasn't
returning incorrect results, but the non-determinism was leading to unexpected
changes in code coverage reports.
2017-12-05 22:26:45 -05:00
Ray Speth
deeaaed03f [Reactor] Fix using pure substances near temperature limits
Fixes #475
2017-12-02 19:19:51 -05:00
Ray Speth
2ac8a0ef08 [Thermo] Use min/max temperatures from equation of state
The values in the liquidvapor.cti should be ignored, since this thermo data is
not actually applicable -- it is just used to set the reference state.
2017-12-02 19:19:51 -05:00
Bryan W. Weber
831239633d Fix dependency problem with matlab library
Building in parallel would error out because the macOS Matlab library
was relying on the static Cantera library before that was finished.
2017-11-26 16:48:40 -05:00
Bryan W. Weber
2bc4d09da3 Fix substitution of setup_cantera and ctpath.m
Use Python 3 variables by default, and Python 2 only if Python 3 isn't
being built
2017-11-26 16:48:40 -05:00
Bryan W. Weber
16fd18315c Remove HAS_NO_PYTHON configuration variable
This variable is not needed since in the two places its used we do a
runtime check of the presence of the Python interface anyways
2017-11-26 16:48:40 -05:00
Evan McCorkle
686250e51f Partial pimpl for AnyValue to hide boost on API.
- boost now only included in AnyMap.inl.h (within include/cantera)
2017-10-25 09:30:22 -04:00
Evan McCorkle
f8d183220c Move AnyValue template definitions to inl file 2017-10-25 09:30:22 -04:00
Evan McCorkle
713b9cc23c Wrapped common uses of boost string algorithms.
- Limits propagation of boost header and namespace.
2017-10-25 09:30:22 -04:00
Evan McCorkle
e921cb89c8 Allow default build with msvc-12.0.
Fixes the appearance of C2536 (cannot specify explicit initializer for
arrays). This was preventing a build with msvc_version=12.0. It was
fixed using Visual Studio 2013 (12.0) Update 5.
2017-10-20 20:33:38 -04:00
Ray Speth
21c2215117 [Equil] Eliminate switching between dimensional / nondimensional in VCS
The solver always works in nondimensional units
2017-10-05 22:58:19 -04:00
Ray Speth
3820ca3147 [Equil] Eliminate "total moles" scaling in VCS solver 2017-10-05 22:58:19 -04:00
Ray Speth
1b97c49d8d [Thermo] Make species size local to SurfPhase 2017-10-05 22:58:19 -04:00
bangshiuh
a99004d8ef add docstring and fix evalResidual 2017-09-22 18:47:18 -04:00
bangshiuh
2472e080c3 [1D] split updateProperties and add evalResidual 2017-09-22 18:47:18 -04:00
bangshiuh
1be8374342 [1D] delete unnecessary constrain and improve the code structure 2017-09-22 18:47:18 -04:00
Ray Speth
739d4e4830 [Equil] Eliminate redundant variables from VCS_SOLVE
Most of these were originally members of VCS_PROB
2017-08-21 21:33:00 -04:00
Ray Speth
7eb939dc5f [Equil] Eliminate SpeciesThermo and VPhaseList from VCS_SOLVE
This means that the VCS_SPECIES_THERMO and vcs_VolPhase classes no longer need
to be able to be copied.
2017-08-21 21:31:45 -04:00
Ray Speth
4e53c893cf [Equil] More simplification of VCS_SOLVE initialization 2017-08-21 21:31:33 -04:00
Ray Speth
da3ba35945 [Equil] Eliminate some redundant variables in VCS_SOLVE 2017-08-21 21:29:33 -04:00
Ray Speth
bba0d8edf0 [Equil] Simplify initialization of VCS_SOLVE 2017-08-21 21:29:19 -04:00
Ray Speth
8522095dea [Equil] Refactor to eliminate class VCS_PROB
Move data in the VCS_PROB class to VCS_SOLVE
2017-08-21 21:29:19 -04:00
Ray Speth
da801f4cbc [Equil] remove unused VCS_SOLVE::reportCSV 2017-08-21 21:29:09 -04:00