Commit graph

99 commits

Author SHA1 Message Date
Ingmar Schoegl
bc8b4be654 [Reactor] clarify FlowDevice interface
* differentiated Valve::setValveCoeff from PressureController::setPressureCoeff
 and introduced MassFlowController::setMassFlowCoeff for consistency.
 * introduced FlowDevice::setTimeFunction and FlowDevice::setPressureFunction to
 differentiate time-dependent and pressure-dependent functions.
 * introduced arbitrary pressure dependence for PressureController
 * deprecated FlowDevice::setFunction which is replaced by time and pressure
 specific functions.
 * introduced properties Valve.valve_coeff / PressureController.pressure_coeff /
 MassFlowController.mass_flow_coeff in Cython interface and deprecated
 Valve.set_pressure_coeff / PressureController.set_pressure_coeff
 * deprecated corresponding function calls in clib interface
 * deprecate FlowDevice.setParameters (which was only used by MATLAB interface)
2019-08-05 17:01:05 -04:00
Ingmar Schoegl
d263566670 [Reactor] Deprecating magic numbers.
* add deprecation warning for int ReactorBase::type() (to be changed after Cantera 2.5)
 * introduce temporary std::string ReactorBase::typeStr() (to be renamed after Cantera 2.5)
 * deprecate all functions using the old call and introduce associated temporary functions
2019-08-01 15:37:48 -04:00
Steven DeCaluwe
2d2004da7e Exposing getDeltaEnthalpies to Matlab interface.
The general intent here was to enable calculating reaction enthalpies in the
Matlab toolbox, as part of the li-ion battery simulations in PR #563.

This required several changes:

- Create getDeltaEnthalpies.m in Matlab toolbox/@Kinetics, as well as similar
methods for Gibbs free energy and entropy of reaction
- Add kin_getDelta to kineticsmethods.cpp.
- Add getPartialMolarEnthalpies to metalPhase class (it returns all zeros).

Note that similar methods are not enabled for the corresponding
'Standard State' methods, for the time being.  Mainly because it is
difficult for me to envision a significant use case, but also because of
some lingering confusion between 'standard' and 'reference' states in
Cantera's codebase.
2019-06-27 18:03:07 -04:00
Ray Speth
901ec2f12c [Matlab] Construct objects directly from input file names
Bypass reading and manipulation of XML files within Matlab, so that XML, CTI,
and YAML input files can all be used.
2019-06-25 22:30:59 -04:00
Steven DeCaluwe
0ed2b38594 Adding faradayconstant.m to Matlab toolbox 2019-06-08 17:33:30 -04:00
CyberDrudge
9d4c0eda03
Fix typo in Matlab documentation for cp_mass
Fixes #590
2019-02-17 08:12:53 -05:00
Ray Speth
35be561d99 [Matlab] Eliminate unnecessary copy-constructor-like option 2019-02-04 16:38:40 -05:00
Ray Speth
6f45b241b5 Remove code deprecated in Cantera 2.4 2018-12-14 11:27:24 -05:00
Ray Speth
d6da006e3e [SCons] Only build the Python package for Python 3.x 2018-09-19 17:59:59 -04:00
Ray Speth
fefc008ed2 [Matlab] Fix definition of isFlow
Caused most Matlab flame simulations to fail, e.g. those using
CounterFlowDiffusionFlame.m or flame.m. Fixes regression introduced in c1067aa.

Fixes #554
2018-08-23 16:45:28 -04:00
Bryan W. Weber
1ca6c5eb40
Change all github.io links to cantera.org links 2018-08-20 15:06:28 -04:00
Bryan W. Weber
d33e67c36c [Doc] Put titles on raw links to main site 2018-07-29 17:47:14 -04:00
Bryan W. Weber
d2252037c6 Fix docstring of Matlab CounterFlowDiffusionFlame.m 2018-07-29 17:47:14 -04:00
Bryan W. Weber
549463683d Fix Sphinx and Doxygen warning messages about moved content 2018-07-29 17:47:14 -04:00
Bryan W. Weber
d57f1d147d Minor formatting change in GRI30 Matlab docstring 2018-07-29 17:47:14 -04:00
Ray Speth
a22db9fa22 [Matlab] Check that Reactor contents are Solution objects
Fix documentation error that incorrectly indicated that Mixture objects could
also be used.
2018-02-14 22:25:16 -05:00
Ray Speth
987a247bd0 [Matlab] Replace calls to removed 'z' method with 'gridPoints' 2018-01-24 16:31:52 -05:00
Ray Speth
831b92dac4 [Doc/Kinetics] Clarify values returned by getFwdRateConstants 2018-01-06 21:27:42 -05:00
Bryan W. Weber
fec6c34ed8 Remove more references to importPhase in Matlab docs 2017-07-11 18:26:55 -04:00
Ray Speth
c092484f4d [Matlab] Deprecate npflame_init in favor of CounterFlowDiffusionFlame 2017-06-10 16:44:50 -04:00
KyleLinevitchJr
43bd96b5ba [Matlab] Make counterflow diffusion flame simulation more general
The CounterFlowDiffusionFlame (CFDF) code is able to perform more general cases
of npflame_init for multiple species fuel and oxidizer streams. The
stoichiometric mixture fraction in the CFDF code uses the Bilger definition of
mixture fraction, using the conservation of elements C, H, and O. This method is
used in the python module, but not the MATLAB npflame_init function.

Also, the CFDF code uses the fuel stream density to calculate the fuel stream
velocity and the oxidizer stream density to calculate the oxidizer stream
velocity, where as the npflame_init code uses the fuel density for both velocity
calculations.

The elementMassFraction code is a MATLAB version of the python function:
elemental_mass_fraction, which is needed to run the CFDF code.

