Skip to content

Commit cda1e3c

Browse files
committed
Merge branch 'master' of https://github.com/SlaybaughLab/Coeus
2 parents 761f48b + 5b90165 commit cda1e3c

324 files changed

Lines changed: 32093 additions & 1949 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

8 KB
Binary file not shown.

Code/.DS_Store

2 KB
Binary file not shown.

Code/.bash_profile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@ module load mpi4py
1818
# Aliases
1919

2020
alias groupdir="cd /global/home/groups/co_nuclear"
21+
22+
alias stat='squeue | grep youdongz'
23+
2124
alias nuc='squeue -q nuclear_normal'
2225

26+
alias scratch="cd /global/scratch/youdongz/"
27+
28+
# wwall -j jobid
29+
30+
2331
# User specific environment and startup programs
2432
PATH=$PATH:$HOME/bin:/global/home/groups/co_nuclear/bin:/global/home/groups/co_nuclear/ADVANTG/bin
2533
DATAPATH=/global/scratch/co_nuclear/MCNP/MCNP_DATA/
@@ -28,7 +36,6 @@ export PATH
2836
export DATAPATH
2937

3038
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/global/home/groups/co_nuclear/pyne/lib
39+
export PYTHONPATH=$PYTHONPATH:/global/home/groups/co_nuclear/python-pkgs
3140

32-
PYTHONPATH=$PYTHONPATH:/global/home/groups/co_nuclear/python-pkgs/pp-1.6.5
33-
PYTHONPATH=$PYTHONPATH:/global/home/groups/co_nuclear/python-pkgs/pyDOE-0.3.8-py2.7.egg
3441
export PYTHONPATH=$PYTHONPATH:/global/home/groups/co_nuclear/pyne/lib/python2.7/site-packages

Code/ADVANTG_Utilities.py

Lines changed: 53 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -24,74 +24,50 @@
2424

2525
#---------------------------------------------------------------------------------------#
2626
class ADVANTG_Settings:
27-
"""
28-
Creates a object representing the settings for running the ADVANTG deterministic radiation trasport code calculations.
29-
30-
Attributes
31-
==========
32-
lib : string
33-
The multi-group library used
34-
[Default: "dplus"]
35-
method : string
36-
The solution method for ADVANTG (CADIS or DX)
37-
[Default: "cadis"]
38-
ouputs : string
39-
The output files to be produced
40-
[Default: "mcnp"]
41-
tnum : int
42-
The tally number for calculating the adjoint flux
43-
[Default: 24]
44-
pt_src : string
45-
Whether or not the source should be treated as a point source in deterministic transport
46-
[Default: False]
47-
mix_tol : string
48-
The material mix tolerance fraction. Controls the precision of mixed cells.
49-
[Default: 0.01]
50-
pn_order : integer
51-
The scattering order
52-
[Default: 1]
53-
eta_x : float
54-
The spacing of the mesh intervals in the x (radial) axis in cm in the ETA.
55-
[Default: 0.5 cm]
56-
eta_y : float
57-
The spacing of the mesh intervals in the y (radial) axis in cm in the ETA.
58-
[Default: 0.5 cm]
59-
eta_z : float
60-
The spacing of the mesh intervals in the z (axial) axis in cm in the ETA.
61-
[Default: 0.5 cm]
62-
foil_x : float
63-
The spacing of the mesh intervals in the x (radial) axis in cm near the foil.
64-
[Default: 0.25 cm]
65-
foil_y : float
66-
The spacing of the mesh intervals in the y (radial) axis in cm near the foil.
67-
[Default: 0.25 cm]
68-
foil_z : float
69-
The spacing of the mesh intervals in the z (axial) axis in cm near the foil.
70-
[Default: 0.05 cm]
71-
ext_spacing : float
72-
The spacing of the mesh intervals in x,y, and z axis in cm outside the ETA.
73-
[Default: 1 cm]
74-
75-
Returns
76-
=======
77-
None
78-
"""
79-
8027

