pyne progress report - amazon s3 · 1/32 pyne progress report anthony scopatz1 for cameron r....

32
1/32 PyNE Progress Report Anthony Scopatz 1 for Cameron R. Bates 2,3 Elliott Biondo 1 , Kathryn Huff 2 , Kalin Kiesling 1 , Robert Carlsen 1 , Andrew Davis 1 , Matthew Gidden 1 , Tim Haines 1 , Joshua Howland 2 , Blake Huff 2 , Kevin Manalo 4 , Arielle Opotowsky 1 , Rachel Slaybaugh 2 , Eric Relson 1 , Paul Romano 5 , Patrick Shriwise 1 , John D. Xia 6 , Paul Wilson 1 , Julie Zachman 1 1 The University of Wisconsin-Madison 2 The University of California, Berkeley 3 Lawrence Livermore National Laboratory 4 Georgia Institute of Technology 5 Massachusetts Institute of Technology 6 University of Chicago ANS Winter Meeting, November 11, 2014 C. R. Bates The PyNE Software Library LLNL-PRES-663876 1 / 32

Upload: others

Post on 14-Jul-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

1/32

PyNE Progress Report

Anthony Scopatz1 for Cameron R. Bates2,3

Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1,Andrew Davis1, Matthew Gidden1, Tim Haines1, Joshua

Howland2, Blake Huff2, Kevin Manalo4, Arielle Opotowsky1,Rachel Slaybaugh2, Eric Relson1, Paul Romano5, Patrick Shriwise1,

John D. Xia6, Paul Wilson1, Julie Zachman1

1 The University of Wisconsin-Madison2 The University of California, Berkeley

3 Lawrence Livermore National Laboratory4 Georgia Institute of Technology

5 Massachusetts Institute of Technology6 University of Chicago

ANS Winter Meeting, November 11, 2014C. R. Bates The PyNE Software Library LLNL-PRES-663876 1 / 32

Page 2: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

2/32

OUTLINE

• PyNE [1]: what is it?(Python for NuclearEngineering)

• New Features• Improved Usability• Expanding the

community

C. R. Bates The PyNE Software Library LLNL-PRES-663876 2 / 32

Page 3: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

3/32

WHAT IS PYNE?

PyNE is the open source nuclear engineering toolkit.

• PyNE is a library of composable tools used to build nuclearscience and engineering applications

• It is permissively licensed (2-clause BSD)• It supports both a C++ and a Python API• The name ‘PyNE’ is a bit of a misnomer since most of the code

base is in C++ but most daily usage happens in Python• v0.4 is the current, stable release• As an organization, PyNE was born in April 2011 (however, core

parts of PyNE have existed since 2007)

C. R. Bates The PyNE Software Library LLNL-PRES-663876 3 / 32

Page 4: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

4/32

WHAT ARE THE GOALS OF PYNE?

To help nuclear engineers:• be more productive (don’t

reinvent the wheel!)• have the best solvers• have a clear and useful API• write really great code• teach the next generation

10-7 10-6 10-5 10-4 10-3 10-2 10-1 100 101 102

E [MeV]

10-4

10-3

10-2

10-1

100

101

102

Cro

ss S

ect

ion

[b

arn

s]

C. R. Bates The PyNE Software Library LLNL-PRES-663876 4 / 32

Page 5: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

5/32

WHAT CAN PYNE DO?The idea is to be able to easily combine components and avoidredeveloping utilities someone else has developed. new/improved

• Nuclear data and cross-section reading/processing• ENSDF, ENDF, ACE

• Material management• FLUKA, MCNP

• Canonical nuclide, particle and reaction naming conventions• Mesh operations

• DAGMC, ALARA, CADIS

• MCNP and Serpent input/output parsing• Fuel cycle functionality (transmutation, enrichment)• AHOT• Rigorous Two-Step Activation• MORE!

C. R. Bates The PyNE Software Library LLNL-PRES-663876 5 / 32

Page 6: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

6/32

IMPROVEMENTS IN ENSDF

• Completely re-written parser• Reads all level and decay information into HDF5

C. R. Bates The PyNE Software Library LLNL-PRES-663876 6 / 32

Page 7: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

7/32

ADDITION OF FISSION YIELD DATA

WIMSD LWR (ENDF/B-VII.0)

90 100 110 120 130 140 150A

