Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

distrib_1d.hpp

Go to the documentation of this file.
00001 /*
00002  * ******** fete: From ENDF To ENDL *********
00003  * 
00004  * Copyright (c) 2006, The Regents of the University of California. 
00005  * All rights reserved.
00006  * 
00007  * Produced at the Lawrence Livermore National Laboratory. 
00008  * Written by David A. Brown, Gerry Hedstrom, Tony Hill
00009  * 
00010  * This file is part of fete v1.0  (UCRL-CODE-218718)
00011  * 
00012  * Please read the COPYING file for "Our Notice and GNU General 
00013  * Public License" in the root of this software distribution.  
00014  * 
00015  * This program is free software; you can redistribute it and/or modify 
00016  * it under the terms of the GNU General Public License (as published by 
00017  * the Free Software Foundation) version 2, dated June 1991. 
00018  * 
00019  * This program is distributed in the hope that it will be useful, 
00020  * but WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF 
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms 
00022  * and conditions of the GNU General Public License for more details. 
00023  * 
00024  * You should have received a copy of the GNU General Public License along 
00025  * with this program; if not, write to the Free Software Foundation, Inc., 
00026  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
00027  * 
00028  * $Revision: 1843 $
00029  * $Date: 2006-04-20 11:38:46 -0700 (Thu, 20 Apr 2006) $
00030  * $Author: dbrown $
00031  * $Id: distrib_1d.hpp 1843 2006-04-20 18:38:46Z dbrown $
00032  * 
00033  * ******** fete: From ENDF To ENDL *********
00034  */
00035 
00036 // header for the classes for energy and angle distributions
00037 // These classes are derived from distrib_base
00038 
00039 #ifndef ONE_D_DISTRIB_CLASS
00040 #define ONE_D_DISTRIB_CLASS
00041 
00042 #include "distrib_base.hpp"
00043 #include "math_util.hpp"  // Param class for the Legendre coefficients
00044 #include "messaging.hpp"
00045 #include "ENDF_file.hpp"
00046 
00047 // -------------------- class one_d_table ------------------
00048 class one_d_table : public distrib_base
00049 //! Used for tables of pairs at one incident neutron energy (i.e., energy of emitted particle and probability density).
00050 {
00051 private:
00052   // parameters used in lin-log or log-lin interpolation
00053   int interp_;
00054   double b_;
00055   double x_0_;
00056   double y_0_;
00057 
00058 public:
00059 
00060   //!Function for lin-log or log-lin interpolation between links
00061   double f(double E);
00062 
00063   one_d_table(): interp_(0), b_(0.0), x_0_(0.0), y_0_(0.0) {}
00064   ~one_d_table() {}
00065 
00066   //!A version of expand_interp which allows lin-log and log-lin interpolation
00067   void expand_interp( double Max_E );
00068 
00069   //! Copies a list
00070   void copy( one_d_table& list_2 );
00071 
00072   //! Returns the total multiplicity for lists of (energy for a gamma line, its multiplicity).
00073   double line_multiple( );
00074 
00075   //! Interpolates between two lists
00076   void list_interp(double e_in, one_d_table& left_list,
00077     one_d_table& right_list);
00078 
00079   //! Reads pair-wise data into a 2-column list
00080   void read_data( int NP, ENDF_file& inFile, double max_E );
00081 };
00082 
00083 // -------------------- class one_d_evap ------------------
00084 class one_d_evap : public distrib_base
00085 //! Used for the evaporation model at one incident neutron energy
00086 {
00087 private:
00088   double U_;
00089   double Theta_;
00090 
00091 public:
00092 
00093   double f(double E);
00094 
00095   one_d_evap();
00096   ~one_d_evap() {} 
00097 
00098   //! Sets up the parameters
00099   void initiate(double e_in, double Theta, double U);
00100 
00101   //! Copies a list
00102   void copy( one_d_evap& list_2 );
00103 
00104   //! Inserts the links for the extrema
00105   void extrema();
00106 
00107   //! Interpolates this list between left_list and right_list.
00108   void list_interp(double e_in, one_d_evap& left_list,
00109     one_d_evap& right_list);
00110 };
00111 
00112 // -------------------- class one_d_Maxwell ------------------
00113 class one_d_Maxwell : public distrib_base
00114 //! Used for the Maxwell model at one incident energy.
00115 {
00116 private:
00117   double U_;
00118   double Theta_;
00119 
00120 public:
00121 
00122   double f(double E);
00123 
00124   one_d_Maxwell();
00125   ~one_d_Maxwell() {} 
00126 
00127   //! Sets up the parameters
00128   void initiate(double e_in, double Theta, double U);
00129 
00130   //! Inserts the links for the extrema
00131   void extrema();
00132 
00133   //! Copies a list
00134   void copy( one_d_Maxwell& list_2 );
00135 
00136   //! Interpolates this list between left_list and right_list.
00137   void list_interp(double e_in,
00138     one_d_Maxwell& left_list, one_d_Maxwell& right_list);
00139 };
00140 
00141 // -------------------- class one_d_Watt ------------------
00142 class one_d_Watt : public distrib_base
00143 //! Used for the Watt model at one incident neutron energy.
00144 {
00145 private:
00146   double a_;
00147   double b_;
00148   double U_;
00149 
00150 public:
00151   // interp_type is used for interpolation of the parameter a
00152   // We also need to store the type of interpolation for b
00153   int interp_type_b;
00154 
00155   double f(double E);
00156 
00157   one_d_Watt();
00158   ~one_d_Watt() {} 
00159 
00160   //! Sets parameters E_in, U, and a
00161   void set_EUa( double e_in, double U, double a );
00162 
00163   //! Sets up a list for b between 2 incident energies
00164   void intermediate_b(double e_in, double U, double a, int a_interp,
00165     double b, int b_interp);
00166 
00167   //! Sets up a list for b at an incident energy
00168   void same_b( double b, int b_interp );
00169 
00170   //! Fills out the list
00171   void initiate();
00172 
00173   // Put in a link at the maximum.  It occurs
00174   // at the solution of beta*tanh(beta) = a*b/2 if
00175   // beta = sqrt(b*E').
00176   //! Puts in a link at the maximum
00177   void extrema();
00178 
00179   //! Copies a list
00180   void copy( one_d_Watt& list_2 );
00181 
00182  //! Interpolates this list between left_list and right_list
00183   void list_interp(double e_in,
00184     one_d_Watt& left_list, one_d_Watt& right_list);
00185 };
00186 
00187 //! Used to locate the maximum of the Watt function
00188 double Watt_max(double beta, double dummy);
00189 
00190 // -------------------- class one_d_Madland ------------------
00191 class one_d_Madland : public distrib_base
00192 //! Used for the Madland-Nix model at one incident neutron energy.
00193 {
00194 private:
00195   double EFL_;  // average energy of light fragment
00196   double EFH_;  // average energy of heavy fragment
00197   double TM_;   // Madland-Nix parameter
00198   double E_max;
00199   double g( double E_out, double E_frag );  // used by f
00200   double Gamma_a;  // Gamma(1.5)
00201 
00202 public:
00203 
00204   double f(double E)
00205   {
00206     return 0.5*( g(E, EFL_) + g(E, EFH_));
00207   }
00208 
00209   one_d_Madland();
00210   ~one_d_Madland() {} 
00211 
00212   //! Sets up the parameters
00213   void initiate(double e_in, double EFL, double EFH, double TM);
00214 
00215   //! Copies a list
00216   void copy( one_d_Madland& list_2 );
00217 
00218  // Interpolates this list between left_list and right_list
00219   void list_interp(double e_in,
00220     one_d_Madland& left_list, one_d_Madland& right_list);
00221 };
00222 
00223 // -------------------- class one_d_Legendre ---------------
00224 class one_d_Legendre : public distrib_base
00225 //! Used for the Legendre angular distribution at one incident energy.
00226 {
00227 public:
00228   Param coef;  // the Legendre coefficients
00229 
00230   double f(double mu);
00231 
00232   one_d_Legendre():coef(1,0.0) {}
00233   ~one_d_Legendre() {} 
00234 
00235   //! makes a 1-d list for one incident energy
00236   void expand();
00237 
00238   //! Copies a list
00239   void copy( one_d_Legendre& list_2 );
00240 
00241   //! Interpolates this list between left_list and right_list
00242   // It is expected this is lin-log interpolation.
00243   void list_interp(double e_in,
00244     one_d_Legendre& left_list, one_d_Legendre& right_list );
00245 };
00246 
00247 // -------------------- class one_d_isotropic ---------------
00248 class one_d_isotropic : public distrib_base
00249 //! Used for the isotropic angular distribution at one incident energy.
00250 {
00251 public:
00252 
00253   double f(double E)
00254   {
00255     SevereError("one_d_isotropic::f","Write this function!");
00256     return 0.0;
00257   }
00258 
00259   one_d_isotropic() {}
00260   ~one_d_isotropic() {}
00261 
00262  //! sets up a list
00263   void initiate(double e_in);
00264 
00265   //! Copies a list
00266   void copy( one_d_isotropic& list_2 );
00267 };
00268 
00269 // -------------------- class one_d_hat ------------------
00270 class one_d_hat : public distrib_base
00271 //! This class is a hat function energy distribution, and is used for debugging.
00272 {
00273 private:
00274   // The model parameters are scaled to unit base: 0 <= E' <= 1
00275   double left_scale;  // location of the left end of the hat
00276   double top_scale;   // location of the top of the hat
00277   double right_scale; // location of the right end of the hat
00278 
00279 public:
00280 
00281   double f(double E_out);
00282 
00283   one_d_hat() {}
00284   ~one_d_hat() {} 
00285 
00286   //! Sets up the parameters and makes the list
00287   void initiate(double left_end, double top, double right_end);
00288 
00289   //! Performs the interpolation
00290   void list_interp(double e_in, one_d_hat& left_list,
00291     one_d_hat& right_list)
00292   {
00293     SevereError("one_d_hats::list_interp",
00294         "Write code to interpolate between one_d_hats?");
00295   }
00296 };
00297 
00298 #endif

Generated on Thu Sep 7 10:30:03 2006 for fete -- From ENDFB6 To ENDL by doxygen 1.3.4