28+
## Creates a object representing the settings for running the ADVANTG deterministic radiation trasport code calculations.
8129
def __init__(self, lib="dplus", method="cadis", outputs="mcnp silo", tnum=24, pt_src="True", mix_tol=0.01, pn_order=1, eta_x=0.5, eta_y=0.5, eta_z =0.5, foil_x=0.25, foil_y=0.25, foil_z=0.05, ext_spacing=1.0):
30+
## string The multi-group library used
31+
# [Default: "dplus"]
8232
self.lib=lib
33+
## string The solution method for ADVANTG (CADIS or DX)
34+
# [Default: "cadis"]
8335
self.method=method
36+
## string The output files to be produced
37+
# [Default: "mcnp"]
8438
self.outputs=outputs
39+
## int The tally number for calculating the adjoint flux
40+
# [Default: 24]
8541
self.tnum=tnum
42+
## string Whether or not the source should be treated as a point source in deterministic transport
43+
# [Default: False]
8644
self.pt_src=pt_src
45+
## string The material mix tolerance fraction. Controls the precision of mixed cells.
46+
# [Default: 0.01]
8747
self.mix_tol=mix_tol
48+
## integer The scattering order
49+
# [Default: 1]
8850
self.pn_order=pn_order
51+
## float The spacing of the mesh intervals in the x (radial) axis in cm in the ETA.
52+
# [Default: 0.5 cm]
8953
self.eta_x=eta_x
54+
## float The spacing of the mesh intervals in the y (radial) axis in cm in the ETA.
55+
# [Default: 0.5 cm]
9056
self.eta_y=eta_y
57+
## float The spacing of the mesh intervals in the z (axial) axis in cm in the ETA.
58+
# [Default: 0.5 cm]
9159
self.eta_z=eta_z
60+
## float The spacing of the mesh intervals in the x (radial) axis in cm near the foil.
61+
# [Default: 0.25 cm]
9262
self.foil_x=foil_x
63+
## float The spacing of the mesh intervals in the y (radial) axis in cm near the foil.
64+
# [Default: 0.25 cm]
9365
self.foil_y=foil_y
66+
## float The spacing of the mesh intervals in the z (axial) axis in cm near the foil.
67+
# [Default: 0.05 cm]
9468
self.foil_z=foil_z
69+
## float The spacing of the mesh intervals in x,y, and z axis in cm outside the ETA.
70+
# [Default: 1 cm]
9571
self.ext=ext_spacing
9672

9773

@@ -119,25 +95,24 @@ def __str__(self):
11995
s = header
12096
return s
12197

122-
98+
## Parses a ADVANTG settings csv input file.
99+
# The key word options are:
100+
# Library
101+
# Method
102+
# Outputs
103+
# Tally Number
104+
# Point Source
105+
# Material Mix Tolerance
106+
# Scattering Order
107+
# ETA X Spacing Interval
108+
# ETA Y Spacing Interval
109+
# ETA Z Spacing Interval
110+
# Foil X Spacing Interval
111+
# Foil Y Spacing Interval
112+
# Foil Z Spacing Interval
113+
# External Spacing Interval
123114
def read_settings(self, filename):
124-
"""Parses a ADVANTG settings csv input file.
125-
The key word options are:
126-
Library
127-
Method
128-
Outputs
129-
Tally Number
130-
Point Source
131-
Material Mix Tolerance
132-
Scattering Order
133-
ETA X Spacing Interval
134-
ETA Y Spacing Interval
135-
ETA Z Spacing Interval
136-
Foil X Spacing Interval
137-
Foil Y Spacing Interval
138-
Foil Z Spacing Interval
139-
External Spacing Interval
140-
"""
115+
141116
# Open file
142117
try:
143118
self.f = open(filename, 'r')
@@ -202,31 +177,14 @@ def read_settings(self, filename):
202177
# Test that the file closed
203178
assert self.f.closed==True, "File did not close properly."
204179

205-
#-------------------------------------------------------------------------------------------------------------#
180+
## Print the generated MCNP input deck to file
181+
# @param eta [ETA parameters object] An object that contains all of the constraints required to initialize the geometry
182+
# @param geom [MCNP_Geometry object] The geometry for running the MCNP radiation trasport code. Contains the surfaces, cells, and material information
183+
# @param S [ADVANTG_Settings object] An object representing the settings for running the ADVANTG radiation trasport code.
184+
# @param num integer The current cuckoo number being generated
185+
# @param cluster boolean (optional) An indicator to change the file to run on a cluster using Run_Transport function and slurm job submission
206186
def Print_ADVANTG_Input(eta,geom,S,num,cluster=False):
207-
"""
208-
Print the generated MCNP input deck to file
209-
210-
Parameters
211-
==========
212-
eta : ETA parameters object
213-
An object that contains all of the constraints required to initialize the geometry
214-
geom : MCNP_Geometry object
215-
The geometry for running the MCNP radiation trasport code. Contains the surfaces, cells, and material information
216-
S : ADVANTG_Settings object
217-
An object representing the settings for running the ADVANTG radiation trasport code.
218-
num : integer
219-
The current cuckoo number being generated
220-
221-
Optional
222-
========
223-
cluster : boolean
224-
An indicator to change the file to run on a cluster using Run_Transport function and slurm job submission
225-
226-
Returns
227-
=======
228-
None
229-
"""
187+
230188
path=os.path.abspath(os.path.join(os.path.abspath(os.getcwd()), os.pardir))
231189

232190
# Delete previous input file if present

0 commit comments

Comments
 (0)