00001
00002
00003
00004
00005
00006 #include "cddefines.h"
00007 #include "physconst.h"
00008 #include "iso.h"
00009 #include "grainvar.h"
00010 #include "pressure.h"
00011 #include "wind.h"
00012 #include "conv.h"
00013 #include "trace.h"
00014 #include "helike.h"
00015 #include "magnetic.h"
00016 #include "dense.h"
00017 #include "called.h"
00018 #include "dynamics.h"
00019 #include "h2.h"
00020 #include "mole.h"
00021 #include "secondaries.h"
00022 #include "opacity.h"
00023 #include "colden.h"
00024 #include "geometry.h"
00025 #include "hmi.h"
00026 #include "rfield.h"
00027 #include "thermal.h"
00028 #include "radius.h"
00029 #include "phycon.h"
00030 #include "abund.h"
00031 #include "hydrogenic.h"
00032 #include "ionbal.h"
00033 #include "elementnames.h"
00034 #include "atomfeii.h"
00035 #include "prt.h"
00036
00037 static void prt_H_like_Pops( long nelem );
00038
00039
00040 static void prt_H_like_DeparCoef( long nelem );
00041
00042 void PrtZone(void)
00043 {
00044 char chField7[8];
00045 char chLet,
00046 chQHMark;
00047 long int i,
00048 ishift,
00049 nelem ,
00050 nd,
00051 mol;
00052 double cdif,
00053 coninc,
00054 con_density,
00055 fac,
00056 hatmic;
00057
00058 DEBUG_ENTRY( "PrtZone()" );
00059
00060 if( thermal.lgUnstable )
00061 {
00062 chLet = 'u';
00063 }
00064 else
00065 {
00066 chLet = ' ';
00067 }
00068
00069
00070
00071
00072
00073
00074
00075 if( called.lgTalk || trace.nTrConvg )
00076 {
00077
00078 if( nzone <= 999 )
00079 {
00080 sprintf( chField7, "####%3ld", nzone );
00081 }
00082 else
00083 {
00084 sprintf( chField7, "###%4ld", nzone );
00085 }
00086
00087 fprintf(ioQQQ, " %7.7s %cTe:",chField7, chLet);
00088 PrintE93(ioQQQ,phycon.te);
00089 fprintf(ioQQQ," Hden:");
00090 PrintE93(ioQQQ,dense.gas_phase[ipHYDROGEN]);
00091 fprintf(ioQQQ," Ne:");
00092 PrintE93(ioQQQ,dense.eden);
00093 fprintf(ioQQQ," R:");
00094 PrintE93(ioQQQ,radius.Radius_mid_zone );
00095 fprintf(ioQQQ," R-R0:");
00096 PrintE93(ioQQQ,radius.depth_mid_zone);
00097 fprintf(ioQQQ," dR:");
00098 PrintE93(ioQQQ,radius.drad);
00099 fprintf(ioQQQ," NTR:%3ld Htot:",conv.nPres2Ioniz);
00100 PrintE93(ioQQQ,thermal.htot);
00101 fprintf(ioQQQ," T912:");
00102 fprintf(ioQQQ,PrintEfmt("%9.2e",opac.TauAbsGeo[0][iso.ipIsoLevNIonCon[ipH_LIKE][ipHYDROGEN][ipH1s]-1] ));
00103 fprintf(ioQQQ,"###\n");
00104
00105 if( trace.nTrConvg )
00106 {
00107 fprintf( ioQQQ, " H:%.2e %.2e 2H2/H: %.2e He: %.2e %.2e %.2e\n",
00108 dense.xIonDense[ipHYDROGEN][0]/dense.gas_phase[ipHYDROGEN],
00109 dense.xIonDense[ipHYDROGEN][1]/dense.gas_phase[ipHYDROGEN],
00110 2.*hmi.H2_total/dense.gas_phase[ipHYDROGEN],
00111 dense.xIonDense[ipHELIUM][0]/SDIV(dense.gas_phase[ipHELIUM]),
00112 dense.xIonDense[ipHELIUM][1]/SDIV(dense.gas_phase[ipHELIUM]),
00113 dense.xIonDense[ipHELIUM][2]/SDIV(dense.gas_phase[ipHELIUM])
00114 );
00115 }
00116 }
00117
00118
00119 if( !called.lgTalk || trace.nTrConvg )
00120 {
00121 DEBUG_EXIT( "PrtZone()" );
00122 return;
00123 }
00124
00125
00126
00127 if( !dense.lgDenFlucOn || abund.lgAbTaON )
00128 {
00129 fprintf( ioQQQ, " Abun:" );
00130 for( i=0; i < LIMELM; i++ )
00131 {
00132 fprintf( ioQQQ,PrintEfmt("%8.1e", dense.gas_phase[i] ));
00133 }
00134 fprintf( ioQQQ, "\n" );
00135 }
00136
00137
00138
00139 fac = wind.windv*dense.gas_phase[ipHYDROGEN]*radius.r1r0sq;
00140 if( wind.windv != 0. )
00141 {
00142 if( wind.AccelTot == 0. )
00143 {
00144 fac = 1.;
00145 }
00146 else
00147 {
00148 fac = wind.AccelTot;
00149 }
00150 fprintf( ioQQQ, " WIND; V:");
00151 fprintf(ioQQQ,PrintEfmt("%10.3e",wind.windv/1e5));
00152 fprintf( ioQQQ, "km/s G:");
00153 fprintf(ioQQQ,PrintEfmt("%9.2e",-wind.agrav));
00154 fprintf( ioQQQ, " Accel:");
00155 fprintf(ioQQQ,PrintEfmt("%9.2e",wind.AccelTot));
00156 fprintf( ioQQQ, " Fr(cont):%6.3f Fr(line):%6.3f Fr(dP):%6.3f\n",
00157 wind.AccelCont/ fac, wind.AccelLine/fac, wind.AccelPres/fac );
00158
00159
00160 if( pressure.pbeta > .05 )
00161 PrtLinePres();
00162
00163
00164 if( dynamics.lgAdvection )
00165 DynaPrtZone();
00166 }
00167
00168
00169
00170 hatmic = 0.;
00171 for(mol = 0; mol < N_H_MOLEC; mol++) {
00172 hatmic += hmi.Hmolec[mol]*hmi.nProton[mol];
00173 }
00174 ASSERT(hatmic > 0.);
00175 hatmic = (dense.xIonDense[ipHYDROGEN][0] + dense.xIonDense[ipHYDROGEN][1])/hatmic;
00176
00177 fprintf( ioQQQ, " Hydrogen ");
00178 fprintf(ioQQQ,PrintEfmt("%9.2e",dense.xIonDense[ipHYDROGEN][0]/dense.gas_phase[ipHYDROGEN]));
00179 fprintf(ioQQQ,PrintEfmt("%9.2e",dense.xIonDense[ipHYDROGEN][1]/dense.gas_phase[ipHYDROGEN]));
00180 fprintf( ioQQQ, " H+o/Hden");
00181 fprintf(ioQQQ,PrintEfmt("%9.2e",hatmic ));
00182 fprintf(ioQQQ,PrintEfmt("%9.2e",hmi.Hmolec[ipMHm]/dense.gas_phase[ipHYDROGEN] ));
00183 fprintf( ioQQQ, " H- H2");
00184
00185 fprintf(ioQQQ,PrintEfmt("%9.2e",hmi.H2_total/dense.gas_phase[ipHYDROGEN]));
00186 fprintf(ioQQQ,PrintEfmt("%9.2e",hmi.Hmolec[ipMH2p]/dense.gas_phase[ipHYDROGEN]));
00187 fprintf( ioQQQ, " H2+ HeH+");
00188 fprintf(ioQQQ,PrintEfmt("%9.2e",hmi.Hmolec[ipMHeHp]/dense.gas_phase[ipHYDROGEN]));
00189 fprintf( ioQQQ, " Ho+ ColD");
00190 fprintf(ioQQQ,PrintEfmt("%9.2e",colden.colden[ipCOL_H0]));
00191 fprintf(ioQQQ,PrintEfmt("%9.2e",colden.colden[ipCOL_Hp]));
00192 fprintf( ioQQQ, "\n");
00193
00194
00195 if( iso.lgPrtDepartCoef[ipH_LIKE][ipHYDROGEN] )
00196 {
00197 fprintf( ioQQQ, " Hydrogen " );
00198 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.DepartCoef[ipH_LIKE][ipHYDROGEN][ipH1s]));
00199 fprintf(ioQQQ,PrintEfmt("%9.2e", 1.));
00200 fprintf( ioQQQ, " H+o/Hden");
00201 fprintf(ioQQQ,PrintEfmt("%9.2e", (dense.xIonDense[ipHYDROGEN][0] + dense.xIonDense[ipHYDROGEN][1])/dense.gas_phase[ipHYDROGEN]));
00202 fprintf(ioQQQ,PrintEfmt("%9.2e", hmi.hmidep));
00203 fprintf( ioQQQ, " H- H2");
00204 fprintf(ioQQQ,PrintEfmt("%9.2e", hmi.h2dep));
00205 fprintf( ioQQQ, " H2+");
00206 fprintf(ioQQQ,PrintEfmt("%9.2e", hmi.h2pdep));
00207 fprintf( ioQQQ, " H3+");
00208 fprintf(ioQQQ,PrintEfmt("%9.2e",hmi.h3pdep));
00209 fprintf( ioQQQ, "\n" );
00210 }
00211
00212 if( prt.lgPrintHeating )
00213 {
00214 fprintf( ioQQQ, " ");
00215 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[0][0]/thermal.htot));
00216 fprintf( ioQQQ," ");
00217 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[0][15]/thermal.htot));
00218 fprintf( ioQQQ," ");
00219 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[0][16]/thermal.htot));
00220 fprintf( ioQQQ,"\n");
00221 }
00222
00223
00224 coninc = 0.;
00225 cdif = 0.;
00226 for( i=0; i < rfield.nflux; i++ )
00227 {
00228
00229 coninc += rfield.flux[i]*(rfield.anu[i]*EN1RYD);
00230 cdif += (rfield.outlin[i] + rfield.outlin_noplot[i] +
00231 rfield.ConInterOut[i])* (rfield.anu[i]*EN1RYD);
00232 }
00233
00234 coninc = pow(coninc/SPEEDLIGHT/7.56464e-15,0.25);
00235 cdif = pow(cdif/SPEEDLIGHT/7.56464e-15,0.25);
00236
00237
00238 con_density = (coninc + cdif) / SPEEDLIGHT;
00239 con_density /= BOLTZMANN;
00240
00241
00242 for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
00243 {
00244 if( dense.lgElmtOn[nelem] )
00245 {
00246 if( iso.lgPrtLevelPops[ipH_LIKE][nelem] )
00247 {
00248 prt_H_like_Pops(nelem);
00249 }
00250
00251 if( iso.lgPrtDepartCoef[ipH_LIKE][nelem] )
00252 {
00253 prt_H_like_DeparCoef(nelem);
00254 }
00255 }
00256 }
00257
00258 if( prt.lgPrintHeating )
00259 {
00260 fprintf( ioQQQ, " ");
00261 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[0][1]/thermal.htot ));
00262 fprintf( ioQQQ, " ");
00263 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00264 fprintf( ioQQQ, " BoundCom");
00265 fprintf(ioQQQ,PrintEfmt("%9.2e", ionbal.CompRecoilHeatLocal/ thermal.htot));
00266 fprintf( ioQQQ, " Extra:");
00267 fprintf(ioQQQ,PrintEfmt("%9.2e",thermal.heating[0][20]/thermal.htot));
00268 fprintf( ioQQQ, " Pairs:");
00269 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[0][21]/ thermal.htot ));
00270 fprintf( ioQQQ," H-lines\n");
00271 }
00272
00273
00274 if( dense.lgElmtOn[ipHELIUM] )
00275 {
00276 fprintf( ioQQQ, " Helium " );
00277 for( i=0; i < 3; i++ )
00278 {
00279 fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[ipHELIUM][i]/dense.gas_phase[ipHELIUM]) );
00280 }
00281
00282 fprintf( ioQQQ, " He I2SP3");
00283 fprintf(ioQQQ,PrintEfmt("%9.2e",
00284 iso.Pop2Ion[ipHE_LIKE][ipHELIUM][ipHe2s3S]*dense.xIonDense[ipHELIUM][1]/dense.gas_phase[ipHELIUM] ));
00285 fprintf( ioQQQ, " Comp H,C");
00286 fprintf(ioQQQ,PrintEfmt("%9.2e", rfield.cmheat ));
00287 fprintf(ioQQQ,PrintEfmt("%9.2e", rfield.cmcool*phycon.te));
00288 fprintf( ioQQQ , " Fill Fac");
00289 fprintf(ioQQQ,PrintEfmt("%9.2e", geometry.FillFac));
00290 fprintf( ioQQQ , " Gam1/tot");
00291 fprintf(ioQQQ,PrintEfmt("%9.2e", hydro.H_ion_frac_photo));
00292 fprintf( ioQQQ, "\n");
00293
00294
00295 if( iso.lgPrtDepartCoef[ipH_LIKE][ipHELIUM] )
00296 {
00297 fprintf( ioQQQ, " Helium " );
00298 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.DepartCoef[ipHE_LIKE][ipHELIUM][0]));
00299 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.DepartCoef[ipH_LIKE][ipHELIUM][ipH1s]));
00300 fprintf(ioQQQ,PrintEfmt("%9.2e", 1.));
00301
00302 fprintf( ioQQQ, " Comp H,C");
00303 fprintf(ioQQQ,PrintEfmt("%9.2e", rfield.cmheat ));
00304 fprintf(ioQQQ,PrintEfmt("%9.2e", rfield.cmcool*phycon.te ));
00305 fprintf( ioQQQ , " Fill Fac");
00306 fprintf(ioQQQ,PrintEfmt("%9.2e", geometry.FillFac ));
00307 fprintf( ioQQQ , " Gam1/tot");
00308 fprintf(ioQQQ,PrintEfmt("%9.2e", hydro.H_ion_frac_photo));
00309 fprintf( ioQQQ, "\n");
00310 }
00311
00312
00313
00314
00315 if( prt.lgPrintHeating )
00316 {
00317
00318
00319
00320
00321
00322 fprintf( ioQQQ, " ");
00323 fprintf(ioQQQ,PrintEfmt("%9.2e",thermal.heating[1][0]/thermal.htot));
00324 fprintf(ioQQQ,PrintEfmt("%9.2e",thermal.heating[1][1]/thermal.htot));
00325 fprintf( ioQQQ, " Lines:");
00326 fprintf(ioQQQ,PrintEfmt("%9.2e",thermal.heating[0][22]/thermal.htot));
00327 fprintf(ioQQQ,PrintEfmt("%9.2e",thermal.heating[1][2]/thermal.htot));
00328 fprintf( ioQQQ, " Compton:");
00329 fprintf(ioQQQ,PrintEfmt("%9.2e",thermal.heating[0][19]/thermal.htot));
00330 fprintf( ioQQQ, " FFHeatig");
00331 fprintf(ioQQQ,PrintEfmt("%9.2e",thermal.heating[0][11]/thermal.htot));
00332 fprintf( ioQQQ, "\n");
00333 }
00334
00335 if( dense.lgElmtOn[ipHELIUM] )
00336 {
00337
00338 fac = dense.xIonDense[ipHELIUM][1]/dense.gas_phase[ipHELIUM];
00339 fprintf( ioQQQ, " He singlet n " );
00340 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][1][ipHe1s1S]*fac ));
00341
00342 if( iso.numPrintLevels[ipHE_LIKE][ipHELIUM]>= ipHe2p1P )
00343 {
00344 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][1][ipHe2s1S]*fac ));
00345 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][1][ipHe2p1P]*fac ));
00346 }
00347 else
00348 {
00349 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00350 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00351 }
00352
00353 if( iso.numPrintLevels[ipHE_LIKE][ipHELIUM]>= ipHe3p1P )
00354 {
00355 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][ipHELIUM][ipHe3s1S]*fac ));
00356 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][ipHELIUM][ipHe3p1P]*fac ));
00357 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][ipHELIUM][ipHe3d1D]*fac ));
00358 }
00359 else
00360 {
00361 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00362 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00363 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00364 }
00365
00366 fprintf( ioQQQ, " He tripl" );
00367
00368 if( iso.numPrintLevels[ipHE_LIKE][ipHELIUM]>= ipHe2p3P2 )
00369 {
00370 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][1][ipHe2s3S]*fac ));
00371 fprintf(ioQQQ,PrintEfmt("%9.2e",
00372 iso.Pop2Ion[ipHE_LIKE][1][ipHe2p3P0]*fac+
00373 iso.Pop2Ion[ipHE_LIKE][1][ipHe2p3P1]*fac+
00374 iso.Pop2Ion[ipHE_LIKE][1][ipHe2p3P2]*fac ));
00375 }
00376 else
00377 {
00378 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00379 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00380 }
00381
00382 if( iso.numPrintLevels[ipHE_LIKE][ipHELIUM]> ipHe3d3D )
00383 {
00384 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][1][ipHe3s3S]*fac ));
00385 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][1][ipHe3p3P]*fac ));
00386 fprintf(ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipHE_LIKE][1][ipHe3d3D]*fac ));
00387 }
00388 else
00389 {
00390 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00391 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00392 fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
00393 }
00394 fprintf( ioQQQ, "\n" );
00395 }
00396 }
00397
00398
00399 for( nelem=ipHELIUM; nelem<LIMELM; ++nelem )
00400 {
00401 if( dense.lgElmtOn[nelem] )
00402 {
00403 if( iso.lgPrtLevelPops[ipHE_LIKE][nelem] )
00404 {
00405 prt_He_like_Pops(nelem);
00406 }
00407 if( iso.lgPrtDepartCoef[ipHE_LIKE][nelem] )
00408 {
00409 prt_He_like_DeparCoef(nelem);
00410 }
00411 }
00412 }
00413
00414
00415
00416 fprintf( ioQQQ, " Pressure NgasTgas");
00417 fprintf(ioQQQ,PrintEfmt("%9.2e", pressure.PresGasCurr/BOLTZMANN));
00418 fprintf( ioQQQ, " P(total)");
00419 fprintf(ioQQQ,PrintEfmt("%9.2e", pressure.pres_radiation_lines_curr + pressure.PresGasCurr));
00420 fprintf( ioQQQ, " P( gas )");
00421 fprintf(ioQQQ,PrintEfmt("%9.2e", pressure.PresGasCurr));
00422 fprintf( ioQQQ, " P(Radtn)");
00423 fprintf(ioQQQ,PrintEfmt("%9.2e", pressure.pres_radiation_lines_curr));
00424 fprintf( ioQQQ, " Rad accl");
00425 fprintf(ioQQQ,PrintEfmt("%9.2e", wind.AccelTot));
00426 fprintf( ioQQQ, " ForceMul");
00427 fprintf(ioQQQ,PrintEfmt("%9.2e", wind.fmul));
00428 fprintf( ioQQQ, "\n" );
00429
00430 fprintf( ioQQQ , " Texc(La)");
00431 fprintf(ioQQQ,PrintEfmt("%9.2e", hydro.TexcLya ));
00432 fprintf( ioQQQ , " T(contn)");
00433 fprintf(ioQQQ,PrintEfmt("%9.2e", coninc ));
00434 fprintf( ioQQQ , " T(diffs)");
00435 fprintf(ioQQQ,PrintEfmt("%9.2e", cdif ));
00436
00437 fprintf( ioQQQ , " nT (c+d)");
00438 fprintf(ioQQQ,PrintEfmt("%9.2e", con_density ));
00439
00440 fprintf( ioQQQ , " Prad/Gas");
00441 fprintf(ioQQQ,PrintEfmt("%9.2e", pressure.pbeta ));
00442
00443 fprintf( ioQQQ , " Pmag/Gas");
00444 fprintf(ioQQQ,PrintEfmt("%9.2e", magnetic.pressure / pressure.PresGasCurr) );
00445 fprintf( ioQQQ, "\n" );
00446
00447 if( gv.lgGrainPhysicsOn )
00448 {
00449 for( nd=0; nd < gv.nBin; nd++ )
00450 {
00451
00452
00453
00454 chQHMark = (char)(( gv.bin[nd]->lgQHeat && gv.bin[nd]->lgUseQHeat ) ? '*' : ' ');
00455 fprintf( ioQQQ, "%-12.12s%c DustTemp",gv.bin[nd]->chDstLab, chQHMark);
00456 fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->tedust));
00457 fprintf( ioQQQ, " Pot Volt");
00458 fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->dstpot*EVRYD));
00459 fprintf( ioQQQ, " Chrg (e)");
00460 fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->AveDustZ));
00461 fprintf( ioQQQ, " drf cm/s");
00462 fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->DustDftVel));
00463 fprintf( ioQQQ, " Heating:");
00464 fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->GasHeatPhotoEl));
00465 fprintf( ioQQQ, " Frac tot");
00466 fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->GasHeatPhotoEl/thermal.htot));
00467 fprintf( ioQQQ, "\n" );
00468 }
00469 }
00470
00471
00472
00473 if( findspecies("CO")->hevmol > 0. )
00474 {
00475 fprintf( ioQQQ, " Molecules CH/Ctot:");
00476 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("CH")->hevmol/dense.gas_phase[ipCARBON]));
00477 fprintf( ioQQQ, " CH+/Ctot");
00478 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("CH+")->hevmol/dense.gas_phase[ipCARBON]));
00479 fprintf( ioQQQ, " CO/Ctot:");
00480 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("CO")->hevmol/dense.gas_phase[ipCARBON]));
00481 fprintf( ioQQQ, " CO+/Ctot");
00482 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("CO+")->hevmol/dense.gas_phase[ipCARBON]));
00483 fprintf( ioQQQ, " H2O/Otot");
00484 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("H2O")->hevmol/dense.gas_phase[ipOXYGEN]));
00485 fprintf( ioQQQ, " OH/Ototl");
00486 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("OH")->hevmol/dense.gas_phase[ipOXYGEN]));
00487 fprintf( ioQQQ, "\n");
00488 }
00489
00490
00491 H2_Prt_Zone();
00492
00493
00494 if( dense.lgElmtOn[ipLITHIUM] || dense.lgElmtOn[ipBERYLLIUM] ||
00495 (secondaries.csupra[ipHYDROGEN][0]>0.) )
00496 {
00497 fprintf( ioQQQ, " Lithium " );
00498 for( i=0; i < 4; i++ )
00499 {
00500 fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[ipLITHIUM][i]/MAX2(1e-35,dense.gas_phase[ipLITHIUM]) ));
00501 }
00502 fprintf( ioQQQ, " Berylliu" );
00503 for( i=0; i < 5; i++ )
00504 {
00505 fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[ipBERYLLIUM][i]/MAX2(1e-35,dense.gas_phase[ipBERYLLIUM])) );
00506 }
00507
00508
00509 fprintf( ioQQQ, " sec ion:" );
00510 fprintf(ioQQQ,PrintEfmt("%9.2e", secondaries.csupra[ipHYDROGEN][0]) );
00511 fprintf( ioQQQ, "\n" );
00512
00513
00514 if( prt.lgPrintHeating )
00515 {
00516 fprintf( ioQQQ, " " );
00517 for( i=0; i < 3; i++ )
00518 {
00519 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[ipLITHIUM][i]/ thermal.htot) );
00520 }
00521 fprintf( ioQQQ, " " );
00522
00523 for( i=0; i < 4; i++ )
00524 {
00525 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[ipBERYLLIUM][i]/thermal.htot ));
00526 }
00527 fprintf( ioQQQ, "\n" );
00528 }
00529 }
00530
00531
00532 if( dense.lgElmtOn[ipBORON] )
00533 {
00534 fprintf( ioQQQ, " Boron " );
00535 for( i=0; i < 6; i++ )
00536 {
00537 fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[ipBORON][i]/MAX2(1e-35,dense.gas_phase[ipBORON]) ));
00538 }
00539 fprintf( ioQQQ, "\n" );
00540
00541
00542 if( prt.lgPrintHeating )
00543 {
00544 fprintf( ioQQQ, " " );
00545 for( i=0; i < 5; i++ )
00546 {
00547 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[ipBORON][i]/thermal.htot ));
00548 }
00549 fprintf( ioQQQ, "\n" );
00550 }
00551 }
00552
00553
00554 fprintf( ioQQQ, " Carbon " );
00555 for( i=0; i < 7; i++ )
00556 {
00557 fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[ipCARBON][i]/SDIV(dense.gas_phase[ipCARBON])) );
00558 }
00559
00560 fprintf( ioQQQ, " H2O+/O " );
00561 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("H2O+")->hevmol/MAX2(1e-35,dense.gas_phase[ipOXYGEN]) ));
00562 fprintf( ioQQQ, " OH+/Otot" );
00563 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("OH+")->hevmol/ MAX2(1e-35,dense.gas_phase[ipOXYGEN]) ));
00564
00565 fprintf( ioQQQ, " Hex(tot)" );
00566 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[0][20] ));
00567 fprintf( ioQQQ, "\n" );
00568
00569
00570 if( prt.lgPrintHeating )
00571 {
00572 fprintf( ioQQQ, " " );
00573 for( i=0; i < ipCARBON+1; i++ )
00574 {
00575 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[ipCARBON][i]/ thermal.htot) );
00576 }
00577 fprintf( ioQQQ, "\n" );
00578 }
00579
00580
00581 fprintf( ioQQQ, " Nitrogen " );
00582 for( i=1; i <= 8; i++ )
00583 {
00584 fprintf(ioQQQ,PrintEfmt("%9.2e",dense.xIonDense[ipNITROGEN][i-1]/ SDIV(dense.gas_phase[ipNITROGEN]) ));
00585 }
00586 fprintf( ioQQQ, " O2/Ototl" );
00587 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("O2")->hevmol/MAX2(1e-35,dense.gas_phase[ipOXYGEN])));
00588 fprintf( ioQQQ, " O2+/Otot" );
00589 fprintf(ioQQQ,PrintEfmt("%9.2e", findspecies("O2+")->hevmol/ MAX2(1e-35,dense.gas_phase[ipOXYGEN]) ));
00590 fprintf( ioQQQ, "\n" );
00591
00592
00593 if( prt.lgPrintHeating )
00594 {
00595 fprintf( ioQQQ, " " );
00596 for( i=0; i < ipNITROGEN+1; i++ )
00597 {
00598 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[ipNITROGEN][i]/ thermal.htot ));
00599 }
00600 fprintf( ioQQQ, "\n" );
00601 }
00602
00603 # if 0
00604
00605 fprintf( ioQQQ, " Oxygen " );
00606 for( i=1; i <= 9; i++ )
00607 {
00608 fprintf(ioQQQ,PrintEfmt("%9.2e",dense.xIonDense[ipOXYGEN][i-1]/ SDIV(dense.gas_phase[ipOXYGEN]) ));
00609 }
00610 fprintf( ioQQQ, "\n" );
00611
00612
00613 if( prt.lgPrintHeating )
00614 {
00615 fprintf( ioQQQ, " " );
00616 for( i=0; i < ipOXYGEN+1; i++ )
00617 {
00618 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[ipOXYGEN][i]/ thermal.htot ));
00619 }
00620 fprintf( ioQQQ, "\n" );
00621 }
00622 # endif
00623
00624
00625
00626 for( nelem=ipOXYGEN; nelem < ipALUMINIUM; ++nelem )
00627 {
00628 if( dense.lgElmtOn[nelem] )
00629 {
00630
00631 fprintf( ioQQQ, " %10.10s ", elementnames.chElementName[nelem]);
00632
00633 for( i=0; i < nelem+2; i++ )
00634 {
00635 fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[nelem][i]/dense.gas_phase[nelem] ));
00636 }
00637 fprintf( ioQQQ, "\n" );
00638
00639
00640 if( prt.lgPrintHeating )
00641 {
00642 fprintf( ioQQQ, " " );
00643 for( i=0; i < nelem+1; i++ )
00644 {
00645 fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating[nelem][i]/thermal.htot ));
00646 }
00647 fprintf( ioQQQ, "\n" );
00648 }
00649 }
00650 }
00651
00652
00653 for( nelem=ipALUMINIUM; nelem < LIMELM; ++nelem )
00654 {
00655 if( dense.lgElmtOn[nelem] )
00656 {
00657
00658
00659 enum {LINE=13};
00660
00661 ishift = MAX2(0,dense.IonHigh[nelem]-LINE+1);
00662
00663
00664 fprintf( ioQQQ, " %10.10s%2ld ", elementnames.chElementName[nelem],ishift );
00665
00666 for( i=0; i < LINE; i++ )
00667 {
00668 fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[nelem][i+ishift]/dense.gas_phase[nelem]) );
00669 }
00670 fprintf( ioQQQ, "\n" );
00671
00672
00673 if( prt.lgPrintHeating )
00674 {
00675 fprintf( ioQQQ, " " );
00676 for( i=0; i < LINE; i++ )
00677 {
00678 fprintf(ioQQQ,
00679 PrintEfmt("%9.2e", thermal.heating[nelem][i+ishift]/thermal.htot ));
00680 }
00681 fprintf( ioQQQ, "\n" );
00682 }
00683 }
00684 }
00685
00686
00687 FeIIPrint();
00688
00689 DEBUG_EXIT( "PrtZone()" );
00690 return;
00691 }
00692
00693
00694 static void prt_H_like_Pops( long nelem )
00695 {
00696 long i ,
00697 limit;
00698
00699 DEBUG_ENTRY( "prt_H_like_Pops()" );
00700
00701
00702
00703
00704
00705
00706 if( dense.IonHigh[nelem] != nelem + 1 )
00707 {
00708 DEBUG_EXIT( "prt_H_like_Pops()" );
00709
00710 return;
00711 }
00712
00713
00714 ASSERT( iso.numPrintLevels[ipH_LIKE][nelem] > 2);
00715
00716
00717 fprintf( ioQQQ, " %2s%2li 1S-12 ",
00718 elementnames.chElementSym[nelem],(nelem+1) );
00719
00720 limit = MIN2(iso.numPrintLevels[ipH_LIKE][nelem],13);
00721 for( i=ipH1s; i < limit; i++ )
00722 {
00723 fprintf( ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipH_LIKE][nelem][i] ));
00724 }
00725 fprintf(ioQQQ,"\n");
00726
00727 if( iso.numPrintLevels[ipH_LIKE][nelem] >= limit )
00728 {
00729 long int nprint = 0;
00730
00731 fprintf( ioQQQ, " %2s%2li rest ",
00732 elementnames.chElementSym[nelem], (nelem+1) );
00733
00734 for( i=limit; i < iso.numPrintLevels[ipH_LIKE][nelem]; i++ )
00735 {
00736 fprintf( ioQQQ,PrintEfmt("%9.2e", iso.Pop2Ion[ipH_LIKE][nelem][i] ));
00737 ++nprint;
00738
00739 if( nprint == 13 )
00740 {
00741 nprint = 0;
00742
00743 fprintf( ioQQQ, "\n" );
00744 if( i!=iso.numPrintLevels[ipH_LIKE][nelem]-1 )
00745 {
00746
00747 fprintf( ioQQQ, " " );
00748 }
00749 }
00750 }
00751
00752 if( nprint != 0 )
00753 {
00754
00755 fprintf( ioQQQ, "\n" );
00756 }
00757 }
00758
00759 DEBUG_EXIT( "prt_H_like_Pops()" );
00760 return;
00761 }
00762
00763
00764 static void prt_H_like_DeparCoef( long nelem )
00765 {
00766 long i ,
00767 limit;
00768
00769 DEBUG_ENTRY( "prt_H_like_DeparCoef()" );
00770
00771
00772
00773
00774
00775 if( dense.IonHigh[nelem] != nelem + 1 )
00776 {
00777 DEBUG_EXIT( "prt_H_like_DeparCoef()" );
00778
00779 return;
00780 }
00781
00782
00783 ASSERT( iso.numPrintLevels[ipH_LIKE][nelem] > 2);
00784
00785 limit = MIN2(iso.numPrintLevels[ipH_LIKE][nelem],13);
00786
00787 fprintf( ioQQQ, " %2s%2li 1S-12 ",
00788 elementnames.chElementSym[nelem],(nelem+1) );
00789
00790 for( i=ipH1s; i < limit; i++ )
00791 {
00792 fprintf( ioQQQ,PrintEfmt("%9.2e", iso.DepartCoef[ipH_LIKE][nelem][i]) );
00793 }
00794 fprintf( ioQQQ, "\n" );
00795
00796 if( iso.numPrintLevels[ipH_LIKE][nelem] >= limit )
00797 {
00798 long int nprint = 0;
00799
00800 fprintf( ioQQQ, " %2s%2li rest ",
00801 elementnames.chElementSym[nelem], (nelem+1) );
00802
00803 for( i=limit; i < iso.numPrintLevels[ipH_LIKE][nelem]; i++ )
00804 {
00805 fprintf( ioQQQ,PrintEfmt("%9.2e", iso.DepartCoef[ipH_LIKE][nelem][i] ));
00806 ++nprint;
00807 if( nprint == 13 )
00808 {
00809
00810 fprintf( ioQQQ, "\n" );
00811 nprint = 0;
00812 if( i!=iso.numPrintLevels[ipH_LIKE][nelem]-1 )
00813 {
00814
00815 fprintf( ioQQQ, " " );
00816 }
00817 }
00818 }
00819 if( nprint != 0 )
00820 {
00821
00822 fprintf( ioQQQ, "\n" );
00823 }
00824 }
00825
00826 DEBUG_EXIT( "prt_H_like_DeparCoef()" );
00827 return;
00828 }