root/branches/newmole/source/atmdat_dielrec_fe.cpp

Revision 1780, 2.9 kB (checked in by rjrw, 11 months ago)

Merged from trunk r1738:1779

  • Property svn:eol-style set to native
Line 
1/* This file is part of Cloudy and is copyright (C)1978-2008 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 */
9double atmdat_dielrec_fe(long int ion, double t)
10{
11        static const double dfe[25][8] = {
12                {5.120e00,1.29e01,0.00e00,0.00e00,2.20e-04,1.00e-04,0.00e00,0.00e00},
13                {1.670e01,3.14e01,0.00e00,0.00e00,2.30e-03,2.70e-03,0.00e00,0.00e00},
14                {2.860e01,5.21e01,0.00e00,0.00e00,1.50e-02,4.70e-03,0.00e00,0.00e00},
15                {3.730e01,6.74e01,0.00e00,0.00e00,3.80e-02,1.60e-02,0.00e00,0.00e00},
16                {5.420e01,1.00e02,0.00e00,0.00e00,8.00e-02,2.40e-02,0.00e00,0.00e00},
17                {4.550e01,3.60e02,0.00e00,0.00e00,9.20e-02,4.10e-02,0.00e00,0.00e00},
18                {6.670e01,1.23e02,0.00e00,0.00e00,1.60e-01,3.60e-02,0.00e00,0.00e00},
19                {6.610e01,1.29e02,0.00e00,0.00e00,1.80e-01,7.00e-02,0.00e00,0.00e00},
20                {2.160e01,1.36e02,0.00e00,0.00e00,1.40e-01,2.60e-01,0.00e00,0.00e00},
21                {2.220e01,1.44e02,0.00e00,0.00e00,1.00e-01,2.80e-01,0.00e00,0.00e00},
22                {5.960e01,3.62e02,0.00e00,0.00e00,2.25e-01,2.31e-01,0.00e00,0.00e00},
23                {7.500e01,2.05e02,0.00e00,0.00e00,2.40e-01,1.70e-01,0.00e00,0.00e00},
24                {3.630e01,1.93e02,0.00e00,0.00e00,2.60e-01,1.60e-01,0.00e00,0.00e00},
25                {3.940e01,1.98e02,0.00e00,0.00e00,1.90e-01,9.00e-02,0.00e00,0.00e00},
26                {2.460e01,2.48e02,5.60e02,0.00e00,1.20e-01,1.20e-01,6.00e-01,0.00e00},
27                {5.600e02,0.00e00,0.00e00,0.00e00,1.23e00,0.00e00,0.00e00,0.00e00},
28                {2.250e01,1.17e02,3.41e02,6.83e02,2.53e-03,3.36e-02,1.81e-01,1.92e00},
29                {1.620e01,9.60e01,3.30e02,7.29e02,5.67e-03,7.82e-02,3.18e-02,1.26e00},
30                {2.370e01,8.51e01,3.29e02,7.87e02,1.60e-02,7.17e-02,9.06e-02,7.39e-01},
31                {1.320e01,6.66e01,2.97e02,7.14e02,1.85e-02,9.53e-02,7.90e-02,1.23e00},
32                {3.910e01,8.03e01,3.92e02,9.19e02,9.20e-04,1.29e-01,1.92e-01,9.12e-01},
33                {7.320e01,3.16e02,8.77e02,0.00e00,1.31e-01,8.49e-02,6.13e-01,0.00e00},
34                {1.000e-01,3.62e01,3.06e02,9.28e02,1.10e-02,4.88e-02,8.01e-02,5.29e-01},
35                {4.625e03,6.00e03,0.00e00,0.00e00,2.56e-01,4.52e-01,0.00e00,0.00e00},
36                {5.300e03,0.00e00,0.00e00,0.00e00,4.30e-01,0.00e00,0.00e00,0.00e00}
37        };
38
39        double rate, te;
40
41        DEBUG_ENTRY( "atmdat_dielrec_fe()" );
42        /*Dielectronic recombination rates for Fe from
43         * >>refer      fe      rec     Arnaud, M. & Raymond, J 1992, ApJ, 398, 394 */
44
45        /* ion - spectroscopic symbol of final ion
46         * t - temperature, K
47         * d - rate coefficient, cm^3 s^-1 */
48
49        if( ion > 26 )
50        {
51                fprintf( ioQQQ, " atmdat_dielrec_fe invalid ion%10ld\n", ion );
52                cdEXIT(EXIT_FAILURE);
53        }
54
55        else if( ion == 26 )
56        {
57                /* d is the rate */
58                rate = 0.0;
59        }
60
61        else
62        {
63                te = t*EVRYD/TE1RYD;
64                rate = 0.0;
65                for( int j=0; j < 4; j++ )
66                {
67                        int k = j + 4;
68                        rate += (dfe[ion-1][k]*sexp(dfe[ion-1][j]/te));
69                }
70                rate = rate/pow(t,1.5);
71        }
72        return rate;
73}
Note: See TracBrowser for help on using the browser.