14 DEBUG_ENTRY(
"diatomics::Read_Mol_Diss_cross_sections()" );
23 const int ipNUM_FILES = 1;
25 char chFileNames[ipNUM_FILES][17] =
37 for(
int iVibLo=0; iVibLo<=
nVib_hi[iElecLo]; ++iVibLo )
46 strcpy( chDirectory,
"h2\\" );
48 strcpy( chDirectory,
"h2/" );
52 strcpy( chPath, chDirectory );
53 strcat( chPath, chFileNames[0] );
59 while(
read_whole_line( chLine , (
int)
sizeof(chLine) , ioDATA ) != NULL )
61 static bool skipData =
false;
62 long ini=0, inf, iv, ij;
66 if(
sizeof(chLine) >= 2 && chLine[0] ==
'#' && chLine[1] ==
'!' && chLine[4] ==
'n' && chLine[5] ==
'e' )
68 sscanf(chLine,
"#! nei=%li, nef=%li, vi= %li, ji= %li",&ini, &inf, &iv, &ij);
70 if( ini > n_elec_states )
74 else if( ij >
nRot_hi[ini][iv] )
94 const double AngSquared = 1e-16;
95 sscanf(chLine,
"%lf,%lf",&energy, &xsection);
98 Diss_Trans.back().energies.push_back( energy*WAVNRYD );
101 Diss_Trans.back().xsections.push_back( xsection*AngSquared );
122 double photodiss_cs = 0.;
129 else if(Mol_Ene > tran.
energies.back())
147 DEBUG_ENTRY(
"diatomics::Mol_Photo_Diss_Rates()" );
160 for( vector< diss_tran >::const_iterator dt =
Diss_Trans.begin(); dt !=
Diss_Trans.end(); ++dt )
162 double rate = (*this).GetDissociationRate( *dt );
164 Cont_Dissoc_Rate[dt->initial.n][dt->initial.v][dt->initial.j] += dt->rate_coeff;
197 for(
long i = index_min; i <= index_max; ++i)
234 double Cont_Dissoc_Heat_Rate = 0.0;
235 for( vector< diss_tran >::const_iterator dt =
Diss_Trans.begin(); dt !=
Diss_Trans.end(); ++dt )
236 Cont_Dissoc_Heat_Rate += (*this).GetHeatRate( *dt );
238 return Cont_Dissoc_Heat_Rate;
254 for(
long i = index_min; i<= index_max; ++i )
269 rate += EN1RYD * energy * Rate_Coeff *
density;
t_mole_global mole_global
FILE * open_data(const char *fname, const char *mode, access_scheme scheme)
const double ENERGY_H2_STAR
const int FILENAME_PATH_LENGTH_2
bool lgLeiden_Keep_ipMH2s
double Cont_Dissoc_Rate_H2g
double anu(size_t i) const
vector< diss_tran > Diss_Trans
multi_arr< double, 3 > Cont_Dissoc_Rate
multi_arr< long int, 3 > ipEnergySort
long ipoint(double energy_ryd)
vector< double > energies
double energy(const genericState &gs)
void Mol_Photo_Diss_Rates(void)
double MolDissocOpacity(const diss_tran &tran, const double &Mol_Ene)
double powi(double, long int)
void Read_Mol_Diss_cross_sections(void)
double GetHeatRate(const diss_tran &tran)
double density(const genericState &gs)
void reserve(size_type i1)
#define DEBUG_ENTRY(funcname)
double Cont_Dissoc_Rate_H2s
double linint(const double x[], const double y[], long n, double xval)
STATIC double cross_section(double EgammaRyd, double EthRyd, long nelem, long n, long l, long s)
valarray< long > nRot_hi[N_ELEC]
sys_float SDIV(sys_float x)
STATIC void GetDissociationRateCoeff(diss_tran &tran)
char * read_whole_line(char *chLine, int nChar, FILE *ioIN)
double MolDissocCrossSection(const diss_tran &tran, const double &Mol_Ene)
double GetDissociationRate(const diss_tran &tran)
vector< double > xsections
double Cont_Diss_Heat_Rate(void)