Cantera/Example
From ScientificComputing
As an example for using Cantera, we are creating an object that represents a phase of matter and print out its properties. For this, we are using the Python interface of Cantera and run the script test.py.
[leonhard@euler02 ~]$ cat test.py #!/usr/bin/env python import cantera as ct gas1 = ct.Solution('gri30.xml') gas1() [leonhard@euler02 ~]$ module load legacy gcc/4.8.2 open_mpi/1.6.5 python/2.7.6 boost/1.55.0 matlab/8.2 cantera/2.1.2 Autoloading openblas/0.2.13_seq [leonhard@euler02 ~]$ bsub -n 1 -W 0:10 -R "rusage[mem=100]" "python test.py" Generic job. Job <35413388> is submitted to queue <normal.4h>. [leonhard@euler02 ~]$ bjobs JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME 35413388 leonhard PEND normal.4h euler02 *n test.py Jan 10 14:16 [leonhard@euler02 ~]$ bjobs JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME 35413388 leonhard RUN normal.4h euler02 e1348 *n test.py Jan 10 14:16 [leonhard@euler02 ~]$ bjobs No unfinished job found [leonhard@euler02 ~]$ grep -A 14 gri30 lsf.o35413388 gri30: temperature 300 K pressure 101325 Pa density 0.0818891 kg/m^3 mean mol. weight 2.01588 amu 1 kg 1 kmol ----------- ------------ enthalpy 26470.1 5.336e+04 J internal energy -1.21087e+06 -2.441e+06 J entropy 64913.9 1.309e+05 J/K Gibbs function -1.94477e+07 -3.92e+07 J heat capacity c_p 14311.8 2.885e+04 J/K heat capacity c_v 10187.3 2.054e+04 J/K
The resource usage summary of the job can be found in the LSF log file.