Update the diffflame.m example to use the more general CFDF function since the
input parameters are different than the npflame_init function. This example is
the same as the diffusion_flame.py sample in the Python module.
2017-06-10 16:44:50 -04:00
Ray Speth
7673f7cb52 Remove code deprecated in Cantera 2.3.0 2017-02-12 19:22:33 -05:00
Bryan W. Weber
c982f50421
[Matlab/Doc] Fix docs for enthalpies_RT function 2017-01-25 07:41:43 -05:00
Ray Speth
7979a2b52a Add Matlab function for checking git commit 2017-01-23 14:33:31 -05:00
Bryan W. Weber
983b2cc015 [Matlab/Doc] Fix typos in docs for some ThermoPhase getters
These actually return scalars, although the docstrings
said they returned vectors
2017-01-03 21:57:06 -05:00
EmilAtz
1e08d7499c Deprecation of MatLab importPhase function
Addition of comments in importPhase to warn for function deprecation.
2016-12-21 15:39:54 -05:00
Ray Speth
5641fa83e9 [clib/Matlab] Add function for getting Cantera version 2016-11-11 23:06:35 -05:00
Bryan W. Weber
1cdc6b6d7e Add C-Lib and Matlab interface to getDataDirectories 2016-10-31 17:14:26 -04:00
Ray Speth
c16c15367f [Matlab] Fix ThermoPhase 'clear' method
This function was actually being directed into 'thermoget' and calling the
'newFromXML' method (on a non-existent XML tree) instead of calling the 'del'
method.
2016-10-18 11:21:42 -04:00
Bryan W. Weber
9bba45b01e Fix minor docs typo in Matlab enthalpy_mole 2016-10-04 11:34:04 -04:00
Bryan W. Weber
8ada40f0be
[Matlab] Add interface to setChemistry 2016-08-12 11:53:53 -04:00
Ray Speth
69f25b41dc [Matlab] Fix default threshold value when displaying phase info
At some point (after version 2014b), Matlab started passing an additional
argument to 'display', which broke the logic for setting the default
threshold. This caused all composition data to be excluded from the report shown
by typing the name of the phase object.
2016-07-13 17:11:34 -04:00
Ray Speth
4b8f8b692a [Reactor] Deprecate Wall-based method for adding surface chemistry
The new method using class ReactorSurface should be used instead.
2016-06-28 14:37:59 -04:00
Ray Speth
a7aec575a9 [Matlab] Make ReactorSurface available in Matlab 2016-06-28 14:37:59 -04:00
Ray Speth
b88e2cb00d [Matlab] Deprecate constants.m 2016-06-27 14:16:48 -04:00
Ray Speth
ffeef2240a [Matlab] Deprecate Domain1D::z (duplicate of Domain1D::gridPoints) 2016-06-27 14:11:19 -04: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
82d4b50bef [Doc] Fix warnings in Sphinx/Matlab docs 2015-12-27 16:50:18 -05:00
Bryan W. Weber
ee9d5750a3 [Matlab] Add missing PureFluid constructors for fluids defined in liquidvapor.xml 2015-12-26 14:54:37 -05:00
Bryan W. Weber
cf49649dd8 [Matlab] Move lowercase air.m to uppercase Air.m to be consistent with the other PureFluid functions 2015-12-26 14:49:47 -05:00
Bryan W. Weber
9977fd6f49 [Matlab] Switch PureFluids to use liquidvapor xml file 2015-12-26 14:45:56 -05:00
Ray Speth
ac9dfa055c [Thermo] Synchronize Mixture/Multiphase state before printing report
Do not assume that the states of the individual ThermoPhase objects still
correspond to the state of the mixture object. See #306.
2015-11-12 12:42:35 -05:00
Steven DeCaluwe
14864e840b Extend NoNorm option for setCoverages to the Matlab toolbox
Because normalizing the species coverages leads to incorrect Jacobian
calculations, it is sometimes necessary to not normalize the coverages.
As for bulk species mass/mole fractions, this option is currently only
available when passing the coverages as a vector (i.e., not available
for string identifiers).
2015-11-07 21:14:03 -05:00
Bryan W. Weber
0be9e7eef7 [Matlab] Fix spacing in private functions 2015-10-24 08:05:52 -04:00
Bryan W. Weber
0b5c97ad4f [Doc] Correct docs for setState_*sat in Matlab
Correct the documentation to clarify that a vector must be passed in to
these functions, not a single value.
2015-10-24 08:05:45 -04:00
Bryan W. Weber
5aabfe9704 [Matlab] Fix setState_sat*.m functions
Fix the setState_satLiquid and setState_satVapor functions so that they call the main set
method instead of the underlying C++ layer. Resolves #299.
2015-10-24 07:56:10 -04:00
Bryan W. Weber
0b5a46fe03 Remove execute bit from files that don't need it 2015-08-02 23:06:16 -04:00
Bryan W. Weber
60827267b7 Add MATLAB interface to the setState_RP function 2015-06-15 17:47:37 -04:00
Ray Speth
8d4e9bff6e [Reactor] Make argument to ReactorNet.step optional and deprecated
The value of this argument has almost no effect on the integrator, and
frequently confuses users since the ReactorNet can end up at a time either
greater or less than the specified time. By removing this argument, the
distinction betwen step() and advance(t) becomes much more clear.
2015-06-11 14:03:20 -04:00
Ray Speth
258fb8ed57 [Matlab] Add missing 'clear' functions
Without these functions, it was impossible to use these classes
without leaking memory. Even with these functions, the memory is
released only when these functions are explicitly called, as
old-style Matlab classes have no notion of a destructor.

Fixes #252.
2015-04-11 10:54:52 -04:00