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

Adding isotopes to the simulation is very easy in PINSPEC. Users can add as many different isotopes as desired using the "Isotope" function, whose format is shown below in the example from infinite.py. An isotope is called by its abbreviation and its mass number.

The use of the log message below using "py_printf" is encouraged for recording the isotopes in the log.

    py_printf('INFO', 'Initializing isotopes...')

    # Define isotopes
    h1 = Isotope('H-1')
    b10 = Isotope('B-10')
    o16 = Isotope('O-16')
    u235 = Isotope('U-235')
    u238 = Isotope('U-238')
    zr90 = Isotope('Zr-90') 

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 from the PINSPEC directory:

cd pinspec/xs-lib

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, 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.

##Other Isotope/Cross Section Options

After initializing isotopes, it is possible to set options for them. It is possible to neglect the thermal scattering for an isotope. This ??? to the isotope.

o16.neglectThermalScattering()

It is also possible to set group cross sections for isotopes. In the example, this option is used to create a flat elastic cross section over an energy interval.

    # Set one group potential elastic scattering xs for u-235
    xs_energies = numpy.array([1E-7, 2E7])
    xs = numpy.array([11.4])
    u235.setMultigroupElasticXS(xs_energies, xs)

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

    # Zero out capture for Zr-90 
    xs = numpy.array([0.0])
    zr90.setMultigroupCaptureXS(xs_energies, xs)

Return to Creating Input Files

Tutorials

Home

Clone this wiki locally