forked from robertsj/detran-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeremy Roberts
committed
Sep 10, 2012
1 parent
0944bb8
commit 6f756f3
Showing
20 changed files
with
1,809 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,10 @@ | |
*.lai | ||
*.la | ||
*.a | ||
|
||
# Compile Python | ||
*.pyc | ||
|
||
# Binaries | ||
*.h5 | ||
*.silo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
detran-examples | ||
=============== | ||
|
||
Examples (and benchmarks) for libdetran | ||
Examples (and benchmarks) for libdetran using the | ||
Python front end. I'm keeping these separate from | ||
the main code so that updating and validating them | ||
is a bit easier. | ||
|
||
Current examples include | ||
|
||
slab-reactor | ||
------------ | ||
|
||
Simple two-group slab reactor problems used as | ||
benchmarks in several papers by Rahnema and his | ||
students at Georgia Tech | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# pyexamples/assemblies_c5g7.py | ||
# | ||
# 2-D assemblies definitions for the C5G7 benchmark | ||
|
||
from pins_c5g7 import * | ||
from detran import * | ||
|
||
def get_assemblies(number, flag) : | ||
""" Return the assemblies for the C5G7 benchmark. | ||
See get_pincells for parameter definition. | ||
""" | ||
|
||
# Shared things | ||
G = 4 # guide tube | ||
F = 5 # fission chamber | ||
pin0, pin1, pin2, pin3, pin4, pin5, pin6 = get_pins(number, flag) | ||
|
||
# Assembly 1 -- UO2 | ||
assem1 = Assembly.Create(17) | ||
assem1.add_pincell(pin0) | ||
assem1.add_pincell(pin1) | ||
assem1.add_pincell(pin2) | ||
assem1.add_pincell(pin3) | ||
assem1.add_pincell(pin4) | ||
assem1.add_pincell(pin5) | ||
assem1.add_pincell(pin6) | ||
pin_map1 = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,0,0,0,G,0,0,G,0,0,G,0,0,0,0,0, | ||
0,0,0,G,0,0,0,0,0,0,0,0,0,G,0,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,G,0,0,G,0,0,G,0,0,G,0,0,G,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,G,0,0,G,0,0,F,0,0,G,0,0,G,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,G,0,0,G,0,0,G,0,0,G,0,0,G,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,0,G,0,0,0,0,0,0,0,0,0,G,0,0,0, | ||
0,0,0,0,0,G,0,0,G,0,0,G,0,0,0,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, | ||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] | ||
assem1.finalize(pin_map1) | ||
|
||
# Assembly 2 - MOX | ||
assem2 = Assembly.Create(17) | ||
assem2.add_pincell(pin0) | ||
assem2.add_pincell(pin1) | ||
assem2.add_pincell(pin2) | ||
assem2.add_pincell(pin3) | ||
assem2.add_pincell(pin4) | ||
assem2.add_pincell(pin5) | ||
assem2.add_pincell(pin6) | ||
pin_map2 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, | ||
1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, | ||
1,2,2,2,2,G,2,2,G,2,2,G,2,2,2,2,1, | ||
1,2,2,G,2,3,3,3,3,3,3,3,2,G,2,2,1, | ||
1,2,2,2,3,3,3,3,3,3,3,3,3,2,2,2,1, | ||
1,2,G,3,3,G,3,3,G,3,3,G,3,3,G,2,1, | ||
1,2,2,3,3,3,3,3,3,3,3,3,3,3,2,2,1, | ||
1,2,2,3,3,3,3,3,3,3,3,3,3,3,2,2,1, | ||
1,2,G,3,3,G,3,3,F,3,3,G,3,3,G,2,1, | ||
1,2,2,3,3,3,3,3,3,3,3,3,3,3,2,2,1, | ||
1,2,2,3,3,3,3,3,3,3,3,3,3,3,2,2,1, | ||
1,2,G,3,3,G,3,3,G,3,3,G,3,3,G,2,1, | ||
1,2,2,2,3,3,3,3,3,3,3,3,3,2,2,2,1, | ||
1,2,2,G,2,3,3,3,3,3,3,3,2,G,2,2,1, | ||
1,2,2,2,2,G,2,2,G,2,2,G,2,2,2,2,1, | ||
1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, | ||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]; | ||
assem2.finalize(pin_map2) | ||
|
||
# Assembly 3 - Moderator | ||
assem3 = Assembly.Create(17) | ||
assem3.add_pincell(pin0) | ||
assem3.add_pincell(pin1) | ||
assem3.add_pincell(pin2) | ||
assem3.add_pincell(pin3) | ||
assem3.add_pincell(pin4) | ||
assem3.add_pincell(pin5) | ||
assem3.add_pincell(pin6) | ||
pin_map3 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | ||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]; | ||
assem3.finalize(pin_map3) | ||
|
||
return assem1, assem2, assem3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# pyexamples/core_c5g7.py | ||
# | ||
# 2-D core definition for the C5G7 benchmark | ||
|
||
from assemblies_c5g7 import get_assemblies | ||
from detran import * | ||
|
||
def get_core(number, flag) : | ||
""" Return the core for the C5G7 benchmark. | ||
See get_pincells for parameter definition. | ||
""" | ||
|
||
assemblies = get_assemblies(number, flag) | ||
core = Core.Create(3) | ||
core.add_assembly(assemblies[0]) | ||
core.add_assembly(assemblies[1]) | ||
core.add_assembly(assemblies[2]) | ||
core_map = [0,1,2, | ||
1,0,2, | ||
2,2,2] | ||
core.finalize(core_map) | ||
return core | ||
|
||
|
Oops, something went wrong.