0

2

4

6

8

10

12

Yie

ld (

%)

233 U235 U239 Pu

NDS Thermal (JEFF-3.1)

90 100 110 120 130 140 150A

0

5

10

15

20

Yie

ld (

%)

233 U235 U239 Pu

C. R. Bates The PyNE Software Library LLNL-PRES-663876 7 / 32

Page 8: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

8/32

MESHES IN PYNE

• Facilitates manipulatingand plotting of meshes(with yt’s help)

• Reads MCNP mesh tallies• Writes MCNP mesh inputs

C. R. Bates The PyNE Software Library LLNL-PRES-663876 8 / 32

Page 9: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

9/32

DISCRETIZING GEOMETRY

• Discretize geometry on tetrahedral or Cartesian mesh fortransport

• Relies on CUBIT for mesh generation• Redistributes volume averaged properties

C. R. Bates The PyNE Software Library LLNL-PRES-663876 9 / 32

Page 10: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

10/32

MESH-BASED SOURCE SAMPLING

Randomly sample Monte Carlo birth parameters (position, energy,statistical weight) from a mesh-based source.

The PyNE Sampler class:• Cartesian and tetrahedral mesh• Utilizes alias sampling method [2]• Sampling modes:

• analog – no source biasing• uniform – all space sampled equally, statistical weight adjusted

accordingly• user-specified – any bias scheme specified by the user

• Consistent Adjoint-Driven Importance Sampling (CADIS) [3] inPyNE variance reduction module

C. R. Bates The PyNE Software Library LLNL-PRES-663876 10 / 32

Page 11: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

11/32

SOURCE SAMPLING MODES

Source density distribution Analog sampling Uniform sampling

In addition to a sourcedensity distribution, abiased source densitydistribution can alsobe specified.

Biased source density distribution used-specified sampling

C. R. Bates The PyNE Software Library LLNL-PRES-663876 11 / 32

Page 12: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

12/32

USING THE SAMPLER CLASS

• Written in C++• Intended to be integrated into physics codes

• C/C++, Fortran, Python interfaces

• Use with MCNP5 via a PyNE source.F90 file

C. R. Bates The PyNE Software Library LLNL-PRES-663876 12 / 32

Page 13: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

13/32

COMPLEX SOURCE DEFINITIONS

Define a source on a mesh instead of an sdef, the sky is the limit!

CAD geometry source density (p/cm3/s)

C. R. Bates The PyNE Software Library LLNL-PRES-663876 13 / 32

Page 14: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

14/32

COMPLEX SOURCE DEFINITIONS

Resultant photon flux distribution from MCNP5:(p

/cm

2 /his

tory

)

C. R. Bates The PyNE Software Library LLNL-PRES-663876 14 / 32

Page 15: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

15/32

CADIS

Consistent Adjoint-Driven Importance Sampling [3]• A Monte Carlo variance reduction technique that uses a

deterministic estimate of the adjoint flux.• Source biasing• Weight windows

• PyNE has a mesh-based implementation:• Uses the PyNE source sampling capabilities with MCNP for

mesh-based source biasing.• Adjoint fluxes from must be supplied, e.g. from the Denovo 3D SN

code [4].

C. R. Bates The PyNE Software Library LLNL-PRES-663876 15 / 32

Page 16: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

16/32

MESH-BASED CADIS EXAMPLEAdjoint fluxes from ADVANTG [5]

source density adjoint flux

CADIS

biased source density weight window lower bounds

C. R. Bates The PyNE Software Library LLNL-PRES-663876 16 / 32

Page 17: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

17/32

RIGOROUS TWO-STEP ACTIVATION

• Neutrons activate system components, gamma source persistsafter shutdown.

• Important for occupational safety at ITER, JET, NIF, etc.• DAG-MCNP5 [6] for neutron and photon transport.• ALARA [7] for transmutation and decay.

neutron transport

activation

photon transport

shutdown dose rate

Uses the PyNE modules:• mcnp• mesh• material• alara• dagmc• source sampling

• variance reduction

• r2s moduleC. R. Bates The PyNE Software Library LLNL-PRES-663876 17 / 32

Page 18: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

18/32

EXAMPLE: FNG ITER SHUTDOWN DOSE RATE

BENCHMARK

C. R. Bates The PyNE Software Library LLNL-PRES-663876 18 / 32

