cloudy trunk
Loading...
Searching...
No Matches
ion_nelem.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/*IonNelem ionization balance for elements without special cases */
4#include "cddefines.h"
5#include "trace.h"
6#include "dense.h"
7#include "ionbal.h"
8#include "mole.h"
9#include "oxy.h"
10#include "atmdat.h"
11
13 /* this is debug flag */
14 bool lgPrintIt,
15 /* nelem is the atomic number on the C scale, 0 for H */
16 long int nelem)
17{
18 DEBUG_ENTRY( "IonNelem()" );
19
20 if( dense.lgElmtOn[nelem] )
21 {
22 ion_zero(nelem);
23
24 ion_photo(nelem,lgPrintIt);
25
26 // collisional ionization rates
27 ion_collis(nelem);
28
29 // charge exchange
30 ion_CX( nelem );
31
32 // total recombination
33 ion_recomb(lgPrintIt,nelem);
34
35 /* solve for ionization balance */
36 ion_solver(nelem,lgPrintIt);
37
38 if( trace.lgTrace && trace.lgHeavyBug /*|| nelem==ipNICKEL*/ )
39 {
40 fprintf( ioQQQ, " IonNelem nelem\t%li\tfnzone\t%6.2f\tfrac\t",
41 nelem, fnzone );
42 for( int i=0; i < nelem+2; i++ )
43 {
44 fprintf( ioQQQ, "\t%10.3e", dense.xIonDense[nelem][i]/
45 dense.gas_phase[nelem] );
46 }
47 fprintf( ioQQQ, "\n" );
48 }
49 }
50
51 return;
52}
FILE * ioQQQ
Definition cddefines.cpp:7
double fnzone
Definition cddefines.cpp:15
#define DEBUG_ENTRY(funcname)
Definition cddefines.h:684
t_dense dense
Definition dense.cpp:24
void ion_collis(long int nelem)
void ion_CX(long nelem)
Definition ion_cx.cpp:14
void IonNelem(bool lgPrintIt, long int nelem)
Definition ion_nelem.cpp:12
void ion_photo(long int nelem, bool lgPrintIt)
Definition ion_photo.cpp:26
void ion_recomb(bool lgPrintIt, long int nelem)
void ion_solver(long int nelem, bool lgPrintIt)
void ion_zero(long int nelem)
Definition ion_zero.cpp:8
t_trace trace
Definition trace.cpp:5