Main Page   Compound List   File List   Compound Members   File Members  

ReactorXC.hh File Reference

ReactorXC defines several useful functions for ReactorFsim. More...

#include <math.h>
#include <iostream.h>
#include <string>

Go to the source code of this file.

Functions

double U235flux (double)
double RMPflux (double)
double InverseBeta (double, double, int order=1)
void PositronRange (double, double &, double &)
double GammaComptonRange (std::string, double)
 Returns the mean free path of photons through a given material. More...

void MyGdDecayModel (double, int &, double *)
void NeutronPropagator (double R0, double R2, double &ke, double &a, double &pass, double *pn, double *rn, double &tn)


Detailed Description

ReactorXC defines several useful functions for ReactorFsim.

The individual functions are implimented in their respective cpp files.

Author: Tim Bolton

Definition in file ReactorXC.hh.


Function Documentation

double GammaComptonRange std::string   ,
double   
 

Returns the mean free path of photons through a given material.

The function GammaComptonRange is implimented in GammaComptonRange.cpp. The first input is a string defining the material through which the photon propogates. The supported materials are "scintillator" and "oil" which are defined by ReactorConstants.hh. The second input is the energy of the photon entering the material. The function returns a double equal to the mean free path calculated with the Klein-Nishina cross section.

Definition at line 13 of file GammaComptonRange.cpp.

00013                                                           {
00014 
00015   //cout << "gamma propogating through " << material << endl;
00016   //
00017   // Compute the mean free path for Compton scattering.
00018   //
00019   static ReactorConstants k;
00020   static double pi = k.pi;
00021   static double m = k.Melectron;
00022   static double alpha = 1/k.alphainv;
00023   static double Units = k.XcMeVtoCmsqrd;
00024   //
00025   // Overall cross section scale
00026   //
00027   static double Thomson = 8*pi*alpha*alpha/3/m/m*Units;
00028   double w = egamma/m;
00029   //
00030   // Klein-Nishina cross section
00031   //
00032   double XC = 3*Thomson/4*
00033     ((1+w)/w/w/w*(2*w*(1+w)/(1+2*w)-log(1+2*w))
00034      +log(1+2*w)/2/w-(1+3*w)/(1+2*w)/(1+2*w));
00035   //
00036   // Need electron density to get mfp. Get H and C contributions.
00037   //
00038   static double density = k.density;
00039   static double Na = k.Navogadro;
00040   static double A[2] = {k.A0,k.A1};
00041   static double Z[2] = {k.Z0,k.Z1};
00042   static double f[2];
00043   if(material == "scintillator"){
00044     f[0] = k.f0;
00045     f[1] = k.f1;
00046   }
00047   else if(material == "oil"){
00048     f[0] = k.f4;
00049     f[1] = k.f5;
00050   }
00051   else{
00052     cout << "GammaComptonRange: " << material 
00053          << " is an unknown material!  Assuming scintillator." << endl;
00054     f[0] = k.f0;
00055     f[1] = k.f1;
00056   }    
00057   //for(int i=0;i<2;i++) cout << "f["<<i<<"] " << f[i] << endl;
00058   static double nel[2];
00059   static bool first = 1;
00060   for(int i=0;i<2;i++){
00061     nel[i]=Na*density*f[i]*Z[i]/A[i];
00062     first = 0;
00063   }
00064   //
00065   //  Compute mean free path.
00066   //  
00067   return 1/((nel[0]+nel[1])*XC);
00068 }


Generated on Thu Jul 29 14:27:04 2004 for ReactorFsim by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002