IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere Class Reference

A sphere in which gamma rays are created at random spots, flying off in random directions. More...

+ Collaboration diagram for IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere:

Public Member Functions

double CalcFractionOfEscapedRays ()
 Performs a Monte-Carlo simulation and calculates the fraction of rays that escaped from the sphere. More...
 
void CalcFracOfEscRaysVsMFPToRadius (double initMFPToRad, double finalMFPToRad)
 Calculates the data for the graph of the fraction of escaped rays vs. the MFPToRadiusRatio. More...
 
void PrintResults (TextWriter writer)
 Prints the solution to the specified text writer. More...
 
void PrintResults (string filePath)
 Prints the solution to the specified file. More...
 

Public Attributes

int NRays = 2000000
 The number of rays that are created in the sphere. More...
 
double Radius = 1.0
 The sphere radius. More...
 
double MeanFreePath = 1.0
 The mean free path of gamma rays in the sphere. More...
 
List< double[]> FracOfEscRaysVsMFPToRadius = new List<double[]>(100)
 The data for the graph of the fraction of escaped rays vs. the MFPToRadiusRatio. More...
 
int NSamples = 100
 The number of samples for the CalcFracOfEscRaysVsMFPToRadius() method. More...
 

Properties

double MFPToRadius [get, set]
 The ratio of the mean free path vs. the sphere's radius. More...
 

Private Attributes

Random RNG = new Random()
 A random number generator. More...
 

Detailed Description

A sphere in which gamma rays are created at random spots, flying off in random directions.

Member Function Documentation

double IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.CalcFractionOfEscapedRays ( )
inline

Performs a Monte-Carlo simulation and calculates the fraction of rays that escaped from the sphere.

Returns
The fraction of escaped rays.

Referenced by IG.MPetekLib.Application.Scripts.CompPhys._07MCNumberOfEscapedRays.Run().

void IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.CalcFracOfEscRaysVsMFPToRadius ( double  initMFPToRad,
double  finalMFPToRad 
)
inline

Calculates the data for the graph of the fraction of escaped rays vs. the MFPToRadiusRatio.

Parameters
initMFPToRadInitial MFPToRadiusRatio.
finalMFPToRadFinal MFPToRadiusRatio.
void IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.PrintResults ( TextWriter  writer)
inline

Prints the solution to the specified text writer.

Parameters
writer
void IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.PrintResults ( string  filePath)
inline

Prints the solution to the specified file.

If the file exists then it is overwritten.

Parameters
inputFilePathPath of the file where solution is written.

Member Data Documentation

int IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.NRays = 2000000

The number of rays that are created in the sphere.

double IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.Radius = 1.0

The sphere radius.

double IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.MeanFreePath = 1.0

The mean free path of gamma rays in the sphere.

Random IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.RNG = new Random()
private

A random number generator.

List<double[]> IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.FracOfEscRaysVsMFPToRadius = new List<double[]>(100)

The data for the graph of the fraction of escaped rays vs. the MFPToRadiusRatio.

int IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.NSamples = 100

The number of samples for the CalcFracOfEscRaysVsMFPToRadius() method.

Property Documentation

double IG.MPetekLib.Algorithms.Models.CompPhys.MCRadioactiveSphere.MFPToRadius
getset

The ratio of the mean free path vs. the sphere's radius.


The documentation for this class was generated from the following file: