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

##DRAFTING##

A material in PINSPEC is made up of one or more isotopes. Creating a material involves initializing it, setting its density and adding the isotopes and their relative densities one at a time. A material can be initialized using the Material constructor, with whatever name the user desires as its argument. This name will be the title to whatever plots are associated with the material.

>>> mix = Material('Fuel Moderator Homogeneous Mix')

The density of the material is set using the setDensity() command with the number density as the first argument and the units as the second argument. The units currently supported are 'g/cc' (grams per cubic centimeter) and 'at/cc' (grams per cubic centimeter).

>>> mix.setDensity(5., 'g/cc')

Isotopes are added to materials using the "addIsotope" function, in which isotopes are defined by the name given to them in the isotope initialization section. The relative number density (or atomic ratio) of said isotope is the second argument in the function. Below is an example of adding the isotopes created int he previous tutorial to a single material.

>>> mix.addIsotope(o16, 1.0)
>>> mix.addIsotope(h1, 1.0)
>>> mix.addIsotope(u238, 0.01)
>>> mix.addIsotope(u235, .0025)

##Retrieving Macroscopic Cross Sections

Next: Regions

Tutorials

Home

Clone this wiki locally