cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
prt_zone.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*PrtZone print out individual zone results, call by iter_end_check at very
4  * end of zone calculations */
5 #include "cddefines.h"
6 #include "iso.h"
7 #include "grainvar.h"
8 #include "pressure.h"
9 #include "wind.h"
10 #include "conv.h"
11 #include "trace.h"
12 #include "magnetic.h"
13 #include "called.h"
14 #include "dynamics.h"
15 #include "h2.h"
16 #include "secondaries.h"
17 #include "opacity.h"
18 #include "geometry.h"
19 #include "hmi.h"
20 #include "thermal.h"
21 #include "radius.h"
22 #include "phycon.h"
23 #include "abund.h"
24 #include "hydrogenic.h"
25 #include "ionbal.h"
26 #include "elementnames.h"
27 #include "prt.h"
28 #include "deuterium.h"
29 #include "mole.h"
30 #include "rfield.h"
31 #include "freebound.h"
32 #include "dense.h"
33 
34 void PrtZone(void)
35 {
36  char chField7[32];
37  char chLet,
38  chQHMark;
39  long int i,
40  ishift,
41  nelem ,
42  mol;
43 
44  DEBUG_ENTRY( "PrtZone()" );
45 
46  if( thermal.lgUnstable )
47  {
48  chLet = 'u';
49  }
50  else
51  {
52  chLet = ' ';
53  }
54 
55  /* middle of zone for printing
56  rmidle = radius.Radius - radius.drad*0.5*radius.dRadSign;
57  dmidle = radius.depth - radius.drad*0.5; */
58 
59  /* option to print single line when quiet but tracing convergence
60  * with "trace convergence" command */
61  if( called.lgTalk || trace.nTrConvg )
62  {
63  /* print either ####123 or ###1234 */
64  if( nzone <= 999 )
65  {
66  sprintf( chField7, "####%3ld", nzone );
67  }
68  else
69  {
70  sprintf( chField7, "###%4ld", nzone );
71  }
72 
73  fprintf(ioQQQ, " %7.7s %cTe:",chField7, chLet);
75  fprintf(ioQQQ," Hden:");
77  fprintf(ioQQQ," Ne:");
79  fprintf(ioQQQ," R:");
81  fprintf(ioQQQ," R-R0:");
83  fprintf(ioQQQ," dR:");
85  fprintf(ioQQQ," NTR:%3ld Htot:",conv.nPres2Ioniz);
87  fprintf(ioQQQ," T912:");
88  fprintf(ioQQQ,PrintEfmt("%9.2e",opac.TauAbsGeo[0][iso_sp[ipH_LIKE][ipHYDROGEN].fb[ipH1s].ipIsoLevNIonCon-1] ));
89  fprintf(ioQQQ,"###\n");
90 
91  if( trace.nTrConvg )
92  {
93  fprintf( ioQQQ, " H:%.2e %.2e 2H2/H: %.2e He: %.2e %.2e %.2e\n",
100  );
101  }
102  }
103 
104  /* now return if not talking */
105  if( !called.lgTalk && !trace.nTrConvg )
106  {
107  return;
108  }
109 
110  /* lgDenFlucOn set to true in zero, only false when variable abundances are on,
111  * lgAbTaON set true when element table used */
112  if( !dense.lgDenFlucOn || abund.lgAbTaON )
113  {
114  fprintf( ioQQQ, " Abun:" );
115  for( i=0; i < LIMELM; i++ )
116  {
117  fprintf( ioQQQ,PrintEfmt("%8.1e", dense.gas_phase[i] ));
118  }
119  fprintf( ioQQQ, "\n" );
120  }
121 
122  /*-------------------------------------------------
123  * print wind parameters if windy model */
124  if( !wind.lgStatic() )
125  {
126  double fac;
127  /* find denominator for fractional contributions */
128  if( wind.AccelTotalOutward == 0. )
129  fac = 1.;
130  else
131  fac = wind.AccelTotalOutward;
132  fprintf( ioQQQ,
133  " Dynamics wind V:%.3e km/s a(grav):%.2e a(tot):%.2e Fr(cont):%6.3f "
134  "Fr(line):%6.3f \n",
135  wind.windv/1e5 ,
138  wind.AccelCont/ fac,
139  wind.AccelLine/fac );
140 
141  /* print advection information */
143  DynaPrtZone();
144  }
145 
146  /* print line with radiation pressure if significant */
147  if( pressure.pbeta > .05 )
149 
150  // report fraction of total H in form of H^0 and H^+
151  double hatmic = 0.;
152  count_ptr<chem_nuclide> elHydrogen = findnuclide("H");
153  for(mol = 0; mol < mole_global.num_calc; mol++) {
154  if (mole_global.list[mol]->isIsotopicTotalSpecies() && mole_global.list[mol]->nNuclide.find(elHydrogen) !=
155  mole_global.list[mol]->nNuclide.end())
156  hatmic += mole.species[mol].den*mole_global.list[mol]->nNuclide[elHydrogen];
157  }
158  ASSERT(hatmic > 0.);
159  hatmic = (dense.xIonDense[ipHYDROGEN][0] + dense.xIonDense[ipHYDROGEN][1])/hatmic;
160 
161  fprintf( ioQQQ, " Hydrogen ");
164  fprintf( ioQQQ, " H+o/Hden");
165  fprintf(ioQQQ,PrintEfmt("%9.2e",hatmic ));
167  fprintf( ioQQQ, " H- H2");
168  /* this is total H2, the sum of "ground" and excited */
171  fprintf( ioQQQ, " H2+ HeH+");
173  fprintf( ioQQQ, " Ho+ ColD");
175  fprintf(ioQQQ,PrintEfmt("%9.2e",findspecieslocal("H+")->column));
176  fprintf( ioQQQ, "\n");
177 
178  /* print departure coef if desired */
179  if( iso_sp[ipH_LIKE][ipHYDROGEN].lgPrtDepartCoef )
180  {
181  fprintf( ioQQQ, " Hydrogen " );
182  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipH_LIKE][ipHYDROGEN].st[ipH1s].DepartCoef()));
183  fprintf(ioQQQ,PrintEfmt("%9.2e", 1.));
184  fprintf( ioQQQ, " H+o/Hden");
186  fprintf(ioQQQ,PrintEfmt("%9.2e", hmi.hmidep));
187  fprintf( ioQQQ, " H- H2");
188  fprintf(ioQQQ,PrintEfmt("%9.2e", hmi.h2dep));
189  fprintf( ioQQQ, " H2+");
190  fprintf(ioQQQ,PrintEfmt("%9.2e", hmi.h2pdep));
191  fprintf( ioQQQ, " H3+");
192  fprintf(ioQQQ,PrintEfmt("%9.2e",hmi.h3pdep));
193  fprintf( ioQQQ, "\n" );
194  }
195 
196  if( deut.lgElmtOn )
197  {
198  fprintf( ioQQQ, " Deuterium ");
201  fprintf( ioQQQ, " D+o/Dden");
203  fprintf(ioQQQ,PrintEfmt("%9.2e",findspecieslocal("D-")->den/deut.gas_phase));
204  fprintf( ioQQQ, " D- HD");
206  fprintf(ioQQQ,PrintEfmt("%9.2e",findspecieslocal("HD+")->den/deut.gas_phase));
207  fprintf( ioQQQ, " HD+ HeD+");
208  fprintf(ioQQQ,PrintEfmt("%9.2e",findspecieslocal("HeD+")->den/deut.gas_phase));
209  fprintf( ioQQQ, " Do+ ColD");
211  fprintf(ioQQQ,PrintEfmt("%9.2e",findspecieslocal("D+")->column));
212  fprintf( ioQQQ, "\n");
213  }
214 
215  fixit("add a command line option to activate this");
216  // print departure coefficients for diatoms species
217  for( diatom_iter diatom = diatoms.begin(); diatom != diatoms.end(); ++diatom )
218  {
219  if( 0 )
220  (*diatom)->H2_PrtDepartCoef();
221  }
222 
223  if( prt.lgPrintHeating )
224  {
225  fprintf( ioQQQ, " ");
227  fprintf( ioQQQ," ");
228  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(0,15)/thermal.htot));
229  fprintf( ioQQQ," ");
230  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(0,16)/thermal.htot));
231  fprintf( ioQQQ,"\n");
232  }
233 
234  /* convert energy flux [erg cm-2 s-1] in attenuated incident continuum,
235  * diffuse emission, into equivalent temperature */
236  double TconTot = powpq((rfield.EnergyIncidCont+rfield.EnergyDiffCont)/(4.*STEFAN_BOLTZ),1,4);
237  double Tincid = powpq(rfield.EnergyIncidCont/(4.*STEFAN_BOLTZ),1,4);
238  double Tdiff = powpq(rfield.EnergyDiffCont/(4.*STEFAN_BOLTZ),1,4);
239 
240  /* convert sum of flux into energy density, then equivalent pressure */
241  double Pcon_nT = (Tincid + Tdiff) / SPEEDLIGHT;
242  Pcon_nT /= BOLTZMANN;
243 
244  if( prt.lgPrintHeating )
245  {
246  fprintf( ioQQQ, " ");
247  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(0,1)/thermal.htot ));
248  fprintf( ioQQQ, " ");
249  fprintf(ioQQQ,PrintEfmt("%9.2e", 0. ));
250  fprintf( ioQQQ, " BoundCom");
252  fprintf( ioQQQ, " Extra:");
254  fprintf( ioQQQ, " Pairs:");
255  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(0,21)/ thermal.htot ));
256  fprintf( ioQQQ," H-lines\n");
257  }
258 
259  /* Helium */
260  if( dense.lgElmtOn[ipHELIUM] )
261  {
262  fprintf( ioQQQ, " Helium " );
263  for( i=0; i < 3; i++ )
264  {
266  }
267 
268  fprintf( ioQQQ, " HeI 2s3S");
269  fprintf(ioQQQ,PrintEfmt("%9.2e",
271  fprintf( ioQQQ, " Comp H,C");
272  fprintf(ioQQQ,PrintEfmt("%9.2e", rfield.cmheat ));
274  fprintf( ioQQQ , " Fill Fac");
276  fprintf( ioQQQ , " Gam1/tot");
278  fprintf( ioQQQ, "\n");
279 
280  /* option to print departure coef */
281  if( iso_sp[ipH_LIKE][ipHELIUM].lgPrtDepartCoef )
282  {
283  fprintf( ioQQQ, " Helium " );
284  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[0].DepartCoef()));
285  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipH_LIKE][ipHELIUM].st[ipH1s].DepartCoef()));
286  fprintf(ioQQQ,PrintEfmt("%9.2e", 1.));
287 
288  fprintf( ioQQQ, " Comp H,C");
289  fprintf(ioQQQ,PrintEfmt("%9.2e", rfield.cmheat ));
291  fprintf( ioQQQ , " Fill Fac");
292  fprintf(ioQQQ,PrintEfmt("%9.2e", geometry.FillFac ));
293  fprintf( ioQQQ , " Gam1/tot");
295  fprintf( ioQQQ, "\n");
296  }
297 
298  /* print heating from He (and others) if desired
299  * entry "lines" is induced line heating
300  * 1,12 ffheat: 2,3 he triplets, 1,20 compton */
301  if( prt.lgPrintHeating )
302  {
303  /*fprintf( ioQQQ, " %10.3e%10.3e Lines:%10.2e%10.2e Compton:%10.3e FF Heatig%10.3e\n",
304  thermal.heating(1,0)/thermal.htot, thermal.heating(1,1)/
305  thermal.htot, thermal.heating(0,22)/thermal.htot, thermal.heating(1,2)/
306  thermal.htot, thermal.heating(0,19)/thermal.htot, thermal.heating(0,11)/
307  thermal.htot );*/
308  fprintf( ioQQQ, " ");
311  fprintf( ioQQQ, " Lines:");
314  fprintf( ioQQQ, " Compton:");
316  fprintf( ioQQQ, " FFHeatig");
318  fprintf( ioQQQ, "\n");
319  }
320 
321  if( dense.lgElmtOn[ipHELIUM] )
322  {
323  /* helium singlets and triplets relative to total helium gas phase density */
324  double fac = 1./dense.gas_phase[ipHELIUM];
325  fprintf( ioQQQ, " He singlet n " );
326  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe1s1S].Pop()*fac ));
327  /* singlet n=2 complex */
328  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe2s1S].Pop()*fac ));
329  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe2p1P].Pop()*fac ));
330  /* singlet n=3 complex */
331  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe3s1S].Pop()*fac ));
332  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe3p1P].Pop()*fac ));
333  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe3d1D].Pop()*fac ));
334 
335  fprintf( ioQQQ, " He tripl" );
336  /* triplet n=2 complex */
337  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe2s3S].Pop()*fac ));
338  fprintf(ioQQQ,PrintEfmt("%9.2e",
339  iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe2p3P0].Pop()*fac+
340  iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe2p3P1].Pop()*fac+
341  iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe2p3P2].Pop()*fac ));
342  /* triplet n=3 complex */
343  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe3s3S].Pop()*fac ));
344  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe3p3P].Pop()*fac ));
345  fprintf(ioQQQ,PrintEfmt("%9.2e", iso_sp[ipHE_LIKE][ipHELIUM].st[ipHe3d3D].Pop()*fac ));
346  fprintf( ioQQQ, "\n" );
347  }
348  }
349 
350  /* loop over iso sequences to see if any populations
351  * and/or departure coefficients need to be printed */
352  for( long ipISO = ipH_LIKE; ipISO < NISO; ipISO++ )
353  {
354  for( nelem=ipISO; nelem<LIMELM; ++nelem )
355  {
356  if( dense.lgElmtOn[nelem] )
357  {
358  if( iso_sp[ipISO][nelem].lgPrtLevelPops )
359  {
360  iso_prt_pops(ipISO, nelem, false);
361  }
362  if( iso_sp[ipISO][nelem].lgPrtDepartCoef )
363  {
364  /* true says print departure coefficients
365  * instead of populations. */
366  iso_prt_pops(ipISO, nelem, true);
367  }
368  }
369  }
370  }
371 
372  /* >>chng 01 dec 08, move pressure to line before grains, after radiation properties */
373  /* gas pressure, pressure due to incident radiation field, rad accel */
374  fprintf( ioQQQ, " Pressure NgasTgas");
375  fprintf(ioQQQ,PrintEfmt("%9.2e", pressure.PresGasCurr/BOLTZMANN));
376  fprintf( ioQQQ, " P(total)");
378  fprintf( ioQQQ, " P( gas )");
380  fprintf( ioQQQ, " P(Radtn)");
382  fprintf( ioQQQ, " Rad accl");
384  fprintf( ioQQQ, " ForceMul");
385  fprintf(ioQQQ,PrintEfmt("%9.2e", wind.fmul));
386  fprintf( ioQQQ, "\n" );
387 
388  fprintf( ioQQQ , " Texc(La) ");
389  fprintf(ioQQQ,PrintEfmt("%9.2e", hydro.TexcLya ));
390  /* attenuated incident continuum */
391  fprintf( ioQQQ , " T(I con)");
392  fprintf(ioQQQ,PrintEfmt("%9.2e", Tincid ));
393  fprintf( ioQQQ , " T(D con)");
394  fprintf(ioQQQ,PrintEfmt("%9.2e", Tdiff ));
395  fprintf( ioQQQ , " T(U tot)");
396  fprintf(ioQQQ,PrintEfmt("%9.2e", TconTot ));
397  /* print the total radiation density expressed as an equivalent gas pressure */
398  fprintf( ioQQQ , " nT (c+d)");
399  fprintf(ioQQQ,PrintEfmt("%9.2e", Pcon_nT ));
400  /* print the radiation to gas pressure */
401  fprintf( ioQQQ , " Prad/Gas");
402  fprintf(ioQQQ,PrintEfmt("%9.2e", pressure.pbeta ));
403  /* magnetic to gas pressure ratio */
404  fprintf( ioQQQ , " Pmag/Gas");
406  fprintf( ioQQQ, "\n" );
407 
408  if( gv.lgGrainPhysicsOn )
409  {
410  for( size_t nd=0; nd < gv.bin.size(); nd++ )
411  {
412  /* Change things so the quantum heated dust species are marked with an
413  * asterisk just after the name (K Volk)
414  * added QHMARK here and in the write statement */
415  chQHMark = (char)(( gv.bin[nd]->lgQHeat && gv.bin[nd]->lgUseQHeat ) ? '*' : ' ');
416  fprintf( ioQQQ, "%-12.12s%c DustTemp",gv.bin[nd]->chDstLab, chQHMark);
417  fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->tedust));
418  fprintf( ioQQQ, " Pot Volt");
419  fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->dstpot*EVRYD));
420  fprintf( ioQQQ, " Chrg (e)");
421  fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->AveDustZ));
422  fprintf( ioQQQ, " drf cm/s");
423  fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->DustDftVel));
424  fprintf( ioQQQ, " Heating:");
425  fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->GasHeatPhotoEl));
426  fprintf( ioQQQ, " Frac tot");
427  fprintf(ioQQQ,PrintEfmt("%9.2e", gv.bin[nd]->GasHeatPhotoEl/thermal.htot));
428  fprintf( ioQQQ, "\n" );
429  }
430  }
431  /* >>chng 00 apr 20, moved save-out of quantum heating data to qheat(), by PvH */
432 
433  /* heavy element molecules */
434  if( findspecieslocal("CO")->den > 0. )
435  {
436  fprintf( ioQQQ, " Molecules CH/Ctot:");
438  fprintf( ioQQQ, " CH+/Ctot");
440  fprintf( ioQQQ, " CO/Ctot:");
442  fprintf( ioQQQ, " CO+/Ctot");
444  fprintf( ioQQQ, " H2O/Otot");
446  fprintf( ioQQQ, " OH/Ototl");
448  fprintf( ioQQQ, "\n");
449  }
450 
451  /* information about the large H2 molecule - this just returns if not turned on */
452  for( diatom_iter diatom = diatoms.begin(); diatom != diatoms.end(); ++diatom )
453  (*diatom)->H2_Prt_Zone();
454 
455  /* Lithium, Beryllium */
457  (secondaries.csupra[ipHYDROGEN][0]>0.) )
458  {
459  fprintf( ioQQQ, " Lithium " );
460  for( i=0; i < 4; i++ )
461  {
463  }
464  fprintf( ioQQQ, " Berylliu" );
465  for( i=0; i < 5; i++ )
466  {
468  }
469 
470  /* print secondary ionization rate for atomic hydrogen */
471  fprintf( ioQQQ, " sec ion:" );
473  fprintf( ioQQQ, "\n" );
474 
475  /* option to print heating due to these stages*/
476  if( prt.lgPrintHeating )
477  {
478  fprintf( ioQQQ, " " );
479  for( i=0; i < 3; i++ )
480  {
482  }
483  fprintf( ioQQQ, " " );
484 
485  for( i=0; i < 4; i++ )
486  {
488  }
489  fprintf( ioQQQ, "\n" );
490  }
491  }
492 
493  /* Boron */
494  if( dense.lgElmtOn[ipBORON] )
495  {
496  fprintf( ioQQQ, " Boron " );
497  for( i=0; i < 6; i++ )
498  {
500  }
501  fprintf( ioQQQ, "\n" );
502 
503  /* option to print heating*/
504  if( prt.lgPrintHeating )
505  {
506  fprintf( ioQQQ, " " );
507  for( i=0; i < 5; i++ )
508  {
510  }
511  fprintf( ioQQQ, "\n" );
512  }
513  }
514 
515  /* Carbon */
516  fprintf( ioQQQ, " Carbon " );
517  for( i=0; i < 7; i++ )
518  {
520  }
521  /* some molecules trail the line */
522  fprintf( ioQQQ, " H2O+/O " );
523  fprintf(ioQQQ,PrintEfmt("%9.2e", findspecieslocal("H2O+")->den/MAX2(1e-35,dense.gas_phase[ipOXYGEN]) ));
524  fprintf( ioQQQ, " OH+/Otot" );
525  fprintf(ioQQQ,PrintEfmt("%9.2e", findspecieslocal("OH+")->den/ MAX2(1e-35,dense.gas_phase[ipOXYGEN]) ));
526  /* print extra heating, normally zero */
527  fprintf( ioQQQ, " Hex(tot)" );
528  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(0,20) ));
529  fprintf( ioQQQ, "\n" );
530 
531  /* option to print heating*/
532  if( prt.lgPrintHeating )
533  {
534  fprintf( ioQQQ, " " );
535  for( i=0; i < ipCARBON+1; i++ )
536  {
537  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(ipCARBON,i)/ thermal.htot) );
538  }
539  fprintf( ioQQQ, "\n" );
540  }
541 
542  /* Nitrogen */
543  fprintf( ioQQQ, " Nitrogen " );
544  for( i=1; i <= 8; i++ )
545  {
547  }
548  fprintf( ioQQQ, " O2/Ototl" );
549  fprintf(ioQQQ,PrintEfmt("%9.2e", findspecieslocal("O2")->den/MAX2(1e-35,dense.gas_phase[ipOXYGEN])));
550  fprintf( ioQQQ, " O2+/Otot" );
551  fprintf(ioQQQ,PrintEfmt("%9.2e", findspecieslocal("O2+")->den/ MAX2(1e-35,dense.gas_phase[ipOXYGEN]) ));
552  fprintf( ioQQQ, "\n" );
553 
554  /* option to print heating*/
555  if( prt.lgPrintHeating )
556  {
557  fprintf( ioQQQ, " " );
558  for( i=0; i < ipNITROGEN+1; i++ )
559  {
560  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(ipNITROGEN,i)/ thermal.htot ));
561  }
562  fprintf( ioQQQ, "\n" );
563  }
564 
565 # if 0
566  /* Oxygen */
567  fprintf( ioQQQ, " Oxygen " );
568  for( i=1; i <= 9; i++ )
569  {
571  }
572  fprintf( ioQQQ, "\n" );
573 
574  /* option to print heating*/
575  if( prt.lgPrintHeating )
576  {
577  fprintf( ioQQQ, " " );
578  for( i=0; i < ipOXYGEN+1; i++ )
579  {
580  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(ipOXYGEN,i)/ thermal.htot ));
581  }
582  fprintf( ioQQQ, "\n" );
583  }
584 # endif
585 
586  /* now print rest of elements inside loops */
587  /* fluorine through Magnesium */
588  for( nelem=ipOXYGEN; nelem < ipALUMINIUM; ++nelem )
589  {
590  if( dense.lgElmtOn[nelem] )
591  {
592  /* print the element name and amount of shift */
593  fprintf( ioQQQ, " %10.10s ", elementnames.chElementName[nelem]);
594 
595  for( i=0; i < nelem+2; i++ )
596  {
597  fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[nelem][i]/dense.gas_phase[nelem] ));
598  }
599  fprintf( ioQQQ, "\n" );
600 
601  /* print heating but only if needed */
602  if( prt.lgPrintHeating )
603  {
604  fprintf( ioQQQ, " " );
605  for( i=0; i < nelem+1; i++ )
606  {
607  fprintf(ioQQQ,PrintEfmt("%9.2e", thermal.heating(nelem,i)/thermal.htot ));
608  }
609  fprintf( ioQQQ, "\n" );
610  }
611  }
612  }
613 
614  /* Aluminium through Zinc */
615  for( nelem=ipALUMINIUM; nelem < LIMELM; ++nelem )
616  {
617  if( dense.lgElmtOn[nelem] )
618  {
619  /* number of ionization stages to print across the page */
620  /*@-redef@*/
621  enum {LINE=13};
622  /*@+redef@*/
623  ishift = MAX2(0,dense.IonHigh[nelem]-LINE+1);
624 
625  /* print the element name and amount of shift */
626  fprintf( ioQQQ, " %10.10s%2ld ", elementnames.chElementName[nelem],ishift );
627 
628  for( i=0; i < LINE; i++ )
629  {
630  fprintf(ioQQQ,PrintEfmt("%9.2e", dense.xIonDense[nelem][i+ishift]/dense.gas_phase[nelem]) );
631  }
632  fprintf( ioQQQ, "\n" );
633 
634  /* print heating but only if needed */
635  if( prt.lgPrintHeating )
636  {
637  fprintf( ioQQQ, " " );
638  for( i=0; i < LINE; i++ )
639  {
640  fprintf(ioQQQ,
641  PrintEfmt("%9.2e", thermal.heating(nelem,i+ishift)/thermal.htot ));
642  }
643  fprintf( ioQQQ, "\n" );
644  }
645  }
646  }
647 
648  return;
649 }
650 
651 
void DynaPrtZone(void)
Definition: dynamics.cpp:2029
t_mole_global mole_global
Definition: mole.cpp:7
double htot
Definition: thermal.h:169
const int ipBERYLLIUM
Definition: cddefines.h:352
realnum AccelLine
Definition: wind.h:61
t_thermal thermal
Definition: thermal.cpp:6
void PrintE93(FILE *, double)
Definition: service.cpp:923
bool lgElmtOn
Definition: deuterium.h:21
const int ipHE_LIKE
Definition: iso.h:65
t_opac opac
Definition: opacity.cpp:5
int num_calc
Definition: mole.h:362
const int NISO
Definition: cddefines.h:311
const int ipHe2p3P1
Definition: iso.h:49
const int ipHe3d3D
Definition: iso.h:57
const int ipHe2p3P0
Definition: iso.h:48
long int IonHigh[LIMELM+1]
Definition: dense.h:130
const int ipHe2s3S
Definition: iso.h:46
const int ipOXYGEN
Definition: cddefines.h:356
#define PrintEfmt(F, V)
Definition: cddefines.h:1349
t_magnetic magnetic
Definition: magnetic.cpp:17
bool lgAdvection
Definition: dynamics.h:66
bool lgTimeDependentStatic
Definition: dynamics.h:102
t_conv conv
Definition: conv.cpp:5
t_phycon phycon
Definition: phycon.cpp:6
const int ipHe2p1P
Definition: iso.h:51
const int ipHe3p3P
Definition: iso.h:56
double pressure
Definition: magnetic.h:41
FILE * ioQQQ
Definition: cddefines.cpp:7
molezone * findspecieslocal(const char buf[])
realnum FillFac
Definition: geometry.h:29
long int nzone
Definition: cddefines.cpp:14
const int ipHe1s1S
Definition: iso.h:43
bool lgTalk
Definition: called.h:12
t_dynamics dynamics
Definition: dynamics.cpp:42
vector< freeBound > fb
Definition: iso.h:481
void PrtLinePres(FILE *ioPRESSURE)
double PresTotlCurr
Definition: pressure.h:46
double pres_radiation_lines_curr
Definition: pressure.h:61
t_dense dense
Definition: global.cpp:15
t_elementnames elementnames
Definition: elementnames.cpp:5
t_iso_sp iso_sp[NISO][LIMELM]
Definition: iso.cpp:11
realnum EnergyIncidCont
Definition: rfield.h:467
Wind wind
Definition: wind.cpp:5
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:135
t_trace trace
Definition: trace.cpp:5
bool lgUnstable
Definition: thermal.h:65
double drad
Definition: radius.h:31
t_ionbal ionbal
Definition: ionbal.cpp:8
t_abund abund
Definition: abund.cpp:5
realnum AccelGravity
Definition: wind.h:49
t_geometry geometry
Definition: geometry.cpp:5
realnum AccelCont
Definition: wind.h:55
bool lgPrintHeating
Definition: prt.h:233
const int ipHe2s1S
Definition: iso.h:47
const int ipH1s
Definition: iso.h:29
long int nPres2Ioniz
Definition: conv.h:145
const int ipHe3p1P
Definition: iso.h:59
t_mole_local mole
Definition: mole.cpp:8
double cmcool
Definition: rfield.h:275
t_pressure pressure
Definition: pressure.cpp:9
t_rfield rfield
Definition: rfield.cpp:9
valarray< class molezone > species
Definition: mole.h:468
realnum AccelTotalOutward
Definition: wind.h:52
double HD_total
Definition: hmi.h:27
count_ptr< chem_nuclide > findnuclide(const char buf[])
vector< diatomics * > diatoms
Definition: h2.cpp:8
t_hydro hydro
Definition: hydrogenic.cpp:5
const int ipHe3s3S
Definition: iso.h:54
double cmheat
Definition: rfield.h:275
bool lgGrainPhysicsOn
Definition: grainvar.h:479
double depth_mid_zone
Definition: radius.h:31
realnum H_ion_frac_photo
Definition: hydrogenic.h:120
double column(const genericState &gs)
double PresGasCurr
Definition: pressure.h:46
double h3pdep
Definition: hmi.h:42
int nTrConvg
Definition: trace.h:27
realnum gas_phase
Definition: deuterium.h:22
t_radius radius
Definition: radius.cpp:5
double heating(long nelem, long ion)
Definition: thermal.h:186
double h2dep
Definition: hmi.h:42
t_prt prt
Definition: prt.cpp:14
realnum pbeta
Definition: pressure.h:96
double xIonDense[2]
Definition: deuterium.h:23
bool lgElmtOn[LIMELM]
Definition: dense.h:160
realnum gas_phase[LIMELM]
Definition: dense.h:76
double Radius_mid_zone
Definition: radius.h:31
double h2pdep
Definition: hmi.h:42
#define ASSERT(exp)
Definition: cddefines.h:613
void PrtZone(void)
Definition: prt_zone.cpp:34
const int ipALUMINIUM
Definition: cddefines.h:361
const int ipNITROGEN
Definition: cddefines.h:355
double CompRecoilHeatLocal
Definition: ionbal.h:156
const int ipH_LIKE
Definition: iso.h:64
bool lgAbTaON
Definition: abund.h:218
const int LIMELM
Definition: cddefines.h:308
double hmidep
Definition: hmi.h:42
const int ipHe2p3P2
Definition: iso.h:50
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
double powpq(double x, int p, int q)
Definition: service.cpp:630
const int ipHELIUM
Definition: cddefines.h:350
realnum TexcLya
Definition: hydrogenic.h:103
vector< GrainBin * > bin
Definition: grainvar.h:583
double H2_total
Definition: hmi.h:25
t_deuterium deut
Definition: deuterium.cpp:7
realnum EnergyDiffCont
Definition: rfield.h:467
double eden
Definition: dense.h:201
realnum ** TauAbsGeo
Definition: opacity.h:91
#define MAX2(a, b)
Definition: cddefines.h:824
int fprintf(const Output &stream, const char *format,...)
Definition: service.cpp:1121
MoleculeList list
Definition: mole.h:365
realnum ** csupra
Definition: secondaries.h:33
bool lgDenFlucOn
Definition: dense.h:255
sys_float SDIV(sys_float x)
Definition: cddefines.h:1002
const int ipCARBON
Definition: cddefines.h:354
bool lgStatic(void) const
Definition: wind.h:24
void iso_prt_pops(long ipISO, long nelem, bool lgPrtDeparCoef)
Definition: iso_solve.cpp:425
char chElementName[LIMELM][CHARS_ELEMENT_NAME]
Definition: elementnames.h:17
#define fixit(a)
Definition: cddefines.h:417
GrainVar gv
Definition: grainvar.cpp:5
t_secondaries secondaries
Definition: secondaries.cpp:5
t_hmi hmi
Definition: hmi.cpp:5
double te
Definition: phycon.h:21
const int ipHe3d1D
Definition: iso.h:58
const int ipHYDROGEN
Definition: cddefines.h:349
const int ipLITHIUM
Definition: cddefines.h:351
realnum windv
Definition: wind.h:18
t_called called
Definition: called.cpp:4
const int ipHe3s1S
Definition: iso.h:55
vector< diatomics * >::iterator diatom_iter
Definition: h2.h:13
const int ipBORON
Definition: cddefines.h:353
realnum fmul
Definition: wind.h:65