mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
*** empty log message ***
This commit is contained in:
6
configure
vendored
6
configure
vendored
@@ -2465,10 +2465,10 @@ fi
|
||||
#
|
||||
# DEBUG_MODE: Specify that additional code be compiled in
|
||||
# that allows more debug printing where available.
|
||||
# default = "y"
|
||||
# default = "n"
|
||||
#
|
||||
DEBUG_MODE=${DEBUG_MODE:="y"}
|
||||
CANTERA_DEBUG_MODE=1
|
||||
DEBUG_MODE=${DEBUG_MODE:="n"}
|
||||
CANTERA_DEBUG_MODE=0
|
||||
if test "$DEBUG_MODE" = "y" -o "$DEBUG_MODE" = "Y" ; then
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define DEBUG_MODE 1
|
||||
|
||||
@@ -396,10 +396,10 @@ AC_SUBST(sundials_include)
|
||||
#
|
||||
# DEBUG_MODE: Specify that additional code be compiled in
|
||||
# that allows more debug printing where available.
|
||||
# default = "y"
|
||||
# default = "n"
|
||||
#
|
||||
DEBUG_MODE=${DEBUG_MODE:="y"}
|
||||
CANTERA_DEBUG_MODE=1
|
||||
DEBUG_MODE=${DEBUG_MODE:="n"}
|
||||
CANTERA_DEBUG_MODE=0
|
||||
if test "$DEBUG_MODE" = "y" -o "$DEBUG_MODE" = "Y" ; then
|
||||
AC_DEFINE(DEBUG_MODE)
|
||||
CANTERA_DEBUG_MODE="1"
|
||||
|
||||
@@ -6,20 +6,51 @@ using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
int main() {
|
||||
double B;
|
||||
double T;
|
||||
cout << "enter B, T: ";
|
||||
cin >> B >> T;
|
||||
Rotor* r = new Rotor(B);
|
||||
double theta = wnum_to_J(B)/Boltzmann;
|
||||
cout << "theta = " << theta << endl;
|
||||
double pop, cpop = 0.0;
|
||||
for (int j = 0; j < 50; j++) {
|
||||
pop = r->population(j, T);
|
||||
cpop += pop;
|
||||
if (cpop > 0.999) break;
|
||||
cout << j << ", " << r->energy_w(j) << ", "
|
||||
<< r->frequency(j, j+1) << ", "
|
||||
<< pop << ", " << cpop << ", " << r->partitionFunction(T) << ", " << T/theta << endl;
|
||||
// double B;
|
||||
// double T;
|
||||
// cout << "enter B, T: ";
|
||||
// cin >> B >> T;
|
||||
// Rotor* r = new Rotor(B);
|
||||
// double theta = wnum_to_J(B)/Boltzmann;
|
||||
// cout << "theta = " << theta << endl;
|
||||
// double pop, cpop = 0.0;
|
||||
// for (int j = 0; j < 50; j++) {
|
||||
// pop = r->population(j, T);
|
||||
// cpop += pop;
|
||||
// if (cpop > 0.999) break;
|
||||
// cout << j << ", " << r->energy_w(j) << ", "
|
||||
// << r->frequency(j, j+1) << ", "
|
||||
// << pop << ", " << cpop << ", " << r->partitionFunction(T) << ", " << T/theta << endl;
|
||||
// }
|
||||
|
||||
// test line broading classes
|
||||
double gam = 2.0;
|
||||
double sigma = 10.0;
|
||||
|
||||
LineBroadener* lor = new Lorentzian(gam);
|
||||
LineBroadener* gaus = new Gaussian(sigma);
|
||||
LineBroadener* voig = new Voigt(sigma, gam);
|
||||
|
||||
double nu0 = 1000.0;
|
||||
double dnu = 0.2;
|
||||
double nu;
|
||||
double gw = gaus->width();
|
||||
double sum = 0.0, sumg = 0.0, sumlor = 0.0;
|
||||
for (int n = -1000; n < 1000; n++) {
|
||||
//cout << n << endl;
|
||||
nu = n*dnu;
|
||||
sumg += gaus->profile(nu)*dnu;
|
||||
sum += voig->profile(nu)*dnu;
|
||||
sumlor += lor->profile(nu)*dnu;
|
||||
try {
|
||||
cout << nu << ", " << (*lor)(nu) << ", " << (*gaus)(nu)
|
||||
<< ", " << (*voig)(nu) << endl;
|
||||
}
|
||||
catch (CanteraError) {
|
||||
showErrors();
|
||||
}
|
||||
}
|
||||
cout << "Voigt area = " << sum << endl;
|
||||
cout << "Gaussian area = " << sumg << endl;
|
||||
cout << "Lorentzian area = " << sumlor << endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user