192 static double log_G0_face = -1;
230 f1 = 0.15 * log_density + 0.75;
231 f2 = -0.5 * log_density + 10.;
263 k_f4 = -0.25 * log_G0_face + 1.25;
274 f4 =
pow2(k_f4) *
exp10( 2.2211 * log_density - 29.8506);
279 f4 =
pow2(k_f4) *
exp10( 2.2211 * log_density - 29.8506);
282 f3 =
MAX2(0.1, -4.75 * log_density + 24.25);
283 f5 =
MAX2(1.,0.95 * log_density - 1.45) * 0.2 * log_G0_face;
372 enum {DEBUG_LOC=
false};
374 if( DEBUG_LOC && (
nzone>50) )
376 double createsum ,create_from_Hn2 , create_3body_Ho, create_h2p,
377 create_h3p, create_h3pe, create_grains, create_hminus;
378 double destroysum, destroy_hm ,destroy_solomon ,destroy_2h ,destroy_hp,
379 destroy_h,destroy_hp2,destroy_h3p;
389 createsum = create_from_Hn2 + create_3body_Ho + create_h2p +
390 create_h3p + create_h3pe + create_grains + create_hminus;
392 fprintf(
ioQQQ,
"H2 create zone\t%.2f \tsum\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
395 create_hminus / createsum,
396 create_from_Hn2 / createsum,
397 create_3body_Ho / createsum,
398 create_h2p / createsum,
399 create_h3p / createsum,
400 create_h3pe / createsum,
401 create_grains / createsum );
414 destroysum = destroy_hm + destroy_solomon + destroy_2h +
415 destroy_hp+ destroy_h+ destroy_hp2+ destroy_h3p;
417 fprintf(
ioQQQ,
"H2 destroy\t%.3f \t%.2e\tsum\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
420 destroy_hm / destroysum ,
421 destroy_solomon / destroysum ,
422 destroy_2h / destroysum ,
423 destroy_hp / destroysum ,
424 destroy_h / destroysum ,
425 destroy_hp2 / destroysum ,
426 destroy_h3p / destroysum );
434 enum {DEBUG_LOC=
false};
436 if( DEBUG_LOC && (
nzone>140) )
438 double create_from_Ho,create_3body_Ho,create_batach,destroy_photo,
439 destroy_coll_heavies,destroy_coll_electrons,destroy_Hattach,destroy_fhneut,
447 destroy_coll_heavies = 0.;
450 if( !(*atom)->lgHasLinkedIon())
452 long nelem = (*atom)->el->Z-1;
456 sprintf(react,
"H-,%s=>H,%s",
mole_global.
list[(*atom)->ipMl[1]]->label.c_str(),(*atom)->label().c_str() );
460 destroy_coll_electrons =
mole.
findrate(
"H-,e-=>H-,e-,e-");
464 destsum = destroy_photo + destroy_coll_heavies + destroy_coll_electrons +
465 destroy_Hattach + destroy_fhneut;
466 fprintf(
ioQQQ,
"H- destroy zone\t%.2f\tTe\t%.4e\tsum\t%.2e\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\n",
470 destroy_photo/destsum ,
471 destroy_coll_heavies/destsum,
472 destroy_coll_electrons/destsum,
473 destroy_Hattach/destsum,
474 destroy_fhneut/destsum );
476 createsum = create_from_Ho+create_3body_Ho+create_batach;
477 fprintf(
ioQQQ,
"H- create\t%.2f\tTe\t%.4e\tsum\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
482 create_from_Ho/createsum,
483 create_3body_Ho/createsum,
484 create_batach/createsum);
490 enum {DEBUG_LOC=
false};
526 fprintf(
ioQQQ,
" Create H2, rate=%10.2e grain;%5.3f hmin;%5.3f bhedis;%5.3f h2+;%5.3f hmi.radasc:%5.3f hmi.h3ph2p:%5.3f hmi.h3petc:%5.3f\n",
549 fprintf(
ioQQQ,
" Create H2+, rate=%10.2e hmi.rh2h2p;%5.3f b2pcin;%5.3f hmi.h3ph2p;%5.3f hmi.h3petc+;%5.3f\n",
551 mole.
findrate(
"H,H+,e-=>H2+,e-")/rate,
mole.
findrate(
"H,H3+=>H2,H2+")/rate,
mole.
findrate(
"H2,H3+=>H2,H2+,H")/rate );
562 double destroy_coll_heavies = 0.;
566 if( !(*atom)->lgHasLinkedIon())
568 long nelem = (*atom)->el->Z-1;
572 sprintf(react,
"H-,%s=>H,%s",
mole_global.
list[(*atom)->ipMl[1]]->label.c_str(),(*atom)->label().c_str() );
576 fprintf(
ioQQQ,
" MOLE, Dep Coef, H-:%10.2e H2:%10.2e H2+:%10.2e\n",
578 fprintf(
ioQQQ,
" H- creat: Rad atch%10.3e Induc%10.3e bHneut%10.2e 3bod%10.2e b=>H2%10.2e N(H-);%10.2e b(H-);%10.2e\n",
583 fprintf(
ioQQQ,
" H- destr: Photo;%10.3e mut neut%10.2e e- coll ion%10.2e =>H2%10.2e x-ray%10.2e p+H-%10.2e\n",
588 fprintf(
ioQQQ,
" H- heating:%10.3e Ind cooling%10.2e Spon cooling%10.2e\n",
602 " Destroy H2+: rate=%10.2e e-;%5.3f phot;%5.3f hard gam;%5.3f H2col;%5.3f h2phhp;%5.3f pion;%5.3f bh2h2p:%5.3f\n",
604 mole.
findrate(
"H2+,CRPHOT=>H,H+")/rate,
mole.
findrate(
"H2,H2+=>H,H3+")/rate,
mole.
findrate(
"H2+,H2=>H,H+,H2")/rate,
608 " Create H2+: rate=%.2e HII HI;%.3f Col H2;%.3f HII H2;%.3f HI HI;%.3f\n",
625 enum {DEBUG_LOC=
false};
629 fprintf(
ioQQQ,
"mole bugg\t%.3f\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
642 enum {DEBUG_LOC=
false};
644 if( DEBUG_LOC &&
nzone>140 )
646 fprintf(
ioQQQ,
" debuggggrn grn\t%.2f\t%.3e\t%.3e\tfrac\t%.3e\tH-\t%.3e\t%.3e\tfrac\t%.3e\t%.3e\t%.3e\t%.3e\n",
650 mole.
findrate(
"H,H,grn=>H2*,grn")/
SDIV(
mole.
findrate(
"H,H,grn=>H2*,grn")+
mole.
findrate(
"H,H,grn=>H2,grn")),
664 enum {DEBUG_LOC=
false};
666 if( DEBUG_LOC &&
nzone>140)
670 "hmi.assoc_detach_backwards_grnd\t%.2f\t%.5e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\n",
696 " H2 destroy rate=%.2e DIS;%.3f bat;%.3f h2dis;%.3f photoionize_rate;%.3f h2h2p;%.3f E-h;%.3f hmi.h2hph3p;%.3f sec;%.3f\n",
717 enum {DEBUG_LOC=
false};
721 if( DEBUG_LOC && (
nzone > 570) )
740 for (molecule::nNucsMap::iterator atom =
mole_global.
list[i]->nNuclide.begin();
743 long nelem = atom->first->
el->
Z-1;
748 if(
mole.
species[i].xFracLim * densAtom < densAtomInSpecies )
750 mole.
species[i].xFracLim = densAtomInSpecies/densAtom;
double sink_rate_tot(const char chSpecies[]) const
t_mole_global mole_global
double H2_Solomon_dissoc_rate_used_H2g
NORETURN void TotalInsanity(void)
realnum UV_Cont_rel2_Draine_DB96_face
STATIC void mole_h_rate_diagnostics(void)
double H2star_forms_grains
molezone * findspecieslocal(const char buf[])
double source_rate_tot(const char chSpecies[]) const
ChemNuclideList nuclide_list
realnum deriv_HeatH2Dexc_ELWERT
t_iso_sp iso_sp[NISO][LIMELM]
realnum deriv_HeatH2Dexc_TH85
double xIonDense[LIMELM][LIMELM+1]
double H2_Solomon_dissoc_rate_used_H2s
realnum deriv_HeatH2Dexc_BD96
chem_nuclide * null_nuclide
valarray< class molezone > species
count_ptr< chem_nuclide > findnuclide(const char buf[])
STATIC void mole_update_limiting_reactants()
void mole_eval_sources(long int num_total)
STATIC void mole_effects(void)
static const double MOLETOLER
diatomics h2("h2", 4100.,&hmi.H2_total, Yan_H2_CS)
void setHeating(long nelem, long ion, double heating)
realnum gas_phase[LIMELM]
void mole_update_sources(void)
double frac_H2star_hminus()
double findrate(const char buf[]) const
char chH2_small_model_type
realnum deriv_HeatH2Dexc_BHT90
#define DEBUG_ENTRY(funcname)
void mole_update_species_cache(void)
void mole_update_rks(void)
int fprintf(const Output &stream, const char *format,...)
sys_float SDIV(sys_float x)
t_secondaries secondaries
double HMinus_induc_rec_rate
double HMinus_induc_rec_cooling
double H2star_forms_hminus