/home66/gary/public_html/cloudy/c10_branch/source/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 4346 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 740 of file hydro_bauman.cpp.

References ASSERT, bhintegrand(), and DEBUG_ENTRY.

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 777 of file hydro_bauman.cpp.

References ASSERT, bhintegrand_log(), and DEBUG_ENTRY.

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 2051 of file hydro_bauman.cpp.

References ASSERT, bhG(), DEBUG_ENTRY, 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 1006 of file hydro_bauman.cpp.

References ASSERT, bhGm(), bhGp(), cdEXIT, DEBUG_ENTRY, 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 2111 of file hydro_bauman.cpp.

References ASSERT, bhG_mx(), DEBUG_ENTRY, 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 1100 of file hydro_bauman.cpp.

References ASSERT, bhGm_mx(), bhGp_mx(), cdEXIT, DEBUG_ENTRY, 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 1694 of file hydro_bauman.cpp.

References ASSERT, and DEBUG_ENTRY.

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 1838 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, 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 1315 of file hydro_bauman.cpp.

References ASSERT, and DEBUG_ENTRY.

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 1466 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, 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 830 of file hydro_bauman.cpp.

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

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 909 of file hydro_bauman.cpp.

References ASSERT, bhg_log(), DEBUG_ENTRY, max(), 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 3842 of file hydro_bauman.cpp.

References ASSERT, CALLOC, DEBUG_ENTRY, 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 3955 of file hydro_bauman.cpp.

References ASSERT, CALLOC, DEBUG_ENTRY, 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 4067 of file hydro_bauman.cpp.

References ASSERT, and DEBUG_ENTRY.

Referenced by F21().

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

Definition at line 4168 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, 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 3450 of file hydro_bauman.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, 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 2322 of file hydro_bauman.cpp.

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

Referenced by DrvHyas(), FillExtraLymanLine(), he_1trans(), hydro_transprob(), 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 2356 of file hydro_bauman.cpp.

References cdEXIT, CONST_ONE, DEBUG_ENTRY, 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 2407 of file hydro_bauman.cpp.

References cdEXIT, CONST_ONE, DEBUG_ENTRY, 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 564 of file hydro_bauman.cpp.

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

Referenced by cross_section(), H_cross_section(), Opacity_iso_photo_cs(), and SanityCheckBegin().

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 594 of file hydro_bauman.cpp.

References ASSERT, bh(), cdEXIT, DEBUG_ENTRY, 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, quantities 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 principal 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 665 of file hydro_bauman.cpp.

References ASSERT, bh_log(), CALLOC, cdEXIT, DEBUG_ENTRY, 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 integral,  
      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 2559 of file hydro_bauman.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, 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 integral,  
  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 2649 of file hydro_bauman.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, 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 2706 of file hydro_bauman.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, 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 3010 of file hydro_bauman.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, F21_mx(), lfactorial(), log10_fsff(), t_mx::m, pow(), 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]
double local_product ( double  K,
long int  lp 
) [inline]

Definition at line 2227 of file hydro_bauman.cpp.

Referenced by bhg().

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

Definition at line 3602 of file hydro_bauman.cpp.

References ASSERT, DEBUG_ENTRY, 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 4423 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 4412 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 4375 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 4391 of file hydro_bauman.cpp.

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

Referenced by bhg_log(), and bhG_mx().

Here is the call graph for this function:

void normalize_mx ( mx target  )  [inline]

Definition at line 4331 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 3781 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 3818 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 4363 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 4386 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 537 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 560 of file hydro_bauman.cpp.

Referenced by H_photo_cs_lin(), and H_photo_cs_log10().

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Nov 2012 for cloudy by  doxygen 1.6.1