Skip to content

Sn neutron transport written mostly in python. For university Sn transport theory class.

Notifications You must be signed in to change notification settings

wgurecky/SpyTran

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPyTran

Simplified 1D and 2D Sn transport for Nuclear engineering applications written mostly in python.

Solves the steady state neutron balance for multiplying and non-multiplying systems.

Supports triangular unstructured meshes generated by GMSH.

Currently uses continuous Galerkin FE technique for spatial discretization. Plan to move to DG methods.

Install

Depends

  • GMSH >=2.8.5
  • numpy >=1.10
  • scipy
  • h5py

Optional Depends

  • matplotlib (plotting)
  • pyeVTK (2D plotting)
  • periodictable
  • mechanize (for automated XS processing)
  • NJOY (for XS libs)

Developer install:

python setup.py develop

Material Library

To generate custom cross section files (.xs) first download endf/b-vii libraries from the LANL T2 website using the utility script in /spytran/utils:

$python2 endfcrawl.py

Next, run the NJOY batch script in /spytran/utils:

$./createXS.sh

This script will generate new .xs files in /spytran/utils/XS_default by default.

The default 10 energy group cross section library is located /spytran/materials/newXS. The default cross sections were generated at 300K.

Multigroup XS files for fissile isotopes are generated by the /spytran/utils/njoybatchGRPfis.sh script. Multigroup XS files for non-Fissile isotopes are generated by the /spytran/utils/njoybatchGRPnofis.sh script. The group structure, evaluation temperature, and assumed background energy spectrum can be adjusted in these scripts.

Doppler broadening is performed by the NJOY broadr module. Simple inf-media self shielding is implemented by f-factor lookup. See the 2d_pin example file for a self shielded material example (by default inf dilution xs used - but it is easy to switch on f-factor self shielding). Plan is to incorporate a region and energy dependent leakage cross section into the Bondarenko method in the future. See:

www.me.utexas.edu/~deinert/papers/jpne1610-dembia.pdf

Useage

  1. Construct GMSH .geo file
  2. Write input python script
  3. Execute the python input script
  4. Visualize

Examples

See /spytran/examples directory for 1D and 2D example decks. Corresponding GMSH geometry files are in /spytran/examplex/geometry.

Example input file execution:

$python2 2d_pin.py

Directory

  • /spytran

    • drivers and solvers
    • /spytran/fe

      • finite element classes
    • /spytran/materials

      • material mixing routines and xs readers.
    • /spytran/utils

      • parsers and ordinate set generators
      • other extra code
    • /spytran/plotters

      • flux and skernel plotting functions.
    • /spytran/examples

      • 1 and 2D example input scripts

      • /spytran/examples/geometry

        • geometry inputs

Contributors

William Gurecky

About

Sn neutron transport written mostly in python. For university Sn transport theory class.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published