50 if( (*Hi).n() < 1 )
continue;
55 double rate_up_cont = (*(*tr).Lo()).Pop() * (*tr).Emis().pump() * factor;
58 double elec_decay = (*(*tr).Hi()).Pop() * (*tr).Emis().Aul() *
59 ((*tr).Emis().Ploss());
116 double ground_to_star_rate = 0.;
122 for(
long iVibHi=0; iVibHi<=
nVib_hi[iElecHi]; ++iVibHi )
124 for(
long iRotHi=
Jlowest[iElecHi]; iRotHi<=
nRot_hi[iElecHi][iVibHi]; ++iRotHi )
136 decay_star -= em.
Aul() * ( em.
Ploss() );
151 double rate_up_cont =
154 ground_to_star_rate += rate_up_cont*decay_star;
164 return ground_to_star_rate;
197 double pop =
H2_populations_LTE[ (*st).n() ][ (*st).v() ][ (*st).J() ] * (*dense_total);
206 (*tr).Emis().PopOpc() = (*(*tr).Lo()).Pop() - (*(*tr).Hi()).Pop() * (*(*tr).Lo()).g() / (*(*tr).Hi()).g();
209 (*tr).Coll().cool() = 0.;
210 (*tr).Coll().heat() = 0.;
213 (*tr).Emis().xIntensity() = 0.;
214 (*tr).Emis().xObsIntensity() = 0.;
215 (*tr).Emis().ots() = 0.;
236 double part_fun = 0.;
242 (*st).Boltzmann() = bfac;
246 part_fun += bfac * (*st).g();
252 long iElec = (*st).n();
253 long iVib = (*st).v();
254 long iRot = (*st).J();
258 (*st).Boltzmann() * (*st).g() / part_fun;
262 "mole_H2_LTE set H2_Boltzmann factors, T=%.2f, partition function is %.2f\n",
267 enum { DEBUG_LOC =
false };
270 double total_density = 0.;
280 enum { DEBUG_LOC =
false };
283 printf(
"# part_fun = %10e\n", part_fun );
286 printf(
"%5ld\t%5ld\t%5ld\t%10f\t%10e\t%10e\t%10e\n",
287 (*st).n(), (*st).v(), (*st).J(),
289 (*st).energy().K(), (*st).Boltzmann(),
309 "\n***************H2_Reset called, resetting nCall_this_iteration, zone %.2f iteration %li\n",
368 double xsqrt , x15 ,
x2;
369 double energy = energy_ryd * EVRYD;
375 energy_keV = energy/1000.0;
385 else if(energy >= 15.4 && energy < 18.)
387 cross_section = 1e7 * (1 - 197.448/xsqrt + 438.823/x - 260.481/x15 + 17.915/
x2);
389 cross_section =
MAX2( 0. , cross_section );
392 else if(energy >= 18. && energy <= 30.)
394 cross_section = (-145.528 +351.394*xsqrt - 274.294*x + 74.320*x15)/
powpq(energy_keV,7,2);
397 else if(energy > 30. && energy <= 85.)
399 cross_section = (65.304 - 91.762*xsqrt + 51.778*x - 9.364*x15)/
powpq(energy_keV,7,2);
405 cross_section = 45.57*(1 - 2.003/xsqrt - 4.806/x + 50.577/x15 - 171.044/x2 + 231.608/(xsqrt*
x2) - 81.885/(x*x2))/
powpq(energy_keV,7,2);
408 return( cross_section * 1e-24 );
413 DEBUG_ENTRY(
"diatomics::CalcPhotoionizationRate()" );
452 double h2_lte_cooling = 0.;
464 h2_lte_cooling += (*tr).Emis().Aul() * (*tr).EnergyErg() *
469 enum { DEBUG_LOC =
false };
480 printf(
"%2ld %2ld %2ld\t %2ld %2ld %2ld\t %10e\t %10e\t %10e\t %10e\n",
481 (*Hi).n(), (*Hi).v(), (*Hi).J(),
482 (*Lo).n(), (*Lo).v(), (*Lo).J(),
495 return h2_lte_cooling;
multi_arr< realnum, 3 > H2_dissprob
const double ENERGY_H2_STAR
double GammaK(long int ipLoEnr, long int ipHiEnr, long int ipOpac, double yield1, t_phoHeat *photoHeat)
double ** CompRecoilIonRate
long ip_photo_opac_thresh
vector< double > LTE_cool
bool lgLeiden_Keep_ipMH2s
multi_arr< double, 2 > pops_per_vib
long OpacityCreate(double *stack)
bool fp_equal_tol(sys_float x, sys_float y, sys_float tol)
vector< double > LTE_Temp
double anu(size_t i) const
double Yan_H2_CS(double energy_ryd)
double Solomon_dissoc_rate_g
const double *const dense_total
long int nflux_with_check
long int iteration_evaluated
multi_arr< long int, 3 > ipEnergySort
multi_arr< double, 3 > H2_old_populations
double LTE_Cooling_per_H2()
double GetExcitedElecDensity(void)
bool fp_equal(sys_float x, sys_float y, int n=3)
double photodissoc_BigH2_H2s
double energy(const genericState &gs)
multi_arr< double, 3 > H2_populations_LTE
long int nCall_this_iteration
double photodissoc_BigH2_H2g
multi_arr< bool, 2 > lgH2_radiative
char species[CHARS_SPECIES]
double(* photoion_opacity_fun)(double energy)
long ip_photo_opac_offset
multi_arr< realnum, 6 > H2_SaveLine
multi_arr< double, 3 > H2_rad_rate_out
void H2_Solomon_rate(void)
void H2_zero_pops_too_low(void)
#define DEBUG_ENTRY(funcname)
double powpq(double x, int p, int q)
double Solomon_dissoc_rate_s
multi_arr< long int, 2 > ipTransitionSort
double Solomon_elec_decay_g
STATIC double cross_section(double EgammaRyd, double EthRyd, long nelem, long n, long l, long s)
TransitionList::iterator rad_end
int fprintf(const Output &stream, const char *format,...)
valarray< long > nRot_hi[N_ELEC]
double pops_per_elec[N_ELEC]
double Solomon_elec_decay_s
sys_float SDIV(sys_float x)
long int nzone_nlevel_set
void CalcPhotoionizationRate(void)
double interpolate_LTE_Cooling(double Temp)