cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
punch_special.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*PunchSpecial generate output for the punch special command */
4 #include "cddefines.h"
5 #include "taulines.h"
6 #include "radius.h"
7 #include "phycon.h"
8 //#include "h2.h"
9 #include "punch.h"
10 
11 /*PunchSpecial generate output for the punch special command */
12 void PunchSpecial(FILE* ioPUN ,
13  const char *chTime)
14 {
15  /*long int i;*/
16 
17  DEBUG_ENTRY( "PunchSpecial()" );
18 
19  if( strncmp(chTime,"LAST",4) == 0 )
20  {
21  /* code to execute only after last zone */
22 # if 0
23  long ipISO , nelem , limit , i;
24  double EdenAbund , fach;
25 # include "physconst.h"
26 # include "hydrogenic.h"
27  PunFeII( ioPUN );*/
28  ipISO = ipHYDROGEN;
29  nelem = ipHYDROGEN;
30 
31  /* in all following the factor of two is because a single
32  * decay produces two photons */
33  EdenAbund = StatesElem[ipH_LIKE][nelem][ipH2s].Pop*dense.xIonDense[nelem][nelem+1]*8.226*pow(1.+nelem,6);
34  fprintf(ioPUN," 2s = %.3e\n", EdenAbund);
35 
36  /* upper limit to H-like 2-phot is energy of La, which is in ipCont-1 cell */
37  limit = Transitions[ipH_LIKE][nelem][ipH2p][ipH1s].ipCont-1;
38  /* remember sum of rates, this will add up to twice the real rate since
39  * each transition makes two photons */
40  for( i=0; i < limit; i++ )
41  {
42  /*>>chng 01 jan 23, previous change had doubled cross section for H two-photon,
43  * so here we divide by 2 to get old answer */
45  fach = iso.As2nu[ipISO][nelem][i]/2.f;
46  fach *= rfield.anu2[i]/rfield.widflx[i]*EN1RYD;
47  fprintf(ioPUN,"%.3e\t%.3e\t%.3e\n",
48  RYDLAM/1e4/rfield.anu[i] , fach , fach*(realnum)EdenAbund );
49  }
50 # endif
51 
52  }
53  else
54  {
55  fprintf(ioPUN,"%.5e\t%.3e\t%.2e\n",
57 # if 0
58  long int iElecHi=1 , iVibHi=0, iRotHi=0;
59  /* code to execute after every zone */
60  if( h2.lgH2ON )
61  {
62  ASSERT( H2Lines[iElecHi][iVibHi][iRotHi][0][0][1].ipCont > 0 );
63 
64  fprintf(ioPUN,"DEBUG Oion\t%li\t%.2f\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
66  radius.depth,
67  H2Lines[iElecHi][iVibHi][iRotHi][0][0][1].Lo->Pop,
68  H2Lines[iElecHi][iVibHi][iRotHi][0][0][1].Emis->PopOpc,
69  H2Lines[iElecHi][iVibHi][iRotHi][0][0][1].Emis->opacity,
70  H2Lines[iElecHi][iVibHi][iRotHi][0][0][1].Emis->TauCon,
71  H2Lines[iElecHi][iVibHi][iRotHi][0][0][1].Emis->TauIn,
72  H2Lines[iElecHi][iVibHi][iRotHi][0][0][1].Emis->pump,
73  radius.drad
74  );
75  }
76 # endif
77  /*DumpLine(&Transitions[ipHE_LIKE][ipHELIUM][ipHe2p1P][0] );*/
78 
79  }
80  return;
81 }

Generated for cloudy by doxygen 1.8.1.1