未分類

category

software installation (2)

* Cantera 2.3.0

1. aptitude installation
sudo apt-get install aptitude

2. Cantera PPA addition
sudo aptitude install python-software-properties
sudo apt-add-repository ppa:speth/cantera
sudo aptitude update

3. Cantera packages installation
sudo aptitude install cantera-python cantera-python3 cantera-dev

4. pip installation
sudo apt install python-pip
sudo apt install python3-pip
pip install –upgrade pip

5. ipython installation
pip2 install ipython matplotlib
pip3 install ipython matplotlib
sudo aptitude install ipython python-matplotlib
sudo aptitude install ipython3 python3-matplotlib

6. git installation
sudo apt install git

7. scons installation
sudo apt install scons

8. Installation of g++, python, scons, and libboost-dev
sudo apt install g++ python scons libboost-dev

9. Installation of Python2 module
sudo apt install cython python-dev python-numpy python-numpy-dev python-setuptools

10. Installation of Python3 module
sudo apt install cython python3 python3-dev python3-setuptools python3-numpy

11. Download Cantera source code
git clone –recursive https://github.com/Cantera/cantera.git
cd cantera
git checkout tags/v2.3.0
git tag –list
cd ~

12. Test & build
cd cantera
(scons clean)
scons build
scons test
sudo scons install
cd ~

13. Tutorial
python
>>> import cantera as ct
>>> import numpy as np
>>> gas1 = ct.Solution(‘gri30.xml’)
>>> gas1()
>>> ctrl-D
* ok