Page 19: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

19/32

COMPARISON TO EXPERIMENTAL RESULTS

100 101 102 103

Decay Time (h)

10-1

100

101

102

103

Dos

e R

ate

(µSv

/h)

PyNE R2S CartesianPyNE Cartesian uniformPyNE tetrahedralBatistoni et. al. R2SBatistoni et. al. D1S

C. R. Bates The PyNE Software Library LLNL-PRES-663876 19 / 32

Page 20: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

20/32

INSTALLING PYNE

• Conda binary available (no compiler needed!)• Ubuntu shell script• Conda recipe (for developers)• Single library (easier linking)• Instructions for multiple platforms• Relative links set during build

C. R. Bates The PyNE Software Library LLNL-PRES-663876 20 / 32

Page 21: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

21/32

EVEN MORE FEATURES!

• fluka support• C++ amalgamation• Tally container• Python 3 support• Continuous Integration (CI) testing• Standardized style• ACE 2.0.0 Header support

C. R. Bates The PyNE Software Library LLNL-PRES-663876 21 / 32

Page 22: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

22/32

TUTORIALS + HACKATHONS

• Tutorial - UC Berkeley Nov. 2013• Engage Profs. and Grad + Educate Undergrads

• 0.4 Sprint - UC Berkeley Feb. 2014• Homogenizing code style

• Tutorial - ANS RPSD 2014• Engage national labs + industry

• Hackathon - UC Berkeley Nov. 14-16• Verification and Validation

C. R. Bates The PyNE Software Library LLNL-PRES-663876 22 / 32

Page 23: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

23/32

WHY WOULD I GET INVOLVED?

As a user:• You could do your work or research with PyNE• Even if you have your own software that looks and behaves

similarly to some aspects of PyNE, using PyNE will mean thatyou no longer have to develop AND maintain that functionality

As a developer:• You should be selfish• Contribute to PyNE in ways that support the work that you are

doing• If a feature you want is not in PyNE right now, chances are that

other people want to see that feature too• This will help your future self as much as future other people

C. R. Bates The PyNE Software Library LLNL-PRES-663876 23 / 32

Page 24: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

24/32

HOW CAN I GET INVOLVED?

Contact PyNE• Website: http://pyne.io/• User’s Mailing List: [email protected]• Developer’s List: [email protected]• GitHub: https://github.com/pyne/pyne• Tutorial: http://pyne.io/tutorial/index.html

What goes into PyNE?

Anything that is not export controllable, proprietary, or under HIPPArestrictions! (If you have questions, ask)

C. R. Bates The PyNE Software Library LLNL-PRES-663876 24 / 32

Page 25: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

25/32

ACKNOWLEDGEMENTS

• PyNE is a diverse collection of knowledge• We need lots of specialist to fill in the gaps:

Anthony Scopatz1, Cameron R. Bates2,3, Elliott Biondo1, Kathryn Huff2, KalinKiesling1, Robert Carlsen1, Andrew Davis1, Matthew Gidden1, Tim Haines1,Joshua Howland2, Blake Huff2, Kevin Manalo4, Arielle Opotowsky1, RachelSlaybaugh2, Eric Relson1, Paul Romano5, Patrick Shriwise1, John D. Xia6,Paul Wilson1, Julie Zachman1

1 The University of Wisconsin-Madison2 The University of California, Berkeley3 Lawrence Livermore National Laboratory4 Georgia Institute of Technology5 Massachusetts Institute of Technology6 University of Chicago

C. R. Bates The PyNE Software Library LLNL-PRES-663876 25 / 32

Page 26: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

26/32

QUESTIONS?

C. R. Bates The PyNE Software Library LLNL-PRES-663876 26 / 32

Page 27: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

27/32

PYNE IN THE LITERATURE

• Intro: “PyNE: Python For Nuclear Engineering” [8]• Progress reports: [9], [10]• In research: [11], [12], [13]• V&V: “Quality Assurance within the PyNE Open Source

Toolkit” [14]• Poster at SciPy: [15]

C. R. Bates The PyNE Software Library LLNL-PRES-663876 27 / 32

Page 28: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

28/32

REFERENCES I

the PyNE Development Team.PyNE: The Nuclear Engineering Toolkit, 2014.

