cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
secondaries.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 #include "cddefines.h"
4 #include "secondaries.h"
6 
8 {
9  DEBUG_ENTRY( "t_secondaries::zero()" );
10  /**********************************************************************
11  * all parameters having to do with secondary ionization
12  * by suprathermal electrons
13  **********************************************************************/
14  SetCsupra = 0.;
15  lgCSetOn = false;
16  lgSecOFF = false;
17  SecHIonMax = 0.;
18 
19  HeatEfficPrimary = 1.;
20  SecIon2PrimaryErg = 0.;
22  x12tot = 0.;
23  sec2total = 0.;
24 
25  for( long nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
26  {
27  for( long ion=0; ion<nelem+1; ++ion )
28  {
29  /* secondary ionization rate for each species */
30  csupra[nelem][ion] = 0.;
31  /* the rate of each species relative to H0 */
32  csupra_effic[nelem][ion] = 1.f;
33  }
34  }
35  /* this scale factor is from table 10 of Tielens & Hollenbach 1985 */
36  csupra_effic[ipHELIUM][0] = 1.08f;
37 
38 }
39 
41 {
42  /* malloc space for supra[nelem][ion] */
43  csupra = (realnum **)MALLOC( (unsigned)LIMELM*sizeof(realnum *) );
44  csupra_effic = (realnum **)MALLOC( (unsigned)LIMELM*sizeof(realnum *) );
45  for( long nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
46  {
47  csupra[nelem] = (realnum *)MALLOC( (unsigned)(nelem+1)*sizeof(realnum) );
48  csupra_effic[nelem] = (realnum *)MALLOC( (unsigned)(nelem+1)*sizeof(realnum) );
49  }
50 }
realnum x12tot
Definition: secondaries.h:65
realnum HeatEfficPrimary
Definition: secondaries.h:24
realnum SecIon2PrimaryErg
Definition: secondaries.h:28
realnum SecHIonMax
Definition: secondaries.h:42
realnum SetCsupra
Definition: secondaries.h:45
#define MALLOC(exp)
Definition: cddefines.h:554
realnum sec2total
Definition: secondaries.h:39
float realnum
Definition: cddefines.h:124
const int LIMELM
Definition: cddefines.h:308
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
const int ipHELIUM
Definition: cddefines.h:350
realnum ** csupra
Definition: secondaries.h:33
realnum ** csupra_effic
Definition: secondaries.h:33
realnum SecExcitLya2PrimaryErg
Definition: secondaries.h:30
t_secondaries secondaries
Definition: secondaries.cpp:5
const int ipHYDROGEN
Definition: cddefines.h:349