Git Product home page Git Product logo

asapy's Introduction

ASAPY

A python based method to sample ACE data based on ENDF covariances.

See ASAPY-dissertation_section.pdf for more background.

Recommended install via conda by

conda create -n asapy python=3.7 
conda activate asapy
conda install -c conda-forge mpich-mpicc 
pip install .
# these probably all won't pass because of some hard coded njoy/boxer2mat paths, sorry!
pytest

mpi4py is a requirement that means you need mpicc on your system. You can get it easily with conda https://anaconda.org/conda-forge/mpich-mpicc if you don't mind mixing conda/pip and what not. You can build it yourself too.

NJOY is a requirement which you can get from https://github.com/njoy/NJOY2016 which also has installation instructions, in general this should work and create an exectuable in the bin folder created, feel free to install it somewhere in your $PATH.

mkdir bin
cd bin
cmake ..
make -j16

boxer2mat is included in this repo which was copied from the NJOY manual because it is not distributed with NJOY. You can cd into that folder and simply type make if you have gfortran. If not you can easily edit the Makefile to use the fortran compiler of your choice (no really, the make file has 4 lines in it)

You'd then supply ENDF files to ENDFToCov.py which will extract covariance data from ENDF data (not included here) and make HDF5 stores of the data.

Then you can sample ACE files (not included here) from those covariances using various distributions with XsecSampler.py.

Shout out to openMC for their ACE data reader, included in ASAPy/data with their license requirement.

An example use case would be to process an ENDF file to get all the covariance matrices stored on the file by:

python ./ASAPy/EndfToCov.py ENDF_FILE -energy_bin_structure SCALE_252 -boxer_exec /Users/veeshy/projects/ASAPy/boxer2mat/boxer2mat -njoy_exec /Users/veeshy/projects/NJOY2016/bin/njoy

That will result in an HDF store with multi-group cross-sections, std-deviations, and covariance matrices.

You can then use this information to sample ACE data files via below which would draw 500 samples varying only mt=102 via lognormal sampling.

python ./ASAPy/XsecSampler.py ACE_FILE HDF_FILE_CREATED_IN_PREVIOUS_STEP 500 102 --make_plots -distribution lognormal

asapy's People

Contributors

ai-pranto avatar veeshy 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.