-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathans-winter-2014-sum.tex
executable file
·349 lines (290 loc) · 16.7 KB
/
ans-winter-2014-sum.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
\documentclass{anstrans}
\setlength{\columnsep}{0.5 in}
\usepackage{url}
\usepackage{subfigure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{PyNE Progress Report}
\author{Cameron~R.~Bates$^{1,2}$, Elliott~Biondo$^{3}$, Kathryn~Huff$^{2}$,
Kalin Kiesling$^{3}$, Anthony~Scopatz$^{3}$ \\
\hspace{1.0in}\\
Robert Carlsen$^{3}$,
Andrew Davis$^{3}$,
Matthew Gidden$^{3}$,
Tim Haines$^{3}$,
Joshua Howland$^{2}$,
Blake Huff$^{2}$,
Kevin Manalo$^{4}$,
Arielle Opotowsky$^{3}$,
Rachel Slaybaugh$^{2}$,
Eric Relson$^{3}$,
Paul Romano$^{5}$,
Patrick Shriwise$^{3}$,
John D. Xia$^{6}$,
Paul Wilson$^{3}$, and
Julie Zachman$^{3}$}
\institute{
$^{1}$ Lawrence Livermore National Laboratory, 7000 East Ave L-188, Livermore, CA 94550\\
\and $^{2}$ The University of California, Berkeley, 2521 Hearst Ave, Berkeley, CA 94709 \\
\and $^{3}$ The University of Wisconsin-Madison, 1500 Engineering Drive, Madison, WI 53706\\ % This is the dept. address, the nuclear people are in 1500.
\and $^{4}$ Georgia Institute of Technology, 770 State Street, Atlanta, GA 30332\\
\and $^{5}$ Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02139 \\
\and $^{6}$ University of Chicago, 5747 S. Ellis Ave., Jones 311, Chicago, IL 60637\\
}
\email{[email protected]}
%%%% packages and definitions (optional)
\usepackage{graphicx}
% allows inclusion of graphics
\usepackage{booktabs}
% nice rules (thick lines) for tables
\usepackage{microtype}
% improves typography for PDF
\newcommand{\SN}{S$_N$}
\renewcommand{\vec}[1]{\bm{#1}}
%vector is bold italic
\newcommand{\vd}{\bm{\cdot}}
% slightly bold vector dot
\newcommand{\grad}{\vec{\nabla}}
% gradient
\newcommand{\ud}{\mathop{}\!\mathrm{d}}
% Common APIs
\newcommand{\Mesh}{\texttt{Mesh} }
\newcommand{\Material}{\texttt{Material} }
% upright derivative symbol
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
PyNE is a suite of free and open source (BSD licensed) tools to aid in
computational nuclear science and engineering. PyNE seeks to provide
native implementations of common nuclear algorithms, as well as an interface for the
scripting language Python and I/O support for industry standard nuclear codes and data
formats.
In the past year PyNE has added many features
including a Rigorous 2-step Activation workflow (R2S) \cite{Biondo2014},
Direct Accelerated Geometry Monte Carlo (DAGMC) % For consistence we may want to provide citations for DAGMC and CADIS
ray tracing \cite{tautges_acceleration_2009}, Consistent Adjoint-Weighted
Importance Sampling (CADIS) variance reduction \cite{haghighat_monte_2003},
and expanded ENSDF parsing support. % DAGMC and CADIS are also not defined as acronyms yets.
As a part of our ongoing efforts to implement a verification and validation
framework we also added continuous integration using the Build and Test Lab \cite{batlab_2014}
at the University of Wisconsin. The PyNE development team has
also improved PyNE's ease of use by making
binaries available for Windows, Mac, and Linux through the conda package
manager as well as adding Python 3 support.
\section{Feature Enhancements}
\subsection{Mesh}
As of v0.4, PyNE includes a mesh representation interface that is used to
build up geometries, store materials, and solve spatial differential equations. % store field data and materials
This is implemented as a layer on top of MOAB meshes \cite{tautges_moab:_2004}.
In addition to the PyTAPS interface \cite{pytaps}, a Python interface to interact with MOAB mesh objects,
it also adds PyNE \Material objects,
which allow the user to define a mix of multiple isotopes, to % Better short description of Materials object??
volume elements as well as a generic tagging interface. These features together
form a generic, easy-to-use mesh library that is capable of handling a plethora
of nuclear engineering problems.
The \Mesh class lives in the \texttt{pyne.mesh} module. This class houses an
iMesh instance called \texttt{mesh} which comes from PyTAPS and contains
methods for native mesh operations. The \texttt{mats} attribute is an
instance of a PyNE \texttt{MaterialLibrary}. This is a mapping of volume
element handles to \Material objects. Tags---sometimes known as fields---are
accessible as attributes on the mesh object itself. There are several different types
of tags (\texttt{IMesh}, \texttt{Material}, \texttt{Metadata}, \texttt{Computed})
depending on where the data should
be stored. All tag types expose the same interface.
To do volumetric analysis and visualization, the \Mesh class is natively supported
by the yt project \cite{2011ApJS..192....9T}. An example of the use of this mesh
to analyze neutron flux in ITER is shown in Fig. \ref{ITER}.
\begin{figure}
\centering
\includegraphics[width=7.0cm, angle =0]{flux_slice.png}
\caption{A 2-D slice of a 3-D PyNE flux mesh of ITER plotted in yt. \textit{This model is for demonstration
purposes only.}}
\label{ITER}
\end{figure}
\subsection{DAGMC Module}
Direct Accelerated Geometry Monte Carlo is a component of MOAB that
facilitates Monte Carlo ray tracing on CAD geometries
\cite{tautges_acceleration_2009}. A \texttt{dagmc} module has been added to
PyNE, providing a Python interface to these ray tracing capabilities. The
\texttt{dagmc.discretize\_geom()} function accomplishes the common task of
mapping geometry cells onto a Cartesian or tetrahedral mesh. The
\texttt{cell\_fracs\_to\_mats} method of the \texttt{Mesh} class can be used
to seamlessly create PyNE \texttt{Mesh} objects tagged with materials, where
the materials are mixtures of the contributions from the various geometry cells
found in each mesh volume element. This especially useful for discretizing CAD
geometries onto grids for deterministic methods. An example of this is shown in
Fig. \ref{mobius}.
\begin{figure}
\centering
\subfigure[CAD model of a complex geometry \cite{mobius}.]{
\label{mobius_cad}
\hspace{1.3cm}
\includegraphics[width=5.86cm]{mobius_cad.png}
}
\subfigure[Volume fractions of the geometry within the mesh volume elements of an
overlaid 200 x 100 x 200 Cartesian mesh.]{
\label{mobius_mesh}
\includegraphics[width=7.5cm]{mobius_mesh.png}
}
\caption{A CAD geometry and a
discretized representation created using PyNE \texttt{discretize\_geom()}.
\textit{This model is for demonstration purposes only.}}
\label{mobius}
\end{figure}
\subsection{ALARA Module}
ALARA is a nuclear inventory analysis code developed at University of Wisconsin
- Madison \cite{wilson_validation_1998}. A module has been added to PyNE to facilitate
the generation of
ALARA input and the parsing of ALARA output. PyNE
\texttt{Mesh} objects tagged with flux and material data can be used to generate
input. The compositions of activated materials as calculated by
ALARA can also be read back into a PyNE \texttt{Mesh} object. These components can be used
in mesh-based activation and burn-up workflows.
\subsection{R2S Activation Workflow}
The Rigorous Two-Step (R2S) method is used to estimate the shutdown dose rate
(SDDR) in fusion systems from photons born from neutron activation products
\cite{chen_rigorous_2002}. This method involves separate neutron and photon
transport simulations, coupled to a dedicated nuclear inventory analysis code.
The PyNE \texttt{R2S} module implements a mesh-based R2S method and
accomplishes this coupling in-memory by leveraging the PyNE \texttt{mesh},
\texttt{material}, \texttt{dagmc}, \texttt{mcnp}, and \texttt{alara} modules.
The \texttt{R2S} module currently only supports transport with MCNP and nuclear
inventory analysis with ALARA, but support for additional physics codes is
planned. Mesh-based photon source sampling is accomplished within MCNP by
compiling MCNP against a custom source sampling library within PyNE.
\subsection{CADIS Variance Reduction}
The Consistent Adjoint-Weighted Importance Sampling and the
Forward-Weighted CADIS (FW-CADIS) method are hybrid Monte Carlo variance reduction
techniques that use deterministic estimates of the forward and adjoint flux to
generate Monte Carlo weight windows and source biasing parameters
\cite{haghighat_monte_2003}. A mesh-based implementation of this method has
been added to the PyNE \texttt{variancereduction} module. Work is currently
underway to interface with the Denovo \cite{Evans2010} deterministic transport
code to in order to acquire these deterministic fluxes.
\subsection{Tally Class}
One common requirement in processing the output of MCNP and other nuclear
engineering codes is to keep track of multiple tallies. PyNE has added a
C++ class with a Python interface that assists users in keeping track of
tally data. The PyNE development team is working to add saving, loading,
and manipulation of these tally objects in the future.
\subsection{Fluka Module}
The \texttt{fluka} module is designed to parse the output files from FLUKA, a fully
integrated particle physics Monte Carlo simulation package\cite{fluka07}. Currently,
this module only supports the parsing of USRBIN output files, which is
a file similar to a meshtal file in MCNP in that it tracks a certain
quantity over an evenly spaced volume mesh. This module parses the USRBIN
files and saves the tracked data and percent error data as attributes of
a \Mesh object.
\subsection{Amalgamation}
While PyNE is ostensibly a Python-oriented toolkit over two-thirds
of the code base is written in C++. This makes it possible to use many
of the features of PyNE without needing Python. In order to simplify
the use of PyNE's C++ API we have added the ability to amalgamate all
of the C++ code into a single source and header file. This makes it
possible to add these two files to any project in order to use much of the
functionality in PyNE without having to worry about linking multiple
libraries in a separate location. This is used in Cyclus
\cite{carlsen_cyclus_2014} to use PyNE features without adding Python as
a dependency.
\subsection{ENSDF Improvements}
Previous versions of PyNE have included some ENSDF parsing capabilities.
These have been focused on extracting half-lives and branching ratios of
metastable and ground states. This has been vastly expanded to support the
parsing of most ENSDF record types and to make level structure and decay data
available in PyNE's C++/Python nuclear data interface. This makes it possible
to use PyNE to look up most structure and decay data similar to online tools
such as NuDat \url{http://www.nndc.bnl.gov/nudat2/}.
We have broken down the data from ENSDF into six distinct subsets. These
include: excited level data, decay normalization data, gamma-ray data, alpha
decay data, $\beta^-$ decay, and electron capture/$\beta^+$ decay. In addition
to information about the radiations for all decay transitions listed in ENSDF we
have also included atomic data from the National Nuclear Data Center to calculate
X-ray emissions from
conversion electrons in gamma-ray emission and electron capture decay.
Work is underway to add decay data access to the PyNE \texttt{Material} object to
facilitate generation of complex sources for use in Monte Carlo transport codes.
\subsection{Fission Yield Data}
The latest release of PyNE includes two different sets of fission yield data.
The first is the IAEA WIMSD library which provides fission product yields
based on ENDF/B-VI. The second is from the IAEA Safeguards data library and includes
independent fission yields with thermal, fast, and 14-MeV neutrons for $^{232}$Th,
$^{233}$U, $^{235}$U, $^{239}$Pu, and $^{241}$Pu.
\section{Verification and Validation}
The PyNE development team is working to implement documented verification
and validation as a part of our basic development process. This has included:
ensuring all code changes to PyNE have at least one reviewer who was not an
author, requiring unit tests for all code additions, a coding style guide,
and requiring all tests to pass on continuous integration builds before
merging code changes.
This issue will be addressed in more detail in other concurrent publications.
\section{Usability Enhancements}
\subsection{Installation Improvements and Binary Distributions}
At our first PyNE workshop a significant amount of the instructional
time was devoted to PyNE installation and configuration. This reduced
the amount of material we were able to cover significantly. From this
experience the PyNE development team came to the conclusion that a major
focus of our version 0.4 development efforts should be on making the
installation process simpler for non-developers.
The core of this effort is based around the conda
package manager. Conda is an open source package manager that is capable
of managing packages on Windows, Mac and Linux. This makes it possible to use
a single package manager across all platforms. We developed a standard conda
package script which can be found at \url{https://github.com/conda/conda-recipes}.
This automates the installation of dependencies for PyNE, significantly
reducing the difficulty of building and installing the software.
In addition, we used this package script to automate the production of binary
packages for Linux and Mac. Finally, we developed a custom Windows build
environment to build a distributable Windows binary.
\subsection{Python 3 Support}
PyNE was originally developed for the Python 2 interpreter as it was
and still is the most common version of Python used in scientific computing.
Python 3 is slowly starting to replace it, however, as the default Python
version. With this changeover on the horizon the PyNE development team
made an effort in preparation for the v0.4 release to make PyNE compatible
with both versions. PyNE is now built and tested on Python 3 on a regular basis.
\section{Cultivation of Users and Developers}
Computational toolkits in the sciences grow more robust by leveraging a broad user base
who test core capabilities with each use. Similarly, such toolkits grow more
powerful by a broad developer base that serves the community by contributing
new, research-relevant features. Development of a sustainable user and
developer community is therefore integral to the success of the PyNE toolkit.
To this end, the development team has organized tutorials to reach out to new
users and has sought out support development by graduate students.
A tutorial was organized in November at the University of California, Berkeley
to both reach out to new users and to gather feedback on the user experience of
PyNE. Over a dozen researchers attended. The audience included undergraduate
and graduate students in nuclear engineering as well as post-docs and faculty.
In a six hour workshop, the attendees installed PyNE and ran prepared examples
with the help of members of the development team. In addition to demonstrating
the core data manipulation capabilities of the PyNE toolkit, the workshop
included a reflective period in which attendees had the opportunity to
brainstorm and suggest extensions, features, and improvements for the toolkit
that were of interest in the context of their particular research.
Based on the success of this event and the organic growth of our user base, a
second user workshop was conducted at the 18th Topical Meeting of the
Radiation Protection and Shielding Division of ANS in September 2014. We plan
to hold more of these in the future.
The development team has also conducted development sprints at both the
University of California and the University of Wisconsin to cultivate the
developer communities that have arisen in those institutions. These sprints
allow the diverse and geographically dispersed development team to gather and
collaborate on code contributions in a coherent manner.
In order to encourage young researchers to become involved in scientific
computing, a number of desired PyNE extensions have been defined online. These
short descriptions of desired extensions can be found on the PyNE website and
are intended to guide the contributions of young researchers. By defining
relevant independent contributions with realistic scope, these descriptions
provide an opportunity for a beginner developer to contribute code in a guided
manner and will assist their transition from user to developer.
\section{Conclusions}
In the past year the PyNE development team has worked to improve PyNE's
usability in addition to adding new features. The availability of binaries
for stable releases has made PyNE more accessible to those who are users
but not developers. The PyNE project will continue to create free and open
source tools that easily interface with the plethora of choices available in
nuclear engineering and scientific computing.
\vspace{0.1in}
\noindent LLNL-ABS-656040
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{ans}
\bibliography{bibliography} \end{document}