cloudy
trunk
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
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
"
5
t_secondaries
secondaries
;
6
7
void
t_secondaries::zero
()
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.;
21
SecExcitLya2PrimaryErg
= 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
40
void
t_secondaries::alloc
()
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
}
t_secondaries::x12tot
realnum x12tot
Definition:
secondaries.h:65
t_secondaries::HeatEfficPrimary
realnum HeatEfficPrimary
Definition:
secondaries.h:24
t_secondaries::SecIon2PrimaryErg
realnum SecIon2PrimaryErg
Definition:
secondaries.h:28
secondaries.h
t_secondaries::SecHIonMax
realnum SecHIonMax
Definition:
secondaries.h:42
t_secondaries::SetCsupra
realnum SetCsupra
Definition:
secondaries.h:45
MALLOC
#define MALLOC(exp)
Definition:
cddefines.h:554
t_secondaries::sec2total
realnum sec2total
Definition:
secondaries.h:39
t_secondaries::alloc
void alloc()
Definition:
secondaries.cpp:40
t_secondaries
Definition:
secondaries.h:10
realnum
float realnum
Definition:
cddefines.h:124
t_secondaries::zero
void zero()
Definition:
secondaries.cpp:7
cddefines.h
LIMELM
const int LIMELM
Definition:
cddefines.h:308
DEBUG_ENTRY
#define DEBUG_ENTRY(funcname)
Definition:
cddefines.h:723
ipHELIUM
const int ipHELIUM
Definition:
cddefines.h:350
t_secondaries::csupra
realnum ** csupra
Definition:
secondaries.h:33
t_secondaries::csupra_effic
realnum ** csupra_effic
Definition:
secondaries.h:33
t_secondaries::SecExcitLya2PrimaryErg
realnum SecExcitLya2PrimaryErg
Definition:
secondaries.h:30
secondaries
t_secondaries secondaries
Definition:
secondaries.cpp:5
ipHYDROGEN
const int ipHYDROGEN
Definition:
cddefines.h:349
t_secondaries::lgSecOFF
bool lgSecOFF
Definition:
secondaries.h:52
t_secondaries::lgCSetOn
bool lgCSetOn
Definition:
secondaries.h:48
Generated by
1.8.5