Giter Site home page Giter Site logo

spytran's Introduction

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

spytran's People

Contributors

wgurecky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.