Commit graph

138 commits

Author SHA1 Message Date
Bryan W. Weber
142f533229 Correct flag and libs for OpenMP on macOS
Apple's clang on macOS requires the libomp to link. Apple symlinks gcc
to clang, so it can't be detected as clang by executable name
2019-06-17 10:29:20 -04:00
Bryan W. Weber
3588be16f3 CMake use Accelerate even if OpenMP is also used
For samples, make sure that OpenMP and Accelerate are not exclusive
options on macOS
2019-06-17 10:29:20 -04:00
Bryan W. Weber
007ecf0c7c Include boost_inc_dir when building the samples 2019-06-17 10:29:20 -04:00
Bryan W. Weber
9a5c2708e5 Replace the compiler variables during conda build
The build compilers should not be specified into the sample templates
2019-06-13 14:36:54 -04:00
Bryan W. Weber
265032da8f Remove build-system specific env vars on macOS
The isysroot and mmacosx-min-version flags are needed to build the
Cantera library, but not to actually use it on macOS. They should be
removed because users don't need these and should use the SDK installed
with XCode.
2019-06-13 14:36:54 -04:00
CyberDrudge
fbe4ce5c1b Remove Unnecessary comments 2019-05-09 12:22:44 -04:00
Bryan W. Weber
4026c17915 Add /usr/local/include to cmake incdirs
By default, CMake uses the system SDK on macOS as the system root by
setting the isysroot flag to clang. This setting removes /usr/local from
the include search path.
2019-03-15 14:44:43 -04:00
Bryan W. Weber
cb008a95d7 Add the Accelerate framework to the CMake builds of the samples 2019-03-15 14:44:43 -04:00
Ray Speth
77b467929c [Thermo] Fix calculation of initial density of IdealSolidSolnPhase
The density of IdealSolidSolnPhase and BinarySolutionTabulatedThermo objects was
not being computed as part of construction, causing code that interacted with
them using setState/restoreState, such as the 'Solution' constructors in Matlab
and Python, to fail.
2019-02-20 21:39:22 -05:00
Steven DeCaluwe
f0c797c482 Updates to samples/matlab/lithium_ion_battery.m
Added some context and higher level functionality  to
lithium_ion_battery.m sample, such that it now uses some of the
already-present functionality to calculate and plot the open
circuit voltage for a lithium ion battery for a range of active
material compositions.
2019-02-20 21:39:22 -05:00
Steven DeCaluwe
8169c26271 Updates to ctml_writer.py associated with BinarySolutionTabulatedThermo class.
-Removes option to read tabulated thermo from an external csv file (this is now
handled from within cti or xml).
-Renames `rateCoeff` keyword to the more appropriate `rate_coeff_type`, and fixing
keyword order so that this new keyword is listed last.
-Removes `else` statement from `if isinstance(self._standardState, standardState)
-Removes unused `_pure` attribute from `IdealSolidSolution` and
`BinarySolutionTabulatedThermo`
-Changes default on `tabulated_species` keyword to `None`.
-Removing superfluous `standardState:_build` from ctml_writer.py
- Removes unnecessary conc_dim() definition in `table` class.
- Removes unnecessary units defintion for mole fractions in `table` class.
- Improves grammar in error message for case when thermo table is
not provided for `tabulated_species`.
2019-02-20 21:39:22 -05:00
Manik Mayur
b8d5eb405a Add MATLAB example files for BinarySolutionTabulatedThermo class 2019-02-20 21:39:22 -05:00
Ray Speth
dc09040274 [Samples] Fix compilation of Blasius BVP sample with 'scons samples' 2019-02-04 16:38:40 -05:00
Ray Speth
1ec9ce2c01 [1D/samples] Fix C++ flame speed example
Fixes a regression introduced in 6f45b241.
2019-02-04 16:38:40 -05:00
Ray Speth
600580ead4 [Samples] Install build scripts for Blasius BVP example 2018-11-11 22:17:20 -05:00
Ray Speth
c26db356e3 [Samples] Remove unused methods of class BoundaryValueProblem 2018-11-11 22:17:20 -05:00
Ray Speth
b9a5913af0 [Samples] Fix Blasius example to work after removal of Domain1D::residual 2018-11-11 22:17:20 -05:00
Ray Speth
8c213da932 [1D] Fix grid refinement for classes not derived from StFlow
This includes user-developed flow classes, as well as the BoundaryValueProblem
class used in the 'blasius' example.
2018-11-11 22:17:20 -05:00
Bryan W. Weber
71072c43db Remove unneeded files from the Matlab samples 2018-07-29 17:47:14 -04:00
Ray Speth
172e9ffead [Samples] Remove verbose output from demo F77 wrapper 2018-05-19 22:04:57 -04:00
Ray Speth
987a247bd0 [Matlab] Replace calls to removed 'z' method with 'gridPoints' 2018-01-24 16:31:52 -05:00
Ray Speth
536158b402 [Matlab] Remove broken demo running script 2018-01-24 16:31:42 -05:00
Ray Speth
a31b7d1bb5 [Matlab] Remove spurious arguments from scripts for running examples 2018-01-24 16:09:49 -05:00
Bryan W. Weber
fec6c34ed8 Remove more references to importPhase in Matlab docs 2017-07-11 18:26:55 -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
78d5809d6f [Samples] Add C++ OpenMP example 2017-01-28 15:07:15 -05:00
Ray Speth
f959fa67c9 [Samples/Doc] Generate CMakeLists.txt files for C++ and F90 samples 2016-10-28 23:39:33 -04:00
Ray Speth
af076bad0b [Samples] Replace printf with writelog 2016-10-28 19:05:24 -04:00
Ray Speth
ac771aaac5 [Doc] Adjust example docstrings to get better automatic summaries 2016-10-14 17:20:18 -04:00
Ray Speth
994d7e9a53 [Doc] Adjust example docstrings to get better automatic summaries 2016-10-14 17:06:45 -04:00
Ray Speth
c8d3aa23d2 [Samples] Remove unused function 'writeCanteraHeader' 2016-10-13 18:40:03 -04:00
Ray Speth
ecbfecd7fd Replace existing copyright notices with uniform copyright/license info 2016-10-10 22:19:01 -04:00
Ray Speth
bc609ce2da [SCons] Fix Makefiles generated for C++ examples
- Use CXXFLAGS to pass flags to C++ compiler (not CCFLAGS)
- Set CXXFLAGS based on flags that Cantera was compiled with (which will include
  things like -pthread and -std=c++0x as necessary
- Remove incorrect / unused target for the target binary
- Add the generated binary to things remove by 'make clean'
2016-07-22 13:09:54 -04:00
Ray Speth
3261b4108a [SCons] Link Fortran sample programs to the correct standard library 2016-07-20 18:43:41 -04:00
Ray Speth
a7aec575a9 [Matlab] Make ReactorSurface available in Matlab 2016-06-28 14:37:59 -04:00
Ray Speth
2c005759b7 [Thermo] Combine SpeciesThermo and GeneralSpeciesThermo
The new class is named MultiSpeciesThermo, so that (eventually) the name
SpeciesThermo can be used for the single-species class SpeciesThermoInterpType.

Currently, trivial wrappers for classes named SpeciesThermo and
GeneralSpeciesThermo to maintain backwards compatibiity for Cantera 2.3.
2016-06-23 17:00:15 -04:00
Ray Speth
c64b714386 [Reactor] Add flow-device-specific methods for setting coefficients 2016-06-23 11:53:20 -04:00
Ray Speth
14b9454819 [C++] Clean up of top-level headers
These headers should only include general functionality, i.e. base classes and
factory methods. Users working directly with derived types can include the
relevant headers directly.

Deprecate some top-level headers which are not really useful.
2016-05-14 16:10:10 -04:00
Ray Speth
f2b68d8c34 [Examples] General cleanup of C++ flamespeed example 2016-04-14 15:31:50 -04:00
Ray Speth
b50ef03838 [Examples] Update C++ flamespeed to use current best-practices
Wider, uniform initial grid; initial profiles with zero-gradient section
on both ends of the domain; skip initial fixed-temperature solve.
2016-04-14 15:31:49 -04:00
Ray Speth
8b62a59403 [SCons] Generate SConstruct and Makefile for LiC6 electrode example 2016-04-06 22:16:48 -04:00
Ray Speth
0a3927a077 [SCons] SConstruct for C++ demos inherits compiler and options
Use the same values for the compiler name and the compiler flags as were used
when compiling Cantera.
2016-04-06 22:07:51 -04:00
Ray Speth
1aa28f9310 Let the constructor for std::string do its job 2016-03-27 22:19:38 -04:00
pwcnorthrop
1183479f88 Add RedlichKister tests and sample case for LiC6 electrode
See #293
2016-02-17 23:34:36 -05:00
Ray Speth
f44b5fed57 Replace usage of int2str with cppformat and deprecate int2str 2016-02-04 19:11:49 -05:00
Ray Speth
7562d79bad Remove unnecessary calls to ostream.close() 2015-11-23 18:06:54 -05:00
Ray Speth
4382ae6c85 Clean up comments in Thermo class source files 2015-11-09 17:34:46 -05:00
Ray Speth
0647823ada Replace DATA_PTR macro with calls to data() 2015-10-17 18:58:50 -04:00
Ray Speth
a945ef2c23 Make use of initializer lists where appropriate 2015-10-17 18:58:50 -04:00
Ray Speth
f9375e1a09 Use locks/mutexes from the standard library instead of Boost.Thread
This eliminates the need to link against any of the compiled Boost libraries,
and means that we can always build in thread-safe mode
2015-10-17 18:58:50 -04:00