cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
atmdat_dielrec_fe.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 /*atmdat_dielrec_fe Dielectronic recombination rates for Fe from Arnaud & Raymond 1992 */
4 #include "cddefines.h"
5 #include "atmdat.h"
6 #include "physconst.h"
7 
8 /*atmdat_dielrec_fe Dielectronic recombination rates for Fe from Arnaud & Raymond 1992 */
10  // ion on physics scale
11  long int ion,
12  // electron temperture
13  double t)
14 {
15  static const double dfe[25][8] = {
16  {5.120e00,1.29e01,0.00e00,0.00e00,2.20e-04,1.00e-04,0.00e00,0.00e00},
17  {1.670e01,3.14e01,0.00e00,0.00e00,2.30e-03,2.70e-03,0.00e00,0.00e00},
18  {2.860e01,5.21e01,0.00e00,0.00e00,1.50e-02,4.70e-03,0.00e00,0.00e00},
19  {3.730e01,6.74e01,0.00e00,0.00e00,3.80e-02,1.60e-02,0.00e00,0.00e00},
20  {5.420e01,1.00e02,0.00e00,0.00e00,8.00e-02,2.40e-02,0.00e00,0.00e00},
21  {4.550e01,3.60e02,0.00e00,0.00e00,9.20e-02,4.10e-02,0.00e00,0.00e00},
22  {6.670e01,1.23e02,0.00e00,0.00e00,1.60e-01,3.60e-02,0.00e00,0.00e00},
23  {6.610e01,1.29e02,0.00e00,0.00e00,1.80e-01,7.00e-02,0.00e00,0.00e00},
24  {2.160e01,1.36e02,0.00e00,0.00e00,1.40e-01,2.60e-01,0.00e00,0.00e00},
25  {2.220e01,1.44e02,0.00e00,0.00e00,1.00e-01,2.80e-01,0.00e00,0.00e00},
26  {5.960e01,3.62e02,0.00e00,0.00e00,2.25e-01,2.31e-01,0.00e00,0.00e00},
27  {7.500e01,2.05e02,0.00e00,0.00e00,2.40e-01,1.70e-01,0.00e00,0.00e00},
28  {3.630e01,1.93e02,0.00e00,0.00e00,2.60e-01,1.60e-01,0.00e00,0.00e00},
29  {3.940e01,1.98e02,0.00e00,0.00e00,1.90e-01,9.00e-02,0.00e00,0.00e00},
30  {2.460e01,2.48e02,5.60e02,0.00e00,1.20e-01,1.20e-01,6.00e-01,0.00e00},
31  {5.600e02,0.00e00,0.00e00,0.00e00,1.23e00,0.00e00,0.00e00,0.00e00},
32  {2.250e01,1.17e02,3.41e02,6.83e02,2.53e-03,3.36e-02,1.81e-01,1.92e00},
33  {1.620e01,9.60e01,3.30e02,7.29e02,5.67e-03,7.82e-02,3.18e-02,1.26e00},
34  {2.370e01,8.51e01,3.29e02,7.87e02,1.60e-02,7.17e-02,9.06e-02,7.39e-01},
35  {1.320e01,6.66e01,2.97e02,7.14e02,1.85e-02,9.53e-02,7.90e-02,1.23e00},
36  {3.910e01,8.03e01,3.92e02,9.19e02,9.20e-04,1.29e-01,1.92e-01,9.12e-01},
37  {7.320e01,3.16e02,8.77e02,0.00e00,1.31e-01,8.49e-02,6.13e-01,0.00e00},
38  {1.000e-01,3.62e01,3.06e02,9.28e02,1.10e-02,4.88e-02,8.01e-02,5.29e-01},
39  {4.625e03,6.00e03,0.00e00,0.00e00,2.56e-01,4.52e-01,0.00e00,0.00e00},
40  {5.300e03,0.00e00,0.00e00,0.00e00,4.30e-01,0.00e00,0.00e00,0.00e00}
41  };
42 
43  double rate, te;
44 
45  DEBUG_ENTRY( "atmdat_dielrec_fe()" );
46  /*Dielectronic recombination rates for Fe from
47  * >>refer Fe rec Arnaud, M. & Raymond, J. 1992, ApJ, 398, 394 */
48 
49  /* ion - spectroscopic symbol of final ion
50  * t - temperature, K
51  * d - rate coefficient, cm^3 s^-1 */
52 
53  if( ion > 26 )
54  {
55  fprintf( ioQQQ, " atmdat_dielrec_fe invalid ion%10ld\n", ion );
57  }
58 
59  else if( ion == 26 )
60  {
61  /* d is the rate */
62  rate = 0.0;
63  }
64 
65  else
66  {
67  te = t*EVRYD/TE1RYD;
68  rate = 0.0;
69  for( int j=0; j < 4; j++ )
70  {
71  int k = j + 4;
72  rate += (dfe[ion-1][k]*sexp(dfe[ion-1][j]/te));
73  }
74  rate = rate/powpq(t,3,2);
75  }
76  return rate;
77 }
sys_float sexp(sys_float x)
Definition: service.cpp:999
FILE * ioQQQ
Definition: cddefines.cpp:7
double atmdat_dielrec_fe(long int ion, double t)
#define EXIT_FAILURE
Definition: cddefines.h:168
#define cdEXIT(FAIL)
Definition: cddefines.h:482
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
double powpq(double x, int p, int q)
Definition: service.cpp:630
int fprintf(const Output &stream, const char *format,...)
Definition: service.cpp:1121