Skip to content

Commit

Permalink
Merge pull request #17 from jbae11/class-array
Browse files Browse the repository at this point in the history
Class array
  • Loading branch information
andrewryh authored Jul 6, 2018
2 parents 570e6c4 + 6c41f46 commit 902ec81
Show file tree
Hide file tree
Showing 80 changed files with 20,467 additions and 2,968 deletions.
57 changes: 29 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
language: python
sudo: false

deploy:
provider: pypi
user: arokem
password:
secure: U8Bfe8mXUSp5HYzGsyJfLuVzu+uEt6hid6AQb+HafJMHhhmoiX4cL8IH1xYaT/ZDXR02IO5bpQpjLLvKizDCXrfEgM/YTWhi1lldVh8O6cdP0gBeNfYNQz0qmbWhJFGzN+ad4VXBXrCVIPtF88mmowzRr6P0vLHW8GudSPInJKl6ofUwJDkOOFL6tqAiSLTIlwQQtvKTMqxCAQ3U+kliznpbbjFJSCjf29IQ/tUqzflbKmVdpr5nXCwVONNnydnY8fFK9Vrhl2UchFKjE5KbfoYxFs9udhlgxZMoKSDmTcvhhjwZ7HN8WPABxvY+IvrDi+CUjFDKBKZhSan0fQBfc8aMN0YVE2/TtEJXwsA9g4c3/BkcoF532mc7e2dzExQwOh/xS/iLPhn0qtf+VQn7po7iXwSMbpPIqEOYbgpaWXzgo0Pf5O5Q0pKzuXpcN4femZ1hEtTZ9f13LHuyjLPN9GAZjQmdUGbIkPFY/bbu6ssbkcgKZTABODln68LOnLDQGqpog5bYQ9Myr5mLhF3duLjnoZIcuReyQ7Ed8Z7bcNeiu7t4PAWbgm2DJ3VrUkzq24iUvGedwh3Eqr4eQnedrk2Bn3+rqVv00FjX9elmR7S3TJ4l4jPkfg8R48tDan6wGqhu3s2S97MSmgi+/gWDAEpTBHaHc5DuZ4TcJXTb3To=
on:
tags: true
repo: uwescience/saltproc

env:
global:
- PIP_DEPS="pytest coveralls pytest-cov flake8"

python:
- '2.7'
- '3.6'

- 2.7
- 3.6

# Setup anaconda
install:
- travis_retry pip install $PIP_DEPS
- travis_retry pip install -r requirements.txt
- travis_retry pip install -e .
- sudo apt-get install libhdf5-serial-dev
- sudo apt-get install gfortran
- sudo apt-get install gcc
- sudo apt-get install build-essential
- sudo apt-get install cmake
- sudo apt-get install libblas-dev
- sudo apt-get install liblapack-dev
- sudo apt-get install git
- sudo apt-get update
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda install -c anaconda h5py
- conda install -c conda-forge pyne
- conda install -c anaconda pytest

# run
script:
- flake8 --ignore N802,N806 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /doc/`
- mkdir for_test
- cd for_test
- py.test --pyargs saltproc --cov-report term-missing --cov=saltproc

after_success:
- coveralls
- pytest ./saltproc/tests/saltproc_test.py
50 changes: 33 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,43 @@ Online fuel salt reprocesing for Molten Salt Reactors

How to run script (with default flags):

python saltproc.py -n 1 -r /False -bw True/False -steps 5

python run_saltproc.py -n 1 -r /False -bw True/False -steps 5
```
-n number of nodes
-r continue previous simulation? True/False
-bw running on Blue Waters? True/False
-steps number of reprocessing steps to run
```
### Rooms for Improvement
Note that the SERPENT input file path, output database file path, and SERPENT mat file path
are hard-coded in `run_saltproc.py`. The user must edit this to the correct input files.

Note that the executable paths for SERPENT for both the Blue Waters mode and Local mode are
hardcoded in `saltproc.py`. The user must edit this to the correct executable path.

### How saltproc works:
Saltproc is a driver for SERPENT to simulate online fuel salt reprocessing for Molten Salt Reactors.
It performs three major functions:
* runs SERPENT
* parsers and stores SERPENT output data in hdf5
* creates and edits SERPENT input file (`reprocesses`)

The code logic flow is the following:
1. Checks for restart ()
* restart ON: it reads from the database and starts where the database took off (`saltproc.reopen_db()`)
2. Runs SERPENT (`saltproc.run_serpent()`)
* restart OFF : if first run, initializes database with isotopic vectors from the output bumat file (`saltproc.init_db()`)
3. 'Processes Fuel' (`saltproc.process_fuel()`)
* It parses through the output bumat file to:
1. remove isotope groups periodically with specific efficiency
2. add back fissile and/or fertile streams
4. Records data:
* Depleted fuel composition (`core adensity before reproc`)
* Reprocessed fuel composition (`core adensity after reproc`)
* EOC / BOC Keff (`keff_EOC`, `keff_BOC`)
* Th tank inventory (`Th tank adensity`)
5. Repeat 2-4.

Shablona is a template project for small scientific python projects. The
recommendations we make here follow the standards and conventions of much of
the scientific Python eco-system. Following these standards and recommendations
will make it easier for others to use your code, and can make it easier for you
to port your code into other projects and collaborate with other users of this
eco-system.

To use it as a template for your own project, you will need to follow the
instructions at the [bottom of this page](#using-saltproc-as-a-template).

First, let me explain all the different moving parts that make up a small
scientific python project, and all the elements which allow us to effectively
share it with others, test it, document it, and track its evolution.

### Organization of the project

Expand All @@ -34,7 +51,6 @@ The project has the following structure:
|- saltproc/
|- __init__.py
|- saltproc.py
|- due.py
|- data/
|- ...
|- tests/
Expand Down Expand Up @@ -74,7 +90,7 @@ interactive Python session, the classes and functions defined inside of the
need to also create a file in `__init__.py` which contains code that imports
everything in that file into the namespace of the project:

from .saltproc import *
from saltproc import saltproc

In the module code, we follow the convention that all functions are either
imported from other places, or are defined in lines that precede the lines that
Expand Down
182 changes: 0 additions & 182 deletions doc/Makefile

This file was deleted.

Binary file removed doc/_static/RTD-advanced-conf.png
Binary file not shown.
Binary file removed doc/_static/git.png
Binary file not shown.
Binary file removed doc/_static/logo.png
Binary file not shown.
13 changes: 0 additions & 13 deletions doc/_templates/class.rst

This file was deleted.

12 changes: 0 additions & 12 deletions doc/_templates/function.rst

This file was deleted.

26 changes: 0 additions & 26 deletions doc/api.rst

This file was deleted.

Loading

0 comments on commit 902ec81

Please sign in to comment.