cloudy trunk
Loading...
Searching...
No Matches
atmdat_ligbar.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/*ligbar obtain collision strength for any Li-sequence line */
4#include "cddefines.h"
5#include "physconst.h"
6#include "dense.h"
7#include "phycon.h"
8#include "ligbar.h"
9#include "transition.h"
10
11void ligbar(long int ized,
12 const TransitionProxy& t2s2p,
13 const TransitionProxy& t2s3p,
14 double *cs2s2p,
15 double *cs2s3p)
16{
17 double a,
18 b,
19 c,
20 excit,
21 gbar;
22
23 DEBUG_ENTRY( "ligbar()" );
24
25 /* compute collision strength for Li-seq g-bar approx
26 * summarized in Cochrane and McWhirter Physica Scripta 28, 25.
27 * ized is nuclear charge, can be anything larger than 2
28 * Kirk Korista
29 *
30 * ized is nuclear charge, 6 for carbon, etc
31 * t2s2p is tau array for stronger memeber of 2s 2p multiplet,
32 * which is treated as two separate lines
33 * t2s3p is next transition up, treated as an averaged multiplet
34 *
35 * cs2s2p is the cs for the single 2s2p line that comes in
36 * cs2s3p is the multiplet cs for that transition, which is
37 * treated as a multiplet average. If t2s3p is ever separated
38 * (as t2s2p was) then cs2s3p will be the single line not the multiplet
39 *
40 * T2S2P, T2S3P are line information array, defined in block data
41 */
42
43 /* no need to evaluate coll strength if population is zero */
44 if(dense.xIonDense[ (*t2s2p.Hi()).nelem() -1 ][ (*t2s2p.Hi()).IonStg()-1 ] == 0)
45 {
46 *cs2s2p = 1.;
47 *cs2s3p = 1.;
48 return;
49 }
50
51 if( ized < 3 )
52 {
53 /* this is a sanity check */
54 fprintf( ioQQQ, " LIGBAR called with insane charge, ized=%4ld\n",
55 ized );
56 ShowMe();
58 }
59
60 else if( ized == 6 )
61 {
62 /* CIV 1549 */
63 a = 0.292;
64 b = 0.289;
65 c = 2.67;
66 }
67
68 else if( ized == 7 )
69 {
70 /* NV 1240 */
71 a = 0.387;
72 b = 0.247;
73 c = 3.93;
74 }
75
76 else if( ized == 8 )
77 {
78 /* OVI 1035 -- values interpolated */
79 a = 0.40;
80 b = 0.256;
81 c = 4.12;
82 }
83
84 else if( ized == 10 )
85 {
86 /* NeVIII 774 */
87 a = 0.426;
88 b = 0.273;
89 c = 4.50;
90 }
91
92 else if( ized == 12 )
93 {
94 /* Mg 10 615 -- these values are general */
95 a = 0.45;
96 b = 0.27;
97 c = 5.0;
98 }
99
100 else if( ized == 18 )
101 {
102 /* Ar 16 365 */
103 a = 0.311;
104 b = 0.294;
105 c = 6.65;
106 }
107
108 else if( ized == 26 )
109 {
110 /* Fe 24 213 */
111 a = 0.435;
112 b = 0.314;
113 c = 6.92;
114 }
115
116 else
117 {
118 /* use general formula for all other cases */
119 a = 0.6 - 1.5/((realnum)(ized) - 2.);
120 b = 0.27;
121 c = 5.;
122 }
123
124 /* evaluate expression in terms of coefficients
125 * tarray(ipLnBolt) = line energy in degrees kelvin */
126 excit = t2s2p.EnergyK()/phycon.te;
127
128 /* excit = e1/(te * 1.380622e-16) */
129 gbar = a + b*log(1./excit+c);
130
131 /* tarray(ipLnGF) = gf; tarray(ipLnBolt) excit temp kelvin */
132 /*
133 *cs2s2p = gbar*197.47*EVDEGK*t2s2p.Lo->gf()/t2s2p.EnergyK;
134 */
135 *cs2s2p = gbar*197.47*EVDEGK*t2s2p.Emis().gf()/t2s2p.EnergyK();
136 /* small correction factors to CMcW83 2s-2p fits:
137 * fits 3.57% too small compared to R-matrix calc. for Mg X.
138 * scaled all, initially, by this constant. Pradhan & Peng (1994)
139 * compilation cites a pc with Burgess, which further scales
140 * cs(C IV) by 1.0429 and cs(N V) by 0.9691, approximately.
141 * The scaled cs(OVI) matched well with Burgess, so no further
142 * scaling was done for more highly ionized species. */
143
144 if( ized == 6 )
145 {
146 *cs2s2p *= 1.08013;
147 }
148
149 else if( ized == 7 )
150 {
151 *cs2s2p *= 1.00370;
152 }
153
154 else
155 {
156 *cs2s2p *= 1.0357;
157 }
158
159
160 /* use general formula for 2s3p */
161 a = -0.244;
162 b = 0.25;
163 c = 4.;
164
165 /* excit = e2/(te * 1.380622e-16) */
166 excit = t2s3p.EnergyK()/phycon.te;
167 gbar = a + b*log(1./excit+c);
168 /* tarray(ipLnGF) = gf */
170 *cs2s3p = gbar*197.47*EVDEGK*t2s3p.Emis().gf()/t2s3p.EnergyK();
171 /* cs2s3p = gbar * 197.47*eVdegK * GF2/(e2/1.60184e-12)
172 * */
173 return;
174}
void ligbar(long int ized, const TransitionProxy &t2s2p, const TransitionProxy &t2s3p, double *cs2s2p, double *cs2s3p)
FILE * ioQQQ
Definition cddefines.cpp:7
#define EXIT_FAILURE
Definition cddefines.h:140
#define cdEXIT(FAIL)
Definition cddefines.h:434
float realnum
Definition cddefines.h:103
#define DEBUG_ENTRY(funcname)
Definition cddefines.h:684
void ShowMe(void)
Definition service.cpp:181
realnum & gf() const
Definition emission.h:513
realnum EnergyK() const
Definition transition.h:73
qList::iterator Hi() const
Definition transition.h:396
EmissionList::reference Emis() const
Definition transition.h:408
t_dense dense
Definition dense.cpp:24
t_phycon phycon
Definition phycon.cpp:6
UNUSED const double EVDEGK
Definition physconst.h:186