*** empty log message ***
This commit is contained in:
parent
7718361c94
commit
a6b65715d7
7 changed files with 90 additions and 27 deletions
|
|
@ -13,11 +13,6 @@
|
|||
#include "mex.h"
|
||||
#include "ctmatutils.h"
|
||||
#include "mllogger.h"
|
||||
//#include "../../../src/global.h"
|
||||
|
||||
namespace Cantera {
|
||||
void setMatlabMode(bool m);
|
||||
}
|
||||
|
||||
const int NO_CLASS = 0;
|
||||
const int XML_CLASS = 10;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ from Cantera.XML import XML_Node
|
|||
from Cantera.num import zeros
|
||||
import _cantera
|
||||
|
||||
|
||||
class Kinetics:
|
||||
"""
|
||||
Kinetics managers. Instances of class Kinetics are responsible for
|
||||
|
|
@ -141,7 +140,7 @@ class Kinetics:
|
|||
if nur <> 0.0:
|
||||
if nur <> 1.0:
|
||||
if nur <> round(nur):
|
||||
s += `nur`+' '
|
||||
s += str(nur)+' '
|
||||
else:
|
||||
s += `int(nur)`+' '
|
||||
s += self._sp[k]+' + '
|
||||
|
|
@ -155,7 +154,7 @@ class Kinetics:
|
|||
if nup <> 0.0:
|
||||
if nup <> 1.0:
|
||||
if nup <> round(nup):
|
||||
s += `nup`+' '
|
||||
s += str(nup)+' '
|
||||
else:
|
||||
s += `int(nup)`+' '
|
||||
s += self._sp[k]+' + '
|
||||
|
|
|
|||
|
|
@ -47,38 +47,65 @@ using namespace ct;
|
|||
*/
|
||||
namespace Cantera {
|
||||
|
||||
//#define CANTERA_VERSION 1.6
|
||||
const doublereal Pi = 3.1415926;
|
||||
const doublereal SqrtPi = sqrt(Pi);
|
||||
|
||||
// use kg-moles, rather than g-moles.
|
||||
|
||||
// Note: this constant is a relic of old versions,
|
||||
// and appears to be no longer used anywhere.
|
||||
const doublereal CtMoles_per_mole = 1.e-3; // kmol
|
||||
|
||||
/// @name Physical Constants
|
||||
//@{
|
||||
|
||||
/// Avogadro's Number
|
||||
const doublereal Avogadro = 6.022136736e26;
|
||||
|
||||
//const doublereal GasConstant = 8314.0;
|
||||
|
||||
/// Universal Gas Constant. 1999 CODATA value.
|
||||
const doublereal GasConstant = 8314.47215;
|
||||
const doublereal GasConstant = 8314.47215; // J/kmol/K
|
||||
|
||||
const doublereal logGasConstant = 9.025752908;
|
||||
|
||||
/// One atmosphere
|
||||
const doublereal OneAtm = 1.01325e5; // Pa
|
||||
|
||||
/// Universal gas constant in cal/mol/K
|
||||
const doublereal GasConst_cal_mol_K = 1.987;
|
||||
|
||||
/// Boltzmann's constant
|
||||
const doublereal Boltzmann = GasConstant / Avogadro;
|
||||
|
||||
/// Planck's constant
|
||||
const doublereal Planck = 6.6262e-34; // J-s
|
||||
const doublereal Planck = 6.626068e-34; // J-s
|
||||
const doublereal Planck_bar = 1.05457148e-34; // m2-kg/s
|
||||
|
||||
/// log(k/h)
|
||||
const doublereal logBoltz_Planck = 23.7599032; // ln(k_B/h)
|
||||
/// Stefan-Boltzmann constant
|
||||
const doublereal StefanBoltz = 5.67e-8;
|
||||
const doublereal ElectronCharge = 1.602e-19;
|
||||
|
||||
/// @name Electron Properties
|
||||
//@{
|
||||
const doublereal ElectronCharge = 1.602e-19; // C
|
||||
const doublereal ElectronMass = 9.10938188e-31; // kg
|
||||
const doublereal Faraday = ElectronCharge * Avogadro;
|
||||
const doublereal epsilon_0 = 8.85e-12; // farads / m
|
||||
const doublereal Pi = 3.1415926;
|
||||
const doublereal SqrtPi = sqrt(Pi);
|
||||
//@}
|
||||
|
||||
/// @name Electromagnetism
|
||||
/// Cantera uses the MKS unit system.
|
||||
//@{
|
||||
|
||||
/// Permittivity of free space \f$ \epsilon_0 \f$ in F/m.
|
||||
const doublereal epsilon_0 = 8.8542e-12; // Farads/m = C^2/N/m^2
|
||||
|
||||
/// Permeability of free space \f$ \mu_0 \f$ in N/A^2.
|
||||
const doublereal permeability_0 = 4.0e-7*Pi; // N/A^2
|
||||
|
||||
//@}
|
||||
|
||||
//@}
|
||||
|
||||
const doublereal OneThird = 1.0/3.0;
|
||||
const doublereal FiveSixteenths = 5.0/16.0;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ echo "***************************************************"
|
|||
echo " "
|
||||
BINDIR=@buildbin@
|
||||
CK2CTI=$BINDIR/ck2cti
|
||||
echo "Test 1: Converting file gri30.inp..."
|
||||
echo "...Test 1: Converting file gri30.inp..."
|
||||
$CK2CTI -i ./gri30.inp -id gri30 -tr ./gri30_tran.dat
|
||||
#
|
||||
# strip out variably dated stuff
|
||||
|
|
@ -28,12 +28,18 @@ retnStat=$?
|
|||
#
|
||||
if [ $retnStat = "0" ]
|
||||
then
|
||||
echo "successful diff comparison on ck2cti test (gri30.inp)"
|
||||
echo "Successful diff comparison on ck2cti test (gri30.inp)"
|
||||
else
|
||||
echo "unsuccessful diff comparison on ck2cti test (gri30.inp)"
|
||||
echo "########################################################"
|
||||
echo "Unsuccessful diff comparison on ck2cti test (gri30.inp)"
|
||||
echo " For more information, see files:"
|
||||
echo " test_problems/ck2cti_test/diff_test.out"
|
||||
echo " test_problems/ck2cti_test/gri30b.cti"
|
||||
echo " test_problems/ck2cti_test/gri30a_blessed.cti"
|
||||
echo "########################################################"
|
||||
fi
|
||||
echo
|
||||
echo "Test 2: Converting file soot.inp..."
|
||||
echo "...Test 2: Converting file soot.inp..."
|
||||
echo " This tests handling of extensions to the Chemkin input file format"
|
||||
echo " to handle very large molecules and non-integral stoichiometric"
|
||||
echo " coefficients..."
|
||||
|
|
@ -59,7 +65,13 @@ if [ $retnStat = "0" ]
|
|||
then
|
||||
echo "successful diff comparison on ck2cti test (soot.inp)"
|
||||
else
|
||||
echo "unsuccessful diff comparison on ck2cti test (soot.inp)"
|
||||
echo "########################################################"
|
||||
echo "Unsuccessful diff comparison on ck2cti test (soot.inp)"
|
||||
echo " For more information, see files:"
|
||||
echo " test_problems/ck2cti_test/diff_soot.out"
|
||||
echo " test_problems/ck2cti_test/sootb.cti"
|
||||
echo " test_problems/ck2cti_test/soot_blessed.cti"
|
||||
echo "########################################################"
|
||||
fi
|
||||
echo
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,13 @@ if [ $retnStat = "1" ]
|
|||
then
|
||||
echo "successful csv comparison on eq1 test"
|
||||
else
|
||||
echo "########################################################"
|
||||
echo "unsuccessful csv comparison on eq1 test"
|
||||
echo " For more information, see files:"
|
||||
echo " test_problems/cxx_ex/eq1_test.out"
|
||||
echo " test_problems/cxx_ex/eq1.csv"
|
||||
echo " test_problems/cxx_ex/eq1_blessed.csv"
|
||||
echo "########################################################"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
|
@ -59,7 +65,13 @@ then
|
|||
echo "PASSED" > csvCode.txt
|
||||
fi
|
||||
else
|
||||
echo "########################################################"
|
||||
echo "unsuccessful csv comparison on tr1 test"
|
||||
echo " For more information, see files:"
|
||||
echo " test_problems/cxx_ex/tr1_test.out"
|
||||
echo " test_problems/cxx_ex/tr1.csv"
|
||||
echo " test_problems/cxx_ex/tr1_blessed.csv"
|
||||
echo "########################################################"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
|
@ -78,7 +90,13 @@ then
|
|||
echo "PASSED" > csvCode.txt
|
||||
fi
|
||||
else
|
||||
echo "########################################################"
|
||||
echo "unsuccessful csv comparison on tr2 test"
|
||||
echo " For more information, see files:"
|
||||
echo " test_problems/cxx_ex/tr2_test.out"
|
||||
echo " test_problems/cxx_ex/tr2.csv"
|
||||
echo " test_problems/cxx_ex/tr2_blessed.csv"
|
||||
echo "########################################################"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
|
@ -106,7 +124,13 @@ then
|
|||
echo "PASSED" > csvCode.txt
|
||||
fi
|
||||
else
|
||||
echo "########################################################"
|
||||
echo "unsuccessful csv comparison on kin1 test"
|
||||
echo " For more information, see files:"
|
||||
echo " test_problems/cxx_ex/kin1_test.out"
|
||||
echo " test_problems/cxx_ex/kin1.csv"
|
||||
echo " test_problems/cxx_ex/kin1_blessed_tmp.csv"
|
||||
echo "########################################################"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
|
@ -134,7 +158,13 @@ then
|
|||
echo "PASSED" > csvCode.txt
|
||||
fi
|
||||
else
|
||||
echo "########################################################"
|
||||
echo "unsuccessful csv comparison on kin2 test"
|
||||
echo " For more information, see files:"
|
||||
echo " test_problems/cxx_ex/kin2_test.out"
|
||||
echo " test_problems/cxx_ex/kin2.csv"
|
||||
echo " test_problems/cxx_ex/kin2_blessed_tmp.csv"
|
||||
echo "########################################################"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
/**
|
||||
* @file example2.cpp
|
||||
* @file runDiamond.cpp
|
||||
*
|
||||
*/
|
||||
|
||||
// Example
|
||||
//
|
||||
// Read a mechanism and a thermodynamics file for the
|
||||
// class IdealSolidSolnPhase in order to test that it's
|
||||
// working correctly
|
||||
//
|
||||
// Note that this example needs updating. It works fine, but is
|
||||
// written in a way that is less than transparent or
|
||||
// user-friendly. This could be rewritten using class Interface to
|
||||
// make things simpler.
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
|
||||
temp_success="1"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue