*** empty log message ***

This commit is contained in:
Dave Goodwin
2007-12-24 16:01:51 +00:00
parent 2cc7c139b6
commit 7a72431eb9
3 changed files with 52 additions and 21 deletions

6
configure vendored
View File

@@ -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

View File

@@ -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"

View File

@@ -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;
}