Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
neams-th-coe
large-problems
Commits
d9b71435
Commit
d9b71435
authored
Feb 24, 2021
by
April Novak
Browse files
Address review comments.
parent
f87749fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
ann127602_yuhsiang_E39M/openmc_model.py
View file @
d9b71435
...
...
@@ -42,7 +42,7 @@ radius_pyc_outer = radius_sic + thickness_pyc_outer
packing_fraction
=
0.40
# UCBTH-14-002, Table 2-1
if
random_distribution
==
0
:
pitch_triso_lattice
=
(
radius_pyc_outer
)
*
(
4
*
pi
/
3
/
packing_fraction
)
**
0.33333333333333333333333
pitch_triso_lattice
=
(
radius_pyc_outer
)
*
(
4
*
pi
/
3
/
packing_fraction
)
**
(
1
/
3.
)
# Pebble
radius_pebble_inner
=
2.5
/
2
# UCBTH-14-002, Table 2-1
...
...
@@ -93,8 +93,8 @@ if verbose:
print
(
" TRISO particle SiC radius [cm] = {}"
.
format
(
radius_sic
))
print
(
" TRISO particle oPyC radius [cm] = {}"
.
format
(
radius_pyc_outer
))
print
(
" TRISO particles packing fraction [--] = {}"
.
format
(
packing_fraction
))
print
(
" TRISO lattice pitch [cm] = {}"
.
format
(
pitch_triso_lattice
))
if
random_distribution
==
0
:
print
(
" TRISO lattice pitch [cm] = {}"
.
format
(
pitch_triso_lattice
))
print
(
" TRISO particles regular lattice [cm] = {}"
.
format
(
pitch_triso_lattice
))
print
(
" Pebble core radius [cm] = {}"
.
format
(
radius_pebble_inner
))
print
(
" Pebble shell outer radius [cm] = {}"
.
format
(
radius_pebble_outer
))
...
...
@@ -253,23 +253,26 @@ if random_distribution==0:
else
:
c_triso_pyc_outer_random
=
openmc
.
Cell
(
name
=
'c_triso_pyc_outer_random'
,
fill
=
m_graphite_pyc
,
region
=+
s_sic
)
u_triso_random
=
openmc
.
Universe
(
cells
=
[
c_triso_fuel
,
c_triso_c_buffer
,
c_triso_pyc_inner
,
c_triso_sic
,
c_triso_pyc_outer_random
])
if
not
os
.
path
.
exists
(
'triso_centers.npy'
):
print
(
"Writing random TRISO centers to file triso_centers.npy"
)
r_triso_random
=
+
s_pebble_inner
&
-
s_pebble_central
spheres_random
=
openmc
.
model
.
pack_spheres
(
radius
=
radius_pyc_outer
,
region
=
r_triso_random
,
pf
=
packing_fraction
,
initial_pf
=
0.15
)
triso_random
=
[
openmc
.
model
.
TRISO
(
radius_pyc_outer
,
u_triso_random
,
i
)
for
i
in
spheres_random
]
centers
=
np
.
vstack
([
i
.
center
for
i
in
triso_random
])
np
.
save
(
'triso_centers.npy'
,
triso_random
)
if
verbose
:
packing_fraction
=
len
(
triso_random
)
*
radius_pyc_outer
**
3
/
(
radius_pebble_central
**
3
-
radius_pebble_inner
**
3
)
print
(
"Calculated packing fraction of the TRISO particles random distribution = {}"
.
format
(
packing_fraction
))
np
.
save
(
'triso_centers.npy'
,
triso_random
)
print
(
"Reading random TRISO centers from file triso_centers.npy"
)
triso_random
=
np
.
load
(
'triso_centers.npy'
)
lower_left
,
upper_right
=
c_pebble_central
.
region
.
bounding_box
shape
=
(
5
,
5
,
5
)
pitch
=
(
upper_right
-
lower_left
)
/
shape
l_triso
=
openmc
.
model
.
create_triso_lattice
(
triso_random
,
lower_left
,
pitch
,
shape
,
m_graphite_matrix
)
print
(
"File triso_centers.npy reading completed"
)
print
(
"Reading random TRISO centers from file triso_centers.npy"
)
triso_random
=
np
.
load
(
'triso_centers.npy'
,
allow_pickle
=
True
)
lower_left
,
upper_right
=
c_pebble_central
.
region
.
bounding_box
shape
=
(
5
,
5
,
5
)
pitch
=
(
upper_right
-
lower_left
)
/
shape
l_triso
=
openmc
.
model
.
create_triso_lattice
(
triso_random
,
lower_left
,
pitch
,
shape
,
m_graphite_matrix
)
print
(
"File triso_centers.npy reading completed"
)
# Fil central pebble cell with the TRISO lattice
c_pebble_central
.
fill
=
l_triso
...
...
@@ -307,7 +310,7 @@ for center, name in zip(pebble_centers, cell_name):
# Place pebbles into a lattice
llc_vessel
,
urc_vessel
=
vessel_region
.
bounding_box
l_pebble_shape
=
np
.
asarray
((
1
0
,
1
0
,
1
0
))
l_pebble_shape
=
np
.
asarray
((
2
0
,
2
0
,
2
0
))
l_pebble_pitch
=
(
urc_vessel
-
llc_vessel
)
/
l_pebble_shape
l_pebble
=
openmc
.
model
.
create_triso_lattice
(
pebble_trisos
,
llc_vessel
,
l_pebble_pitch
,
l_pebble_shape
,
m_flibe
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment