hydro_bauman.cpp File Reference

#include "cddefines.h"
#include "physconst.h"
#include "thirdparty.h"
#include "hydro_bauman.h"

Include dependency graph for hydro_bauman.cpp:

Go to the source code of this file.

Data Structures

struct  t_mx
struct  t_mxq

Typedefs

typedef struct t_mx mx
typedef struct t_mxq mxq

Functions

STATIC double H_photo_cs_lin (double rel_photon_energy, long int n, long int l, long int iz)
double H_photo_cs_log10 (double photon_energy, long int n, long int l, long int iz)
STATIC double H_Einstein_A_lin (long int n, long int l, long int np, long int lp, long int iz)
double H_Einstein_A_log10 (long int n, long int l, long int np, long int lp, long int iz)
double OscStr_f (long int n, long int l, long int np, long int lp, long int iz)
double OscStr_f_log10 (long int n, long int l, long int np, long int lp, long int iz)
STATIC double F21 (long int a, long int b, long int c, double y, char A)
STATIC double F21i (long int a, long int b, long int c, double y, double *yV)
double hv (long int n, long int nprime, long int iz)
STATIC double fsff (long int n, long int l, long int np)
STATIC double log10_fsff (long int n, long int l, long int np)
STATIC mx F21_mx (long int a, long int b, long int c, double y, char A)
STATIC mx F21i_log (long int a, long int b, long int c, double y, mxq *yV)
double hri (long int n, long int l, long int np, long int lp, long int iz)
double hri_log10 (long int n, long int l, long int np, long int lp, long int iz)
STATIC double hrii (long int n, long int l, long int np, long int lp)
STATIC double hrii_log (long int n, long int l, long int np, long int lp)
STATIC double bh (double k, long int n, long int l, double *rcsvV)
STATIC double bh_log (double k, long int n, long int l, mxq *rcsvV_mxq)
STATIC double bhintegrand (double k, long int n, long int l, long int lp, double *rcsvV)
STATIC double bhintegrand_log (double k, long int n, long int l, long int lp, mxq *rcsvV_mxq)
STATIC double bhG (double K, long int n, long int l, long int lp, double *rcsvV)
STATIC mx bhG_mx (double K, long int n, long int l, long int lp, mxq *rcsvV_mxq)
STATIC double bhGp (long int q, double K, long int n, long int l, long int lp, double *rcsvV, double GK)
STATIC mx bhGp_mx (long int q, double K, long int n, long int l, long int lp, mxq *rcsvV_mxq, const mx &GK_mx)
STATIC double bhGm (long int q, double K, long int n, long int l, long int lp, double *rcsvV, double GK)
STATIC mx bhGm_mx (long int q, double K, long int n, long int l, long int lp, mxq *rcsvV_mxq, const mx &GK_mx)
STATIC double bhg (double K, long int n, long int l, long int lp, double *rcsvV)
STATIC double bhg_log (double K, long int n, long int l, long int lp, mxq *rcsvV_mxq)
void normalize_mx (mx &target)
mx add_mx (const mx &a, const mx &b)
mx sub_mx (const mx &a, const mx &b)
mx mxify (double a)
double unmxify (const mx &a_mx)
mx mxify_log10 (double log10_a)
mx mult_mx (const mx &a, const mx &b)
double local_product (double K, long int lp)
double log10_prodxx (long int lp, double Ksqrd)
double H_photo_cs (double rel_photon_energy, long int n, long int l, long int iz)
double H_Einstein_A (long int n, long int l, long int np, long int lp, long int iz)

Variables

static const double CONST_ONE = 32.*pow3(PI)*pow2(BOHR_RADIUS_CM)*FINE_STRUCTURE/(3.*pow2(SPEEDLIGHT))
static const double PHYSICAL_CONSTANT_TWO = 4./3.*PI*FINE_STRUCTURE*pow2(BOHR_RADIUS_CM)


Typedef Documentation

typedef struct t_mx mx

Definition at line 26 of file hydro_bauman.cpp.

typedef struct t_mxq mxq

Definition at line 34 of file hydro_bauman.cpp.


Function Documentation

mx add_mx ( const mx a,
const mx b 
) [inline]

Definition at line 4459 of file hydro_bauman.cpp.

References t_mx::m, normalize_mx(), powi(), and t_mx::x.

Referenced by sub_mx().

Here is the call graph for this function:

STATIC double bh ( double  k,
long int  n,
long int  l,
double *  rcsvV 
)

Definition at line 752 of file hydro_bauman.cpp.

References ASSERT, bhintegrand(), DEBUG_ENTRY, and DEBUG_EXIT.

Referenced by H_photo_cs_lin().

Here is the call graph for this function:

STATIC double bh_log ( double  k,
long int  n,
long int  l,
mxq rcsvV_mxq 
)

Definition at line 791 of file hydro_bauman.cpp.

References ASSERT, bhintegrand_log(), DEBUG_ENTRY, and DEBUG_EXIT.

Referenced by H_photo_cs_log10().

Here is the call graph for this function:

STATIC double bhg ( double  K,
long int  n,
long int  l,
long int  lp,
double *  rcsvV 
)

Definition at line 2106 of file hydro_bauman.cpp.

References ASSERT, bhG(), DEBUG_ENTRY, DEBUG_EXIT, factorial(), local_product(), and powi().

Referenced by bhintegrand().

Here is the call graph for this function:

STATIC double bhG ( double  K,
long int  n,
long int  l,
long int  lp,
double *  rcsvV 
)

Definition at line 1026 of file hydro_bauman.cpp.

References ASSERT, bhGm(), bhGp(), cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, factorial(), PI, powi(), and SQRTPIBY2.

Referenced by bhg().

Here is the call graph for this function:

STATIC double bhg_log ( double  K,
long int  n,
long int  l,
long int  lp,
mxq rcsvV_mxq 
)

Definition at line 2168 of file hydro_bauman.cpp.

References ASSERT, bhG_mx(), DEBUG_ENTRY, DEBUG_EXIT, lfactorial(), log10_prodxx(), mult_mx(), mxify_log10(), normalize_mx(), and unmxify().

Referenced by bhintegrand_log().

Here is the call graph for this function:

STATIC mx bhG_mx ( double  K,
long int  n,
long int  l,
long int  lp,
mxq rcsvV_mxq 
)

Definition at line 1123 of file hydro_bauman.cpp.

References ASSERT, bhGm_mx(), bhGp_mx(), cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, lfactorial(), LOG10_E, mxify_log10(), PI, and SQRTPIBY2.

Referenced by bhg_log().

Here is the call graph for this function:

STATIC double bhGm ( long int  q,
double  K,
long int  n,
long int  l,
long int  lp,
double *  rcsvV,
double  GK 
)

Definition at line 1735 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, and DEBUG_EXIT.

Referenced by bhG().

STATIC mx bhGm_mx ( long int  q,
double  K,
long int  n,
long int  l,
long int  lp,
mxq rcsvV_mxq,
const mx GK_mx 
)

Definition at line 1886 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, mult_mx(), t_mxq::mx, mxify(), normalize_mx(), t_mxq::q, and sub_mx().

Referenced by bhG_mx().

Here is the call graph for this function:

STATIC double bhGp ( long int  q,
double  K,
long int  n,
long int  l,
long int  lp,
double *  rcsvV,
double  GK 
)

Definition at line 1341 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, and DEBUG_EXIT.

Referenced by bhG().

STATIC mx bhGp_mx ( long int  q,
double  K,
long int  n,
long int  l,
long int  lp,
mxq rcsvV_mxq,
const mx GK_mx 
)

Definition at line 1500 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, mult_mx(), t_mxq::mx, mxify(), normalize_mx(), t_mxq::q, and sub_mx().

Referenced by bhG_mx().

Here is the call graph for this function:

STATIC double bhintegrand ( double  k,
long int  n,
long int  l,
long int  lp,
double *  rcsvV 
)

Definition at line 846 of file hydro_bauman.cpp.

References ASSERT, bhg(), DEBUG_ENTRY, and DEBUG_EXIT.

Referenced by bh().

Here is the call graph for this function:

STATIC double bhintegrand_log ( double  k,
long int  n,
long int  l,
long int  lp,
mxq rcsvV_mxq 
)

Definition at line 927 of file hydro_bauman.cpp.

References ASSERT, bhg_log(), DEBUG_ENTRY, DEBUG_EXIT, E, and MAX2.

Referenced by bh_log().

Here is the call graph for this function:

STATIC double F21 ( long int  a,
long int  b,
long int  c,
double  y,
char  A 
)

Definition at line 3938 of file hydro_bauman.cpp.

References ASSERT, CALLOC, DEBUG_ENTRY, DEBUG_EXIT, and F21i().

Referenced by hrii().

Here is the call graph for this function:

STATIC mx F21_mx ( long int  a,
long int  b,
long int  c,
double  y,
char  A 
)

Definition at line 4053 of file hydro_bauman.cpp.

References ASSERT, CALLOC, DEBUG_ENTRY, DEBUG_EXIT, and F21i_log().

Referenced by hrii_log().

Here is the call graph for this function:

STATIC double F21i ( long int  a,
long int  b,
long int  c,
double  y,
double *  yV 
)

Definition at line 4167 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, and DEBUG_EXIT.

Referenced by F21().

STATIC mx F21i_log ( long int  a,
long int  b,
long int  c,
double  y,
mxq yV 
)

Definition at line 4274 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, t_mx::m, t_mxq::mx, powi(), t_mxq::q, and t_mx::x.

Referenced by F21_mx().

Here is the call graph for this function:

STATIC double fsff ( long int  n,
long int  l,
long int  np 
)

Definition at line 3537 of file hydro_bauman.cpp.

References ASSERT, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, factorial(), is_odd(), and powi().

Referenced by hrii().

Here is the call graph for this function:

double H_Einstein_A ( long int  n,
long int  l,
long int  np,
long int  lp,
long int  iz 
)

Calculates the Einstein A's for hydrogen                           
   for the transition n,l --> n',l'                                   
   units of sec^(-1)
                                                                      
   In the following, we have n > n' 
Parameters:
n principal quantum number, 1 for ground, upper level
l angular momentum, 0 for s
np principal quantum number, 1 for ground, lower level
lp angular momentum, 0 for s
iz Nuclear charge, 1 for H+, 2 for He++, etc

Definition at line 2381 of file hydro_bauman.cpp.

References DEBUG_ENTRY, DEBUG_EXIT, H_Einstein_A_lin(), and H_Einstein_A_log10().

Referenced by he_1trans(), and SanityCheckBegin().

Here is the call graph for this function:

STATIC double H_Einstein_A_lin ( long int  n,
long int  l,
long int  np,
long int  lp,
long int  iz 
)

Definition at line 2417 of file hydro_bauman.cpp.

References cdEXIT(), CONST_ONE, DEBUG_ENTRY, DEBUG_EXIT, HPLANCK, hri(), hv(), ioQQQ, and pow3().

Referenced by H_Einstein_A().

Here is the call graph for this function:

double H_Einstein_A_log10 ( long int  n,
long int  l,
long int  np,
long int  lp,
long int  iz 
)

  Calculates the Einstein A's for hydrogen                           
   for the transition n,l --> n',l'                                   
  units of sec^(-1)                                                  
                                                                     
  In the following, we have n > n'
  
Parameters:
n principal quantum number, 1 for ground, upper level
l angular momentum, 0 for s
np principal quantum number, 1 for ground, lower level
lp angular momentum, 0 for s
iz Nuclear charge, 1 for H+, 2 for He++, etc

Definition at line 2474 of file hydro_bauman.cpp.

References cdEXIT(), CONST_ONE, DEBUG_ENTRY, DEBUG_EXIT, HPLANCK, hri_log10(), hv(), ioQQQ, and pow3().

Referenced by H_Einstein_A().

Here is the call graph for this function:

double H_photo_cs ( double  photon_energy,
long int  n,
long int  l,
long int  iz 
)

returns hydrogenic photoionization cross section in cm-2

Parameters:
photon_energy photon energy relative to threshold
n principal quantum number, 1 for ground
l angular momentum, 0 for s
iz charge, 1 for H+, 2 for He++, etc

Definition at line 565 of file hydro_bauman.cpp.

References DEBUG_ENTRY, DEBUG_EXIT, H_photo_cs_lin(), and H_photo_cs_log10().

Referenced by cross_section(), and Opacity_iso_photo_cs().

Here is the call graph for this function:

STATIC double H_photo_cs_lin ( double  rel_photon_energy,
long int  n,
long int  l,
long int  iz 
)

Definition at line 597 of file hydro_bauman.cpp.

References ASSERT, bh(), cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, NPRE_FACTORIAL, PHYSICAL_CONSTANT_TWO, and Z.

Referenced by H_photo_cs().

Here is the call graph for this function:

double H_photo_cs_log10 ( double  photon_energy,
long int  n,
long int  l,
long int  iz 
)

************************* for LOG version of the file  ***************************************
 In this version, quantites that would normal cause a 64-bit floating point processor        
 to underflowed or overflow on intermediate values (ones internal to the calculation)         
 are evaluated using logs. This allows us to use an upper principle quantum number `n'        
 greater than 50 which is where the other version begins to fail. The trade-off is,           
 of course, lower accuracy( or is it precision ) and perhaps speed.                           
      We use LOG_10 for convenience.                                                          
**********************************************************************************************
 The functions which are evaluated using logarithms are denoted with a trailing underscore.   
      example:   hri_() calculates the same thing as hri_log10()                              
      except it uses logs internally.                                                         
**********************************************************************************************
 these are the hydrogenic routines written by Robert Bauman                                   
      For references, see h_bauman.c                                                          
**********************************************************************************************
  IN THE FOLLOWING WE HAVE  n > n'                                                            
Returns:
returns hydrogenic photoionization cross section in cm-2
Parameters:
photon_energy incident photon energy
n principal quantum number, 1 for ground
l angular momentum, 0 for s
iz charge, 1 for H+, 2 for He++, etc

Definition at line 673 of file hydro_bauman.cpp.

References ASSERT, bh_log(), CALLOC, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, MAX2, PHYSICAL_CONSTANT_TWO, and Z.

Referenced by H_photo_cs().

Here is the call graph for this function:

double hri ( long int  n,
long int  l,
long int  np,
long int  lp,
long int  iz 
) [inline]

     This routine, hri(), calculates the hydrogen radial intergral,  
      for the transition n,l --> n',l'                                
      It is, of course, dimensionless.                                
                                                                      
      In the following, we have n > n'    
     
Parameters:
n principal quantum number, 1 for ground, upper level
l angular momentum, 0 for s
np principal quantum number, 1 for ground, lower level
lp angular momentum, 0 for s
iz Nuclear charge, 1 for H+, 2 for He++, etc

Definition at line 2630 of file hydro_bauman.cpp.

References ASSERT, cdEXIT(), hrii(), and Z.

Referenced by H_Einstein_A_lin(), and OscStr_f().

Here is the call graph for this function:

double hri_log10 ( long int  n,
long int  l,
long int  np,
long int  lp,
long int  iz 
) [inline]

  This routine, hri_log10(), calculates the hydrogen radial intergral,  
  for the transition n,l --> n',l'                                      
  It is, of course, dimensionless.                                      
                                                                        
  In the following, we have n > n'   
Parameters:
n principal quantum number, 1 for ground, upper level
l angular momentum, 0 for s
np principal quantum number, 1 for ground, lower level
lp angular momentum, 0 for s
iz Nuclear charge, 1 for H+, 2 for He++, etc

Definition at line 2719 of file hydro_bauman.cpp.

References ASSERT, cdEXIT(), hrii_log(), and Z.

Referenced by H_Einstein_A_log10(), and OscStr_f_log10().

Here is the call graph for this function:

STATIC double hrii ( long int  n,
long int  l,
long int  np,
long int  lp 
)

Definition at line 2775 of file hydro_bauman.cpp.

References ASSERT, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, F21(), factorial(), fsff(), pow2(), and powi().

Referenced by hri().

Here is the call graph for this function:

STATIC double hrii_log ( long int  n,
long int  l,
long int  np,
long int  lp 
)

Definition at line 3089 of file hydro_bauman.cpp.

References ASSERT, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, F21_mx(), lfactorial(), log10_fsff(), t_mx::m, powi(), and t_mx::x.

Referenced by hri_log10().

Here is the call graph for this function:

double hv ( long int  n,
long int  nprime,
long int  iz 
) [inline]

Definition at line 2569 of file hydro_bauman.cpp.

References ASSERT, cdEXIT(), ELECTRON_MASS, EN1RYD, ioQQQ, and PROTON_MASS.

Referenced by H_Einstein_A_lin(), H_Einstein_A_log10(), OscStr_f(), and OscStr_f_log10().

Here is the call graph for this function:

double local_product ( double  K,
long int  lp 
) [inline]

Definition at line 2286 of file hydro_bauman.cpp.

Referenced by bhg().

STATIC double log10_fsff ( long int  n,
long int  l,
long int  np 
)

Definition at line 3696 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, and lfactorial().

Referenced by hrii_log().

Here is the call graph for this function:

double log10_prodxx ( long int  lp,
double  Ksqrd 
) [inline]

Definition at line 4536 of file hydro_bauman.cpp.

References ASSERT, and pow2().

Referenced by bhg_log().

Here is the call graph for this function:

mx mult_mx ( const mx a,
const mx b 
) [inline]

Definition at line 4525 of file hydro_bauman.cpp.

References t_mx::m, normalize_mx(), and t_mx::x.

Referenced by bhg_log(), bhGm_mx(), and bhGp_mx().

Here is the call graph for this function:

mx mxify ( double  a  )  [inline]

Definition at line 4488 of file hydro_bauman.cpp.

References t_mx::m, normalize_mx(), and t_mx::x.

Referenced by bhGm_mx(), and bhGp_mx().

Here is the call graph for this function:

mx mxify_log10 ( double  log10_a  )  [inline]

Definition at line 4504 of file hydro_bauman.cpp.

References t_mx::m, and t_mx::x.

Referenced by bhg_log(), and bhG_mx().

void normalize_mx ( mx target  )  [inline]

Definition at line 4444 of file hydro_bauman.cpp.

References t_mx::m, and t_mx::x.

Referenced by add_mx(), bhg_log(), bhGm_mx(), bhGp_mx(), mult_mx(), mxify(), and sub_mx().

double OscStr_f ( long int  n,
long int  l,
long int  np,
long int  lp,
long int  iz 
) [inline]

   Calc the Oscillator Strength f(*) given by                         
                                                                      
                     E(n,l;n',l')     max(l,l')  |              | 2   
   f(n,l;n',l') = -  ------------   ------------ | R(n,l;n',l') |     
                      3 R_oo         ( 2l + 1 )  |              |     
                                                                      
       f(n,l;n',l') is dimensionless.                                 
                                                                        
   See for example Gordan Drake's                                     
      Atomic, Molecular, & Optical Physics Handbook pg.638            
                                                                      
  In the following, we have n > n' 
  
Parameters:
n principal quantum number, 1 for ground, upper level
l angular momentum, 0 for s
np principal quantum number, 1 for ground, lower level
lp angular momentum, 0 for s
iz Nuclear charge, 1 for H+, 2 for He++, etc

Definition at line 3877 of file hydro_bauman.cpp.

References EN1RYD, hri(), and hv().

Here is the call graph for this function:

double OscStr_f_log10 ( long int  n,
long int  l,
long int  np,
long int  lp,
long int  iz 
) [inline]

   Calc the Oscillator Strength f(*) given by                         
                                                                      
                     E(n,l;n',l')     max(l,l')  |              | 2   
   f(n,l;n',l') = -  ------------   ------------ | R(n,l;n',l') |     
                      3 R_oo         ( 2l + 1 )  |              |     
                                                                      
       f(n,l;n',l') is dimensionless.                                 
                                                                        
   See for example Gordan Drake's                                     
      Atomic, Molecular, & Optical Physics Handbook pg.638            
                                                                      
  In the following, we have n > n'
  
Parameters:
n principal quantum number, 1 for ground, upper level
l angular momentum, 0 for s
np principal quantum number, 1 for ground, lower level
lp angular momentum, 0 for s
iz Nuclear charge, 1 for H+, 2 for He++, etc

Definition at line 3914 of file hydro_bauman.cpp.

References EN1RYD, hri_log10(), and hv().

Here is the call graph for this function:

mx sub_mx ( const mx a,
const mx b 
) [inline]

Definition at line 4476 of file hydro_bauman.cpp.

References add_mx(), t_mx::m, and normalize_mx().

Referenced by bhGm_mx(), and bhGp_mx().

Here is the call graph for this function:

double unmxify ( const mx a_mx  )  [inline]

Definition at line 4499 of file hydro_bauman.cpp.

References t_mx::m, powi(), and t_mx::x.

Referenced by bhg_log().

Here is the call graph for this function:


Variable Documentation

const double CONST_ONE = 32.*pow3(PI)*pow2(BOHR_RADIUS_CM)*FINE_STRUCTURE/(3.*pow2(SPEEDLIGHT)) [static]

Definition at line 538 of file hydro_bauman.cpp.

Referenced by H_Einstein_A_lin(), and H_Einstein_A_log10().

const double PHYSICAL_CONSTANT_TWO = 4./3.*PI*FINE_STRUCTURE*pow2(BOHR_RADIUS_CM) [static]

Definition at line 561 of file hydro_bauman.cpp.

Referenced by H_photo_cs_lin(), and H_photo_cs_log10().


Generated for cloudy by doxygen 1.5.9