Skip to content
jessicahunter24 edited this page Apr 15, 2013 · 35 revisions

In PINSPEC isotopes are constructs that allow the user to set or access nuclide properties such as cross section, temperature, mass-related information and simulation behavior. Isotopes are added to materials, which are assigned to regions, which are added to the overall geometry. Adding isotopes to the simulation is very simple in PINSPEC. Users can add as many different isotopes as desired using the "Isotope" constructor. The argument is the element abbreviation and the mass number, surrounded in single quotes. An example defining the isotopes for U235, O16, and H1 is shown below.

>>> u235 = Isotope('U-235')
>>> o16 = Isotope('O-16')
>>> h1 = Isotope('H-1')

##Setting and Retrieving Cross Section Data Once a cross section is initialized it is automatically associated with the 300K ENDF/B-VII cross section files for elastic scattering, capture, and if appropriate, total fission. In PINSPEC users have the flexibility to reset them to other values by setting group cross sections for isotopes.

In the example, the command setMultigroupElasticXS() is used to create a flat elastic cross section over an energy interval. The first argument is an array with energies, and the second argument is the corresponding cross sections for those energies.

>>> xs_energies = numpy.array([1E-5, 20E6])
>>> xs = numpy.array([29.5])
>>> u235.setMultigroupElasticXS(xs_energies, xs)

The same function also exists for the capture cross section. In this case the cross section is set to 34.5.

>>> xs = numpy.array([34.5])
>>> u235.setMultigroupCaptureXS(xs_energies, xs)

Users also have the ability to pull cross section values for an isotope for an energy or an array of energies. For example, you can check that you set the elastic and capture cross sections from the example above by retrieving them using the getElasticXS() and getCaptureXS() commands. Both take a single float argument representing the energy for the desired cross section. If an integer is used, the function treats the integer as the energy index location of the cross section.

>>> u235.getElasticXS(1.0E6)
29.5
>>> u235.getCaptureXS(1.0E3)
34.5

It is also possible to retrieve the total cross section and the absorption cross sections in the same manner, as these cross sections are derived within PINSPEC from the elastic, capture, and fission cross sections.

##Retrieving Other Nuclide Data Users have the ability of retrieving some of the basic properties of a nuclide using a set of common equations. The getA() command retrieves the mass number of an isotope, while getAlpha() retrieves the scattering constant ((A-1)/(A+1))^2 . The command getMuAverage() returns the average value of the cosine of the scattering angle, while getTemperature() retrieves the temperature of the cross section of the nuclide. the use of these commands, which take no arguments, are demonstrated below.

>>> u235.getA()
235
>>> o16.getAlpha()
0.7785467505455017
>>> u235.getMuAverage()
0.0028368793427944183
>>> u235.getTemperature()
300.0

It is also possible to retrieve the thermal scattering data for an isotope. The command retrieveThermalPDFs() loads an input array with the energies for each of the isotope's thermal PDFs. The function takes one argument, which is an array whose size is determined by the number of bins per pdf and the number of pdfs. These inputs can be retrieved with the getNumthermalCDFs() command and the getNumThermalCDFBins(), which take no argument.

>>> num_cdfs = h1.getNumThermalCDFs()
>>> num_bins = h1.getNumThermalCDFBins()
>>> pdfs = numpy.zeros(num_cdfs * num_bins)
>>> thermPDFs = h1.retrieveThermalPDFs(pdfs)

##Simulation Behavior If users plan on running a simulation, options for altering an isotope's behavior are available. One option available is to neglect the thermal scattering for an isotope. This causes the neutron to continue elastically scattering past the 4eV thermal energy cutoff.

>>> o16.neglectThermalScattering()

It is possible to instead change the default cutoff value to another energy using the setThermalScatteringCutoff() function, which takes a single float representing the new cutoff value. You can check that the value has been set by using the getThermalScatteringCutoff() command.

>>> o16.setThermalScatteringCutoff(3.0)
>>> o16.getThermalScatteringCutoff()
3.0

Adding New Isotopes to the Library

The PINSPEC package comes with a small library of isotope cross sections (ENDF/B-VII). In order to view this library, navigate to the cross section library, found at PINSPEC/pinspec/xs-lib. In another terminal window (or outside of the Python interpreter) you can navigate to the directory from the PINSPEC directory:

cd pinspec/xs-lib
ls

The ls command will list all of the files in the directory. This library contains isotopes of common reactor materials with capture, elastic scattering, and fission cross sections. It is possible to add to this library and use other isotopes from the ENDF/B-VII cross section library. To do this, visit the National Nuclear Data Center and follow the steps below:

  • Select the element you wish to add to the library.
  • On the right hand side, select the isotope.
  • On the right hand side, select the "plot" link next to the cross section desired ((n,elastic), (n,gamma) or (n,total fission)). A new tab will appear.
  • On the right hand side, click "view evaluated data".
  • At the top of the page, scroll over the link called "Text". Right click and select "Save Link As..". This will give you the option of saving the cross section file as a text file. Save it in the xs-lib folder(PINSPEC/pinspec/xs-lib), and title it with the element abbreviation, mass number, and isotope designation. For example, the capture cross section (n,gamma) for Boron 10 should be saved as B-10-capture.txt. When the isotope is initialized in the input file, use the same formatting as the isotopes in the example; the element abbreviation and mass number: B-10.

Next: Materials

Tutorials

Home

Clone this wiki locally