123 co.CODissHeat = (
realnum)(
mole.findrate(
"PHOTON,CO=>C,O")*1e-12);
131 h2.ortho_density = 0.75*
hmi.H2_total;
132 h2.para_density = 0.25*
hmi.H2_total;
144 hmi.H2_rate_destroy =
mole.sink_rate_tot(
"H2");
150 timesc.time_H2_Dest_here = 1./
hmi.H2_rate_destroy;
154 timesc.time_H2_Dest_here = 0.;
161 timesc.time_H2_Form_here = (
mole.findrate(
"H,H,grn=>H2*,grn")+
mole.findrate(
"H,H,grn=>H2,grn"));
170 timesc.time_H2_Form_here = 0.;
199 hmi.HeatH2Dish_TH85 = 0.25 *
EN1EV *
204 hmi.HeatH2Dexc_TH85 = ((
mole.findrate(
"H2*,H2=>H2,H2") +
mole.findrate(
"H2*,H=>H2,H"))
205 - (
mole.findrate(
"H2,H2=>H2*,H2") +
mole.findrate(
"H2,H=>H2*,H"))) * 4.17e-12;
209 if(
hmi.chH2_small_model_type ==
'H' )
212 hmi.HeatH2Dish_BHT90 = 0.25 *
EN1EV *
217 hmi.HeatH2Dexc_BHT90 = ((
mole.findrate(
"H2*,H2=>H2,H2") +
mole.findrate(
"H2*,H=>H2,H"))
218 - (
mole.findrate(
"H2,H2=>H2*,H2") +
mole.findrate(
"H2,H=>H2*,H"))) * 4.17e-12;
222 else if(
hmi.chH2_small_model_type ==
'B')
225 hmi.HeatH2Dish_BD96 = 0.25 *
EN1EV *
229 hmi.HeatH2Dexc_BD96 = ((
mole.findrate(
"H2*,H2=>H2,H2") +
mole.findrate(
"H2*,H=>H2,H"))
230 - (
mole.findrate(
"H2,H2=>H2*,H2") +
mole.findrate(
"H2,H=>H2*,H"))) * 4.17e-12;
234 else if(
hmi.chH2_small_model_type ==
'E')
243 static double log_G0_face = -1;
251 if(
hmi.UV_Cont_rel2_Draine_DB96_face <= 1.)
255 else if(
hmi.UV_Cont_rel2_Draine_DB96_face >= 1e7)
261 log_G0_face = log10(
hmi.UV_Cont_rel2_Draine_DB96_face);
264 log_G0_face /=
radius.r1r0sq;
281 f1 = 0.15 * log_density + 0.75;
282 f2 = -0.5 * log_density + 10.;
284 hmi.HeatH2Dish_ELWERT = 0.25 *
EN1EV * f1 *
298 if(
hmi.UV_Cont_rel2_Draine_DB96_face <= 1.)
302 else if(
hmi.UV_Cont_rel2_Draine_DB96_face >= 1e7)
308 log_G0_face = log10(
hmi.UV_Cont_rel2_Draine_DB96_face);
311 log_G0_face /=
radius.r1r0sq;
314 k_f4 = -0.25 * log_G0_face + 1.25;
325 f4 =
pow2(k_f4) * pow( 10. , 2.2211 * log_density - 29.8506);
330 f4 =
pow2(k_f4) * pow( 10., 2.2211 * log_density - 29.8506);
333 f3 =
MAX2(0.1, -4.75 * log_density + 24.25);
334 f5 =
MAX2(1.,0.95 * log_density - 1.45) * 0.2 * log_G0_face;
336 hmi.HeatH2Dexc_ELWERT = ((
mole.findrate(
"H2*,H2=>H2,H2") +
mole.findrate(
"H2*,H=>H2,H"))
337 - (
mole.findrate(
"H2,H2=>H2*,H2") +
mole.findrate(
"H2,H=>H2*,H"))) * 4.17e-12 * f3 +
401 if(
hmi.rel_pop_LTE_H3p > 0. )
428 enum {DEBUG_LOC=
false};
430 if( DEBUG_LOC && (
nzone>50) )
432 double createsum ,create_from_Hn2 , create_3body_Ho, create_h2p,
433 create_h3p, create_h3pe, create_grains, create_hminus;
434 double destroysum, destroy_hm ,destroy_solomon ,destroy_2h ,destroy_hp,
435 destroy_h,destroy_hp2,destroy_h3p;
437 create_from_Hn2 =
mole.findrate(
"H,H=>H2");
438 create_3body_Ho =
mole.findrate(
"H,H,H=>H2,H");
439 create_h2p =
mole.findrate(
"H,H2+=>H+,H2*");
440 create_h3p =
mole.findrate(
"H,H3+=>H2,H2+");
441 create_h3pe =
mole.findrate(
"e-,H3+=>H2,H");
442 create_grains =
mole.findrate(
"H,H,grn=>H2*,grn")+
mole.findrate(
"H,H,grn=>H2,grn");
443 create_hminus = (
mole.findrate(
"H,H-=>H2,e-")+
mole.findrate(
"H,H-=>H2*,e-"));
445 createsum = create_from_Hn2 + create_3body_Ho + create_h2p +
446 create_h3p + create_h3pe + create_grains + create_hminus;
448 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",
451 create_hminus / createsum,
452 create_from_Hn2 / createsum,
453 create_3body_Ho / createsum,
454 create_h2p / createsum,
455 create_h3p / createsum,
456 create_h3pe / createsum,
457 create_grains / createsum );
462 destroy_hm = (
mole.findrate(
"H2,e-=>H,H-")+
mole.findrate(
"H2*,e-=>H,H-"));
465 destroy_2h = (
mole.findrate(
"H2,e-=>H,H,e-")+
mole.findrate(
"H2*,e-=>H,H,e-"));
466 destroy_hp =
mole.findrate(
"H2,H+=>H3+");
467 destroy_h =
mole.findrate(
"H,H2=>H,H,H");
468 destroy_hp2 =
mole.findrate(
"H2,H+=>H2+,H");
469 destroy_h3p =
mole.findrate(
"H2,H3+=>H2,H2+,H");
470 destroysum = destroy_hm + destroy_solomon + destroy_2h +
471 destroy_hp+ destroy_h+ destroy_hp2+ destroy_h3p;
473 fprintf(
ioQQQ,
"H2 destroy\t%.3f \t%.2e\tsum\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
476 destroy_hm / destroysum ,
477 destroy_solomon / destroysum ,
478 destroy_2h / destroysum ,
479 destroy_hp / destroysum ,
480 destroy_h / destroysum ,
481 destroy_hp2 / destroysum ,
482 destroy_h3p / destroysum );
490 enum {DEBUG_LOC=
false};
492 if( DEBUG_LOC && (
nzone>140) )
494 double create_from_Ho,create_3body_Ho,create_batach,destroy_photo,
495 destroy_coll_heavies,destroy_coll_electrons,destroy_Hattach,destroy_fhneut,
498 create_from_Ho =
mole.findrate(
"H,e-=>H-,PHOTON");
499 create_3body_Ho =
mole.findrate(
"H,e-,e-=>H-,e-");
501 create_batach = (
mole.findrate(
"H2,e-=>H,H-") +
mole.findrate(
"H2*,e-=>H,H-"));
502 destroy_photo =
mole.findrate(
"H-,PHOTON=>H,e-");
503 destroy_coll_heavies = 0.;
507 if (
dense.lgElmtOn[i])
510 destroy_coll_heavies +=
mole.findrate(react);
513 destroy_coll_electrons =
mole.findrate(
"H-,e-=>H-,e-,e-");
514 destroy_Hattach = (
mole.findrate(
"H,H-=>H2,e-")+
mole.findrate(
"H,H-=>H2*,e-"));
515 destroy_fhneut =
mole.findrate(
"H-,H+=>H,H");
517 destsum = destroy_photo + destroy_coll_heavies + destroy_coll_electrons +
518 destroy_Hattach + destroy_fhneut;
519 fprintf(
ioQQQ,
"H- destroy zone\t%.2f\tTe\t%.4e\tsum\t%.2e\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\n",
523 destroy_photo/destsum ,
524 destroy_coll_heavies/destsum,
525 destroy_coll_electrons/destsum,
526 destroy_Hattach/destsum,
527 destroy_fhneut/destsum );
529 createsum = create_from_Ho+create_3body_Ho+create_batach;
530 fprintf(
ioQQQ,
"H- create\t%.2f\tTe\t%.4e\tsum\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
535 create_from_Ho/createsum,
536 create_3body_Ho/createsum,
537 create_batach/createsum);
543 enum {DEBUG_LOC=
false};
553 fprintf(
ioQQQ,
" \n" );
560 fprintf(
ioQQQ,
" raw; " );
565 fprintf(
ioQQQ,
" \n" );
575 double H2_rate_create =
mole.source_rate_tot(
"H2") +
mole.source_rate_tot(
"H2*");
579 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",
581 (
mole.findrate(
"H,H,grn=>H2*,grn")+
mole.findrate(
"H,H,grn=>H2,grn"))/H2_rate_create,
582 (
mole.findrate(
"H,H-=>H2,e-")+
mole.findrate(
"H,H-=>H2*,e-"))/H2_rate_create,
583 mole.findrate(
"H,H,H=>H2,H")/H2_rate_create,
584 mole.findrate(
"H,H2+=>H+,H2*")/H2_rate_create,
585 mole.findrate(
"H,H=>H2")/H2_rate_create,
586 mole.findrate(
"H,H3+=>H2,H2+")/H2_rate_create,
587 mole.findrate(
"H2,H3+=>H2,H2+,H")/H2_rate_create );
591 fprintf(
ioQQQ,
" Create H2, rate=0\n" );
598 rate =
mole.findrate(
"H2,H+=>H2+,H") +
mole.findrate(
"H,H+,e-=>H2+,e-") +
599 mole.findrate(
"H,H3+=>H2,H2+") +
mole.findrate(
"H2,H3+=>H2,H2+,H");
602 fprintf(
ioQQQ,
" Create H2+, rate=%10.2e hmi.rh2h2p;%5.3f b2pcin;%5.3f hmi.h3ph2p;%5.3f hmi.h3petc+;%5.3f\n",
603 rate,
mole.findrate(
"H2,H+=>H2+,H")/rate,
604 mole.findrate(
"H,H+,e-=>H2+,e-")/rate,
mole.findrate(
"H,H3+=>H2,H2+")/rate,
mole.findrate(
"H2,H3+=>H2,H2+,H")/rate );
608 fprintf(
ioQQQ,
" Create H2+, rate=0\n" );
615 double destroy_coll_heavies = 0.;
620 if (
dense.lgElmtOn[i])
623 destroy_coll_heavies +=
mole.findrate(react);
626 fprintf(
ioQQQ,
" MOLE, Dep Coef, H-:%10.2e H2:%10.2e H2+:%10.2e\n",
628 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",
630 mole.findrate(
"H,e-,e-=>H-,e-"),
633 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",
634 mole.findrate(
"H-,PHOTON=>H,e-"), destroy_coll_heavies,
635 mole.findrate(
"H-,e-=>H-,e-,e-"),
637 mole.findrate(
"H-,H+=>H,H") );
638 fprintf(
ioQQQ,
" H- heating:%10.3e Ind cooling%10.2e Spon cooling%10.2e\n",
639 hmi.hmihet,
hmi.HMinus_induc_rec_cooling,
hmi.hmicol );
652 " 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",
653 rate,
mole.findrate(
"H2+,e-=>H,H+,e-")/rate,
mole.findrate(
"H2+,PHOTON=>H,H+")/rate,
654 mole.findrate(
"H2+,CRPHOT=>H,H+")/rate,
mole.findrate(
"H2,H2+=>H,H3+")/rate,
mole.findrate(
"H2+,H2=>H,H+,H2")/rate,
655 mole.findrate(
"H2+,H+=>H,H+,H+")/rate,
mole.findrate(
"H,H2+=>H+,H2*")/rate );
658 " Create H2+: rate=%.2e HII HI;%.3f Col H2;%.3f HII H2;%.3f HI HI;%.3f\n",
660 mole.findrate(
"H+,H=>H2+,PHOTON")/rate,
661 mole.findrate(
"H2,CRPHOT=>H2+,e-")/rate,
662 mole.findrate(
"H2,H+=>H2+,H")/rate,
663 mole.findrate(
"H,H+,e-=>H2+,e-")/rate );
667 fprintf(
ioQQQ,
" Create H2+: rate= is zero\n" );
675 enum {DEBUG_LOC=
false};
679 fprintf(
ioQQQ,
"mole bugg\t%.3f\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
682 hmi.HMinus_photo_rate,
692 enum {DEBUG_LOC=
false};
694 if( DEBUG_LOC &&
nzone>140 )
696 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",
698 mole.findrate(
"H,H,grn=>H2*,grn")+
mole.findrate(
"H,H,grn=>H2,grn") ,
699 hmi.H2_forms_grains+
hmi.H2star_forms_grains ,
700 mole.findrate(
"H,H,grn=>H2*,grn")/
SDIV(
mole.findrate(
"H,H,grn=>H2*,grn")+
mole.findrate(
"H,H,grn=>H2,grn")),
701 (
mole.findrate(
"H,H-=>H2,e-")+
mole.findrate(
"H,H-=>H2*,e-")),
702 hmi.H2star_forms_hminus+
hmi.H2_forms_hminus,
714 enum {DEBUG_LOC=
false};
716 if( DEBUG_LOC &&
nzone>140)
720 "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",
725 (
mole.findrate(
"H,H-=>H2,e-")+
mole.findrate(
"H,H-=>H2*,e-")),
726 mole.findrate(
"H2,e-=>H,H-"),
727 mole.findrate(
"H2*,e-=>H,H-"),
728 mole.findrate(
"H,e-=>H-,PHOTON"),
734 hmi.rel_pop_LTE_Hmin,
746 " H2 destroy rate=%.2e DIS;%.3f bat;%.3f h2dis;%.3f photoionize_rate;%.3f h2h2p;%.3f E-h;%.3f hmi.h2hph3p;%.3f sec;%.3f\n",
748 hmi.H2_Solomon_dissoc_rate_used_H2g /
hmi.H2_rate_destroy,
749 mole.findrate(
"H2,e-=>H,H-") / (
hmi.H2_total*
hmi.H2_rate_destroy),
750 mole.findrate(
"H,H2=>H,H,H") / (
hmi.H2_total*
hmi.H2_rate_destroy),
751 h2.photoionize_rate /
hmi.H2_rate_destroy,
752 mole.findrate(
"H2,H+=>H2+,H") / (
hmi.H2_total*
hmi.H2_rate_destroy),
753 (
mole.findrate(
"H2,e-=>H,H,e-")+
mole.findrate(
"H2*,e-=>H,H,e-")) / (
hmi.H2_total*
hmi.H2_rate_destroy),
754 mole.findrate(
"H2,H+=>H3+") / (
hmi.H2_total*
hmi.H2_rate_destroy) ,
760 fprintf(
ioQQQ,
" Destroy H2: rate=0\n" );
767 enum {DEBUG_LOC=
false};
771 if( DEBUG_LOC && (
nzone > 570) )
788 mole.species[i].xFracLim = 0.;
789 mole.species[i].nAtomLim = -1;
790 for (molecule::nAtomsMap::iterator atom =
mole_global.list[i]->nAtom.begin();
793 long nelem = atom->first->el->Z-1;
794 if(
dense.lgElmtOn[nelem])
796 realnum dens_elemsp = (
realnum)(
mole.species[i].den * atom->second * atom->first->frac );
797 if (
mole.species[i].xFracLim*
dense.gas_phase[nelem] < dens_elemsp )
799 mole.species[i].xFracLim = dens_elemsp/
dense.gas_phase[nelem];
800 mole.species[i].nAtomLim = nelem;