cloudy  trunk
hydro_recom.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 /*H_cross_section returns cross section (cm^-2),
4  * given EgammaRyd, the photon energy in Ryd,
5  * ipLevel, the index of the level, 0 is ground,
6  * nelem is charge, equal to 0 for Hydrogen */
7 #include "cddefines.h"
8 #include "physconst.h"
9 #include "hydro_bauman.h"
10 #include "iso.h"
11 #include "helike.h"
12 #include "dense.h"
13 #include "opacity.h"
14 #include "atmdat.h"
15 #include "taulines.h"
16 
17 /*H_cross_section returns cross section (cm^-2),
18  * given EgammaRyd, the photon energy in Ryd,
19  * EthRyd, the threshold energy in Ryd,
20  * quantum numbers n and l
21  * nelem is charge, equal to 0 for Hydrogen */
22 double H_cross_section( double EgammaRyd , double EthRyd, long n, long l, long nelem )
23 {
24  double cs;
25  double rel_photon_energy;
26 
27  /* >>chng 02 apr 24, more protection against calling with too small an energy */
28  /* evaluating H-like photo cs at He energies, may be below threshold -
29  * prevent this from happening */
30  rel_photon_energy = EgammaRyd / EthRyd;
31  rel_photon_energy = MAX2( rel_photon_energy , 1. + FLT_EPSILON*2. );
32 
33  cs = H_photo_cs(rel_photon_energy , n, l, nelem + 1 );
34 
35  ASSERT( cs > 0. && cs < 1.E-8 );
36 
37  return cs;
38 }
helike.h
hydro_bauman.h
ASSERT
#define ASSERT(exp)
Definition: cddefines.h:578
iso.h
atmdat.h
H_cross_section
double H_cross_section(double EgammaRyd, double EthRyd, long n, long l, long nelem)
Definition: hydro_recom.cpp:22
dense.h
cddefines.h
MAX2
#define MAX2
Definition: cddefines.h:782
physconst.h
taulines.h
opacity.h
H_photo_cs
double H_photo_cs(double rel_photon_energy, long int n, long int l, long int iz)
Definition: hydro_bauman.cpp:564