cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hydrooscilstr.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 /*HydroOscilStr computes hydrogenic oscillator strengths, used in the function hdexct. */
4 #include "cddefines.h"
5 #include "hydrooscilstr.h"
6 #include "physconst.h"
7 
8 double HydroOscilStr(double xLower,
9  double Upper)
10 {
11  double fosc_v,
12  gaunt,
13  gnt0,
14  gnt1,
15  gnt2,
16  x;
17 
18  DEBUG_ENTRY( "HydroOscilStr()" );
19 
20  /* >>refer H1 As Johnson L.C., 1972 ApJ 174 227*/
21  /* check order, and that none negative */
22  ASSERT( xLower < Upper );
23  ASSERT( xLower*Upper >0 );
24 
25  x = 1.0 - POW2(xLower/Upper);
26  if( xLower >= 3 )
27  {
28  gnt0 = 0.9935 + 0.2328/xLower - 0.1296/xLower/xLower;
29  gnt1 = -(0.6282 - 0.5598/xLower + 0.5299/xLower/xLower)/xLower;
30  gnt2 = (0.3887 - 1.181/xLower + 1.470/xLower/xLower)/xLower/
31  xLower;
32  }
33  else if( xLower == 2 )
34  {
35  gnt0 = 1.0785;
36  gnt1 = -.2319;
37  gnt2 = 0.02947;
38  }
39  else
40  {
41  gnt0 = 1.1330;
42  gnt1 = -.4059;
43  gnt2 = 0.07014;
44  }
45  gaunt = gnt0 + gnt1/x + gnt2/x/x;
46  fosc_v = 32./3./PI/sqrt(3.)*xLower/POW3(Upper)*gaunt/x/x/x;
47  return( fosc_v );
48 }
double HydroOscilStr(double xLower, double Upper)
#define POW2
Definition: cddefines.h:979
#define ASSERT(exp)
Definition: cddefines.h:613
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
#define POW3
Definition: cddefines.h:986