J. Cole Smith and Sheldon H. Jacobson.An analysis of the alias method for discrete random-variategeneration.INFORMS Journal on Computing, 17(3):321–327, 2005.

Alireza Haghighat and John C. Wagner.Monte carlo variance reduction with deterministic importancefunctions.Progress in Nuclear Energy, 42(1):25–53, 2003.

T. M. Evans, A. S. Stafford, R. N. Slaybaugh, and K. T. Clarno.Denovo: A new three-dimensional parallel discrete ordinates codein scale.Nuclear Technology, 171:171–200, 2010.

C. R. Bates The PyNE Software Library LLNL-PRES-663876 28 / 32

Page 29: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

29/32

REFERENCES II

Scott W. Mosher, Aaron M. Bevill, Seth R. Johnson, Ahmad M.Ibrahim, Charles R. Daily, Thomas M. Evans, John C. Wagner,Jeffrey O. Johnson, and Robert E. Grove.ADVANTG–an automated variance reduction parametergenerator.Technical Report ORNL/TM-2013/416, Oak Ridge NationalLaboratory, 2013.

Paul P.H. Wilson, Tim J. Tautges, Jason A. Kraftcheck, Brandon M.Smith, and Douglass L. Henderson.Acceleration Techniques For Direct Use of CAD-Based Geometries InFusion Neutronics Analysis.October 2009.

C. R. Bates The PyNE Software Library LLNL-PRES-663876 29 / 32

Page 30: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

30/32

REFERENCES III

P.P.H. Wilson.ALARA: Analytic and Laplacian Adaptive Radioactivity Analysis.PhD thesis, Fusion Technology Institute, UW-Madison, Madison,WI, United States, 1999.

Anthony Scopatz, Paul K. Romano, Paul P.H. Wilson, andKathryn D. Huff.PyNE: Python for Nuclear Engineering.In Am. Nuc. Soc. Winter Meeting 2012, volume 107, San Diego, CA,USA, November 2012.

Anthony Scopatz, Elliott D. Biondo, Carsten Brachem, John Xia,and Paul P. H. Wilson.PyNE Progress Report.In Am. Nuc. Soc. Winter Meeting 2013, volume 109, Washington,D.C., USA, November 2013.

C. R. Bates The PyNE Software Library LLNL-PRES-663876 30 / 32

Page 31: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

31/32

REFERENCES IV

Cameron Bates, Elliott Biondo, Kathryn Huff, and et al.PyNE Progress Report.In Am. Nuc. Soc. Winter Meeting 2014, volume 111, Anaheim, CA,USA, November 2014.

E. Biondo, A. Davis, A. Scopatz, and P. P. H. Wilson.Rigorous Two-Step Activation for Fusion Systems with PyNE.In Proc. of the 18th Topical Meeting of the Radiation Protection &Shielding Division of ANS, Knoxville, TN, 2014.

J.I. Mrquez Damin, J.R. Granada, and D.C. Malaspina.{CAB}models for water: A new evaluation of the thermal neutronscattering laws for light and heavy water in endf-6 format.Annals of Nuclear Energy, 65(0):280 – 289, 2014.

C. R. Bates The PyNE Software Library LLNL-PRES-663876 31 / 32

Page 32: PyNE Progress Report - Amazon S3 · 1/32 PyNE Progress Report Anthony Scopatz1 for Cameron R. Bates2;3 Elliott Biondo1, Kathryn Huff2, Kalin Kiesling1, Robert Carlsen1, Andrew Davis1,

32/32

REFERENCES V

Anthony Scopatz.First & second order approximations to stage numbers inmulticomponent enrichment cascades.In International Conference on Mathematics and ComputationalMethods Applied to Nuclear Science & Engineering (M&C 2013), SunValley, ID, USA, May 2013.

Elliott Biondo, Anthony Scopatz, Matthew Gidden, RachelSlaybaugh, and Cameron Bates.Quality Assurance within the PyNE Open Source Toolkit.In Am. Nuc. Soc. Winter Meeting 2014, volume 111, Anaheim, CA,USA, November 2014.

Anthony Scopatz, Paul Romano, Paul Wilson, Rachel Slaybaugh,Katy Huff, and Eric Relson.PyNE: Python for Nuclear Engineering.In SciPy 2012, Austin, TX, USA, July 2012.

C. R. Bates The PyNE Software Library LLNL-PRES-663876 32 / 32