148 void setElasticXS(
float* elastic_xs,
float* elastic_xs_energies,
int num_elastic_xs);
149 void setCaptureXS(
float* capture_xs,
float* capture_xs_energies,
151 void setFissionXS(
float* fission_xs,
float* fission_xs_energies,
153 void rescaleXS(
float start_energy,
float end_energy,
int num_energies);
160 int num_bins,
int num_distributions);
202 void retrieveXS(
float* xs,
int num_xs,
char* xs_type)
const;
205 double* elastic_xs,
int num_xs);
207 double* capture_xs,
int num_xs);
209 double* fission_xs,
int num_xs);
212 double* elastic_xs,
int num_xs);
214 double* capture_xs,
int num_xs);
216 double* fission_xs,
int num_xs);
219 void loadXS(
char* xs_type);
255 float lethargy = log10(energy);
bool isRescaled() const
This method returns whether or not the Isotope's cross-sections have been rescaled to a uniform letha...
Definition: Isotope.cpp:1229
Represents a neutron in a PINSPEC simulation.
Definition: Neutron.h:27
int _A_squared
Definition: Isotope.h:52
Isotope * clone()
This method clones a given Isotope class object by executing a deep copy of all of the Isotope's clas...
Definition: Isotope.cpp:1749
float getThermalScatteringEnergy(float energy)
For a given neutron energy (eV) in a scattering collision, this function returns the outgoing energy ...
Definition: Isotope.cpp:1803
void setMultigroupElasticXS(double *energies, int num_energies, double *elastic_xs, int num_xs)
Sets the multigroup elastic cross-section data for this isotope.
Definition: Isotope.cpp:615
void setTemperature(float T)
Set the temperature of the isotope in degrees Kelvin.
Definition: Isotope.cpp:1257
int _A_plus_one_squared
Definition: Isotope.h:55
float _end_lethargy
Definition: Isotope.h:124
float _thermal_cutoff
Definition: Isotope.h:131
int _num_fission_xs
Definition: Isotope.h:95
int _num_elastic_xs
Definition: Isotope.h:75
void setThermalScatteringCutoff(float cutoff_energy)
Sets the thermal scattering high energy cutoff energy.
Definition: Isotope.cpp:1275
float * _total_xs
Definition: Isotope.h:114
float * _Eprime_to_E
Definition: Isotope.h:145
bool usesThermalScattering()
This method returns true if the thermal scattering distributions for this isotope are to be used when...
Definition: Isotope.cpp:1219
The Isotope represents a nuclide at some temperature.
Definition: Isotope.h:41
bool _rescaled
Definition: Isotope.h:72
float _mu_avg
Definition: Isotope.h:68
int getNumThermalCDFs()
Returns the number of thermal scattering CDFs.
Definition: Isotope.cpp:2001
void generateTotalXS(float start_energy, float end_energy, int num_energies)
Computes the microscopic total cross-section from the isotope's capture, elastic scatter and fission ...
Definition: Isotope.cpp:1721
void collideNeutron(neutron *neutron)
For a given energy, this method samples a collision type, updates the neutron's outgoing energy and k...
Definition: Isotope.cpp:2142
float getCaptureXS(float energy) const
Returns the microscopic capture cross-section value for some energy.
Definition: Isotope.cpp:1006
float * _absorb_xs
Definition: Isotope.h:107
float getTemperature() const
Return the temperature in degrees Kelvin for this isotope.
Definition: Isotope.cpp:187
float getFissionXS(float energy) const
Returns the microscopic fission cross-section value for some energy.
Definition: Isotope.cpp:1059
void retrieveXSEnergies(float *energies, int num_xs, char *xs_type) const
Fills an array with cross-section energy values.
Definition: Isotope.cpp:271
float * _total_xs_energies
Definition: Isotope.h:117
void sampleCollisionType(neutron *neutron)
Determines a random collision type based on the values of each of the isotope's cross-section values ...
Definition: Isotope.cpp:1768
float * _capture_xs
Definition: Isotope.h:87
float * _elastic_xs_energies
Definition: Isotope.h:79
void setMultigroupFissionXS(double *energies, int num_energies, double *fission_xs, int num_xs)
Sets the multigroup fission cross-section data for this isotope.
Definition: Isotope.cpp:813
int _num_capture_xs
Definition: Isotope.h:85
void makeFissionable()
Inform isotope that it is fissionable.
Definition: Isotope.cpp:1292
float thermalScatteringProb(float E_prime_to_E, int dist_index)
This function computes the thermal scattering probability for a ratio of initial to final energies...
Definition: Isotope.cpp:1964
float * _elastic_xs
Definition: Isotope.h:77
float _start_lethargy
Definition: Isotope.h:122
Isotope(char *_isotope_name)
Isotope constructor.
Definition: Isotope.cpp:17
float _alpha
Definition: Isotope.h:57
void retrieveThermalPDFs(float *pdfs, int num_values)
Loads an input array with the energies for each of the isotope's thermal PDFs.
Definition: Isotope.cpp:2060
float * _E_to_kT
Definition: Isotope.h:143
float getThermalScatteringCutoff()
Return the thermal scattering high energy cutoff.
Definition: Isotope.cpp:217
float ** _thermal_cdfs
Definition: Isotope.h:141
void retrieveXS(float *xs, int num_xs, char *xs_type) const
Fills an array with microscopic cross-section values.
Definition: Isotope.cpp:322
int getUid() const
Returns the unique ID auto-generated for the isotope.
Definition: Isotope.cpp:159
float getTransportXS(int energy_index) const
Returns the microscopic transport cross-section value for a certain energy index in this isotope's re...
Definition: Isotope.cpp:1208
int _num_absorb_xs
Definition: Isotope.h:105
float * _thermal_dist
Definition: Isotope.h:139
Functions for creating arrays with similar syntax to MATLAB.
void setMultigroupCaptureXS(double *energies, int num_energies, double *capture_xs, int num_xs)
Sets the multigroup capture cross-section data for this isotope.
Definition: Isotope.cpp:713
char * getIsotopeName() const
Returns the name of the of isotope.
Definition: Isotope.cpp:150
int getEnergyGridIndex(float energy) const
This method returns the index for a certain energy (eV) into the Isotope's uniform lethargy grid...
Definition: Isotope.h:250
void useThermalScattering()
Informs isotope to use thermal scattering to sample outgoing collision energies.
Definition: Isotope.cpp:1284
int getNumXSEnergies(char *xs_type) const
Returns the number of energies for a particular cross-section type.
Definition: Isotope.cpp:229
bool isFissionable() const
Return whether this isotope is fissionable (true) or not (false)
Definition: Isotope.cpp:207
int getNumThermalCDFBins()
Returns the number of energy bins for each thermal scattering CDF.
Definition: Isotope.cpp:2010
void retrieveEtokT(float *E_to_kT, int num_cdfs)
Loads an input array with the values for each thermal scattering CDF.
Definition: Isotope.cpp:2086
bool _use_thermal_scattering
Definition: Isotope.h:129
void parseName(char *isotope_name)
Parse input name and set atomic number for isotope.
Definition: Isotope.cpp:108
bool _capture_rescaled
Definition: Isotope.h:92
float _T
Definition: Isotope.h:65
float _delta_lethargy
Definition: Isotope.h:126
virtual ~Isotope()
Isotope destructor deletes arrays of cross-section values that have been assigned to this isotope...
Definition: Isotope.cpp:70
float getElasticXS(float energy) const
Returns the microscopic elastic scattering cross-section value for some energy.
Definition: Isotope.cpp:898
float getTotalXS(float energy) const
Returns the microscopic total cross-section value for some energy.
Definition: Isotope.cpp:1113
void setElasticXS(float *elastic_xs, float *elastic_xs_energies, int num_elastic_xs)
Set the elastic cross-section for this isotope.
Definition: Isotope.cpp:1547
void initializeThermalScattering(float start_energy, float end_energy, int num_bins, int num_distributions)
This method initializes the probability distributions for thermal scattering.
Definition: Isotope.cpp:1876
static int _n
Definition: Isotope.h:46
bool _fissionable
Definition: Isotope.h:70
float getAbsorptionXS(float energy) const
Returns the microscopic absorption cross-section value for some energy.
Definition: Isotope.cpp:952
void loadXS()
Load the ENDF cross-section data from ASCII files into arrays for this isotope.
Definition: Isotope.cpp:1312
void setFissionXS(float *fission_xs, float *fission_xs_energies, int num_fission_xs)
Set the fission cross-section for this isotope.
Definition: Isotope.cpp:1577
float getDistanceTraveled(neutron *neutron)
For a given neutron, this method samples a distance traveled to next collision.
Definition: Isotope.cpp:2122
int _uid
Definition: Isotope.h:48
int _A
Definition: Isotope.h:50
float _kB
Definition: Isotope.h:133
Utility functions for commonly used vector operations.
void rescaleXS(float start_energy, float end_energy, int num_energies)
Rescales all of the isotope's cross-sections onto a uniform lethargy grid.
Definition: Isotope.cpp:1595
float getMuAverage() const
Return the average value of the cosine of the scattering angle.
Definition: Isotope.cpp:198
void retrieveEprimeToE(float *Eprime_to_E, int num_bins)
Loads an input array with the values for each thermal scattering CDF.
Definition: Isotope.cpp:2108
int _num_thermal_cdfs
Definition: Isotope.h:135
float * _fission_xs_energies
Definition: Isotope.h:99
void retrieveThermalCDFs(float *cdfs, int num_values)
Loads an input array with the values for each of the isotope's thermal CDFs.
Definition: Isotope.cpp:2033
void setCaptureXS(float *capture_xs, float *capture_xs_energies, int num_capture_xs)
Set the capture cross-section for this isotope.
Definition: Isotope.cpp:1562
bool _elastic_rescaled
Definition: Isotope.h:82
float _eta
Definition: Isotope.h:59
float _AO
Definition: Isotope.h:63
Utility functions for numerical integration of 1D functions.
Utility functions to parse in ENDF cross-sections from text files into data arrays.
int _num_energies
Definition: Isotope.h:120
void neglectThermalScattering()
Informs isotope not to use thermal scattering to sample outgoing collision energies.
Definition: Isotope.cpp:1266
float * _fission_xs
Definition: Isotope.h:97
bool _fission_rescaled
Definition: Isotope.h:102
float getAlpha() const
Returns the alpha values for this isotope.
Definition: Isotope.cpp:178
void generateAbsorptionXS(float start_energy, float end_energy, int num_energies)
Computes the microscopic absorption cross-section from the isotope's capture and fission (if applicab...
Definition: Isotope.cpp:1686
int _num_total_xs
Definition: Isotope.h:112
float * _absorb_xs_energies
Definition: Isotope.h:109
int _num_thermal_cdf_bins
Definition: Isotope.h:137
Utility functions for writing log messages to the screen.
Utility functions for linear interpolation of 1D functions.
float _rho
Definition: Isotope.h:61
int getA() const
Returns the atomic number of this isotope.
Definition: Isotope.cpp:168
void setA(int A)
Set the atomic number and update alpha, eta and rho.
Definition: Isotope.cpp:1244
char * _isotope_name
Definition: Isotope.h:44
float * _capture_xs_energies
Definition: Isotope.h:89