cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion_helium.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*IonHelium solve ionization balance for helium */
4 #include "cddefines.h"
5 #include "dense.h"
6 #include "trace.h"
7 #include "conv.h"
8 #include "iso.h"
9 #include "ionbal.h"
10 #include "taulines.h"
11 
12 void IonHelium( void )
13 {
14  bool lgDebugPrint=false;
15 
16  DEBUG_ENTRY( "IonHelium()" );
17 
18  /* option to "turn off" helium */
19  if( !dense.lgElmtOn[ipHELIUM] )
20  {
21  dense.xIonDense[ipHELIUM][0] = 0.;
22  dense.xIonDense[ipHELIUM][1] = 0.;
23  dense.xIonDense[ipHELIUM][2] = 0.;
24  return;
25  }
26 
27  /* populations */
28  /* >>chng 01 may 09, add option to set ionization with element name ioniz cmnd */
30  {
34  }
35 
36  lgDebugPrint = false;
37 # if 0
38  if( nzone > 197 )
39  lgDebugPrint = true;
40 # endif
41 
42  /* find ionization balance */
43  ion_solver( ipHELIUM , lgDebugPrint );
44 
45  if( trace.lgHeBug )
46  {
47  fprintf( ioQQQ, " %li IonHelium returns; nzone %ld He0:%.4e He+:%.4e He+2:%.4e\n",
49  nzone,
53 
54  fprintf( ioQQQ, " He+ /He0:%s smp:%.4e rec:%.4e ion:%.4e rad rec:%.4e 1s Pop:%.4e\n",
55  iso_sp[ipHE_LIKE][ipHELIUM].chTypeAtomUsed,
56  iso_sp[ipHE_LIKE][ipHELIUM].xIonSimple,
60  iso_sp[ipHE_LIKE][ipHELIUM].st[0].Pop() );
61 
62  fprintf( ioQQQ, " He+2/He+:%s smp:%.4e rec:%.4e ion:%.4e rad rec:%.4e\n",
63  iso_sp[ipH_LIKE][ipHELIUM].chTypeAtomUsed,
64  iso_sp[ipH_LIKE][ipHELIUM].xIonSimple ,
68 
69  fprintf( ioQQQ, "\n" );
70  }
71  return;
72 }
double RateIonizTot(long nelem, long ion)
Definition: ionbal.h:254
qList st
Definition: iso.h:453
const int ipHE_LIKE
Definition: iso.h:63
bool lgHeBug
Definition: trace.h:82
void ion_solver(long int nelem, bool lgPrintIt)
Definition: ion_solver.cpp:62
t_conv conv
Definition: conv.cpp:5
t_dense dense
Definition: dense.cpp:24
FILE * ioQQQ
Definition: cddefines.cpp:7
long int nzone
Definition: cddefines.cpp:14
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:125
t_iso_sp iso_sp[NISO][LIMELM]
Definition: iso.cpp:8
double ** RateRecomTot
Definition: ionbal.h:198
t_trace trace
Definition: trace.cpp:5
realnum SetIoniz[LIMELM][LIMELM+1]
Definition: dense.h:154
t_ionbal ionbal
Definition: ionbal.cpp:5
bool lgElmtOn[LIMELM]
Definition: dense.h:146
long int nTotalIoniz
Definition: conv.h:166
realnum gas_phase[LIMELM]
Definition: dense.h:71
const int ipH_LIKE
Definition: iso.h:62
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:688
const int ipHELIUM
Definition: cddefines.h:310
void IonHelium(void)
Definition: ion_helium.cpp:12
bool lgSetIoniz[LIMELM]
Definition: dense.h:149
double ** RR_rate_coef_used
Definition: ionbal.h:212