5. Hands-on at the ARMI Terminal
This tutorial will walk you through some exploration with ARMI on the command line with the goal of exposing you to some of the capabilities and organization of information in the ARMI system.
5.1. Initializing and Exploring the ARMI Model
First we need to get some inputs. We built some from scratch in Building input files for a fast reactor and we pick those up and use them here as well:
Blueprints
Settings
Core map
Fuel management
You can load these inputs using armi’s init
function. This will build an Operator, a Reactor, and an Interface Stack full of various interfaces.
[1]:
# you can only configure an app once
import armi
if not armi.isConfigured():
armi.configure(armi.apps.App())
+===================================================+
| _ ____ __ __ ___ |
| / \ | _ \ | \/ | |_ _| |
| / _ \ | |_) | | |\/| | | | |
| / ___ \ | _ < | | | | | | |
| /_/ \_\ |_| \_\ |_| |_| |___| |
| Advanced Reactor Modeling Interface |
| |
| version 0.5.0 |
| |
+===================================================+
[2]:
o=armi.init(fName="../anl-afci-177/anl-afci-177.yaml");
o.r.core.sortAssemsByRing() # makes innermost assemblies appear first
=========== Settings Validation Checks ===========
=========== Case Information ===========
[info] --------------------- ------------------------------------------------------------
Case Title: anl-afci-177
Case Description: ANL-AFCI-177 CR 1.0 metal core but with HALEU instead of TRU
Run Type: Standard - Operator
Current User: runner
ARMI Location: /home/runner/work/armi/armi/armi
Working Directory: /home/runner/work/armi/armi/doc/anl-afci-177
Python Interpreter: 3.9.20 (main, Sep 9 2024, 03:07:22)
[GCC 11.4.0]
Master Machine: fv-az735-237
Number of Processors: 1
Date and Time: Fri Dec 20 17:34:31 2024
--------------------- ------------------------------------------------------------
=========== Input File Information ===========
[info] -------------------------------------------------------------------- ------------------------------ ------------
Input Type Path SHA-1 Hash
-------------------------------------------------------------------- ------------------------------ ------------
Case Settings anl-afci-177.yaml d0a0f84ddd
Blueprints anl-afci-177-blueprints.yaml 29f959e5a4
Included blueprints anl-afci-177-coreMap.yaml 5904530cb2
Geometry MISSING
<Setting shuffleLogic value:anl-afci-177-fuelManagement.py default:> anl-afci-177-fuelManagement.py 622957b035
-------------------------------------------------------------------- ------------------------------ ------------
=========== Machine Information ===========
[info] ------------ ---------------------- -------
Machine Number of Processors Ranks
------------ ---------------------- -------
fv-az735-237 1 0
------------ ---------------------- -------
=========== System Information ===========
[info] OS Info: "Ubuntu 22.04.5 LTS"
Processor(s):
processor : 0
vendor_id : AuthenticAMD
cpu family : 25
model : 1
model name : AMD EPYC 7763 64-Core Processor
stepping : 1
microcode : 0xffffffff
cpu MHz : 3273.471
cache size : 512 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso
bogomips : 4890.86
TLB size : 2560 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : AuthenticAMD
cpu family : 25
model : 1
model name : AMD EPYC 7763 64-Core Processor
stepping : 1
microcode : 0xffffffff
cpu MHz : 3241.792
cache size : 512 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso
bogomips : 4890.86
TLB size : 2560 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : AuthenticAMD
cpu family : 25
model : 1
model name : AMD EPYC 7763 64-Core Processor
stepping : 1
microcode : 0xffffffff
cpu MHz : 3259.924
cache size : 512 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso
bogomips : 4890.86
TLB size : 2560 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : AuthenticAMD
cpu family : 25
model : 1
model name : AMD EPYC 7763 64-Core Processor
stepping : 1
microcode : 0xffffffff
cpu MHz : 2734.399
cache size : 512 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass srso
bogomips : 4890.86
TLB size : 2560 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management:
=========== Reactor Cycle Information ===========
[info] --------------------------- -----------------------------------------------------------------
Reactor Thermal Power (MW): 1000.0
Number of Cycles: 10
Cycle Lengths: 411.11, 411.11, 411.11, 411.11, 411.11, 411.11, 411.11, 411.11,
411.11, 411.11
Availability Factors: 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9
Power Fractions: [1.0, 1.0], [1.0, 1.0], [1.0, 1.0], [1.0, 1.0], [1.0, 1.0], [1.0,
1.0], [1.0, 1.0], [1.0, 1.0], [1.0, 1.0], [1.0, 1.0]
Step Lengths (days): [184.9995, 184.9995], [184.9995, 184.9995], [184.9995, 184.9995],
[184.9995, 184.9995], [184.9995, 184.9995], [184.9995, 184.9995],
[184.9995, 184.9995], [184.9995, 184.9995], [184.9995, 184.9995],
[184.9995, 184.9995]
--------------------------- -----------------------------------------------------------------
=========== Constructing Reactor and Verifying Inputs ===========
[info] Constructing the `core`
=========== Adding Composites to <Core: core id:140207326517136> ===========
[info] Will expand HE, NA, SI, V, CR, MN, FE, NI, ZR, MO, W elementals to have natural isotopics
[info] Constructing assembly `inner fuel`
[warn] No component matched Flags.CLAD in <reflector block-bol-000 at ExCore XS: A ENV GP: A>. Returning None
[warn] Some component was missing in <reflector block-bol-000 at ExCore XS: A ENV GP: A> so pin-to-duct gap not calculated
[warn] The gap between wire wrap and clad in block <plenum block-bol-006 at ExCore XS: A ENV GP: A> was 3.999999999998449e-05 cm. Expected 0.0.
[info] Constructing assembly `middle core fuel`
[warn] Some component was missing in <reflector block-bol-000 at ExCore XS: B ENV GP: A> so pin-to-duct gap not calculated
[warn] The gap between wire wrap and clad in block <plenum block-bol-006 at ExCore XS: B ENV GP: A> was 3.999999999998449e-05 cm. Expected 0.0.
[info] Constructing assembly `outer core fuel`
[warn] Some component was missing in <reflector block-bol-000 at ExCore XS: C ENV GP: A> so pin-to-duct gap not calculated
[warn] The gap between wire wrap and clad in block <plenum block-bol-006 at ExCore XS: C ENV GP: A> was 3.999999999998449e-05 cm. Expected 0.0.
[info] Constructing assembly `radial reflector`
[warn] Some component was missing in <reflector block-bol-000 at ExCore XS: A ENV GP: A> so pin-to-duct gap not calculated
[info] Constructing assembly `radial shield`
[warn] Temperature 597.0 out of range (25 to 500) for B4C linear expansion percent
[warn] No component matched Flags.WIRE in <radial shield block-bol-000 at ExCore XS: A ENV GP: A>. Returning None
[info] Constructing assembly `control`
[info] Constructing assembly `ultimate shutdown`
=========== Verifying Assembly Configurations ===========
[warn] Cannot get pin pitch in <reflector B0000-000 at 001-001-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0001-000 at 003-012-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0002-000 at 005-023-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Could not create a spatialGrid for block control, multiplicities are not 1 or N they are {1.0}
[warn] Cannot get pin pitch in <reflector B0004-000 at 009-045-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0005-000 at 011-056-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0006-000 at 002-001-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0007-000 at 004-018-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0008-000 at 006-029-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0009-000 at 008-040-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0010-000 at 010-051-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0011-000 at 002-002-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0012-000 at 003-001-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0013-000 at 005-024-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0014-000 at 007-035-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0015-000 at 009-046-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0016-000 at 011-057-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0017-000 at 003-002-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0019-000 at 006-030-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0020-000 at 008-041-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0021-000 at 010-052-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0022-000 at 003-003-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0023-000 at 004-002-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0024-000 at 005-001-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0025-000 at 007-036-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0026-000 at 009-047-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0027-000 at 011-058-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0028-000 at 004-005-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0029-000 at 004-003-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0030-000 at 005-002-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0031-000 at 006-001-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0032-000 at 008-042-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0033-000 at 010-053-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0035-000 at 005-003-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0036-000 at 006-002-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0037-000 at 007-001-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0038-000 at 009-048-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0039-000 at 011-059-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0040-000 at 005-006-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0041-000 at 005-004-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0042-000 at 006-003-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0043-000 at 007-002-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0044-000 at 008-001-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0045-000 at 010-054-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0046-000 at 006-008-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0047-000 at 005-005-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0048-000 at 006-004-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0049-000 at 007-003-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0050-000 at 008-002-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0051-000 at 009-001-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0052-000 at 006-007-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0053-000 at 006-005-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0055-000 at 008-003-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0056-000 at 009-002-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0057-000 at 010-001-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0058-000 at 007-009-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0059-000 at 006-006-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0060-000 at 007-005-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0061-000 at 008-004-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0062-000 at 009-003-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0063-000 at 010-002-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0064-000 at 008-011-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0065-000 at 007-008-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0066-000 at 007-006-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0067-000 at 008-005-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0068-000 at 009-004-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0069-000 at 010-003-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0070-000 at 008-010-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0071-000 at 007-007-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0072-000 at 008-006-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0073-000 at 009-005-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0074-000 at 010-004-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0075-000 at 011-003-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0076-000 at 009-012-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0077-000 at 008-009-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0078-000 at 008-007-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0079-000 at 009-006-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0080-000 at 010-005-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0081-000 at 011-004-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0082-000 at 010-014-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0083-000 at 009-011-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0084-000 at 008-008-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0085-000 at 009-007-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0086-000 at 010-006-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0087-000 at 011-005-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0088-000 at 010-013-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0089-000 at 009-010-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0090-000 at 009-008-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0091-000 at 010-007-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0092-000 at 011-006-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0093-000 at 011-015-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0094-000 at 010-012-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0095-000 at 009-009-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0096-000 at 010-008-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0097-000 at 011-007-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0098-000 at 011-014-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0099-000 at 010-011-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0100-000 at 010-009-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0101-000 at 011-008-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0102-000 at 011-013-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0103-000 at 010-010-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <radial shield B0104-000 at 011-009-000 XS: A ENV GP: A> because it does not have a wire and a clad
=========== Summarizing Source of Material Data for <Core: core id:140207326517136> ===========
[info] --------------- -----------------
Material Name Source Location
--------------- -----------------
B4C ARMI
HT9 ARMI
Sodium ARMI
UZr ARMI
Void ARMI
--------------- -----------------
=========== Applying Geometry Modifications ===========
[info] Resetting the state of the converted reactor core model in <EdgeAssemblyChanger>
[info] Updating spatial grid pitch data for hex geometry
=========== Initializing Mesh, Assembly Zones, and Nuclide Categories ===========
[info] Nuclide categorization for cross section temperature assignments:
------------------ -------------------------------------------------------------
Nuclide Category Nuclides
------------------ -------------------------------------------------------------
Fuel ZR96, PU236, LFP38, ZR94, LFP39, LFP40, ZR92, PU240, U236,
AM242M, PU238, HE4, PU239, NP237, LFP41, CM242, PU241, PU242,
ZR90, CM244, U238, CM243, LFP35, AM243, U235, CM246,
ZR91, AM241, U234, CM245, CM247, DUMP2, DUMP1, NP238
Coolant NA23
Structure CR50, V50, FE57, NI58, V51, CR53, MO98, MO95, SI28,
NI64, NI61, MO96, W184, NI60, MO94, C, SI30,
CR52, MO97, B10, W186, W182, W183, MO92, NI62,
FE58, MO100, SI29, FE56, B11, CR54, FE54, MN55
------------------ -------------------------------------------------------------
[info] Constructing the `Spent Fuel Pool`
[warn] Changing the name of the Spent Fuel Pool to 'sfp'.
=========== Creating Interfaces ===========
=========== Interface Stack Summary ===========
[info] ------- ------------------------ --------------- ---------- --------- ----------- ------------
Index Type Name Function Enabled EOL order BOL forced
------- ------------------------ --------------- ---------- --------- ----------- ------------
01 Main main Yes Reversed No
02 FissionProductModel fissionProducts Yes Normal No
03 FuelHandler fuelHandler Yes Normal No
04 CrossSectionGroupManager xsGroups Yes Normal No
05 HistoryTracker history Yes Normal No
06 Report report Yes Normal No
07 Database database Yes Normal No
08 MemoryProfiler memoryProfiler Yes Normal No
09 Snapshot snapshot Yes Normal No
------- ------------------------ --------------- ---------- --------- ----------- ------------
=========== Triggering Init Event ===========
=========== 01 - main Init ===========
=========== 02 - fissionProducts Init ===========
=========== 03 - fuelHandler Init ===========
=========== 04 - xsGroups Init ===========
=========== 05 - history Init ===========
=========== 06 - report Init ===========
=========== 07 - database Init ===========
=========== 08 - memoryProfiler Init ===========
=========== 09 - snapshot Init ===========
=========== Completed Init Event ===========
You have now created an operator
object, which contains a Reactor
object (called o.r
) that
represents the beginning-of-life (BOL) state of the nuclear reactor defined in the inputs. The reactor looks
like this:
The data hierarchy in an ARMI model often is made up of:
Reactors
, often namedreactor
orr
contain a Core and possibly other equipment. They represent collections of assemblies.Assemblies
, often namedassembly
ora
, are individual pieces that collect into a System.Blocks
, often calledblock
orb
are divisions of the assemblies into sections one on top of the other.Components
The geometrically defined objects (Circles, Hexagons, Helices, Dodecagons) and their dimensions.Materials
are objects which have material properties like linear expansion coefficients, thermal conductivities, isotopic mass fractions, and densities.
Each of these objects house more than the listed objects, they also are responsible for a variety of state information like the reactor’s overall keff, flux, height, temperature, etc. In this section, we will explore these objects, see how to access them, and how to view their contained information.
Exploring it a little, we can list all the assemblies in the reactor with:
[3]:
core = o.r.core
core.getAssemblies()[:25] # only print the first 25
[3]:
[<radial shield Assembly A0005 at 011-056>,
<radial reflector Assembly A0004 at 009-045>,
<radial reflector Assembly A0010 at 010-051>,
<radial shield Assembly A0016 at 011-057>,
<control Assembly A0003 at 007-034>,
<outer core fuel Assembly A0009 at 008-040>,
<radial reflector Assembly A0015 at 009-046>,
<radial reflector Assembly A0021 at 010-052>,
<radial shield Assembly A0027 at 011-058>,
<middle core fuel Assembly A0002 at 005-023>,
<middle core fuel Assembly A0008 at 006-029>,
<outer core fuel Assembly A0014 at 007-035>,
<outer core fuel Assembly A0020 at 008-041>,
<radial reflector Assembly A0026 at 009-047>,
<radial reflector Assembly A0033 at 010-053>,
<radial shield Assembly A0039 at 011-059>,
<inner fuel Assembly A0001 at 003-012>,
<middle core fuel Assembly A0007 at 004-018>,
<middle core fuel Assembly A0013 at 005-024>,
<middle core fuel Assembly A0019 at 006-030>,
<outer core fuel Assembly A0025 at 007-036>,
<outer core fuel Assembly A0032 at 008-042>,
<radial reflector Assembly A0038 at 009-048>,
<radial shield Assembly A0045 at 010-054>,
<inner fuel Assembly A0000 at 001-001>]
Quiz Question 1
How many assemblies does the model have? (see answers at bottom)
Tip
A reactor is made up of assemblies, which are made up of blocks, and so on. Each composite ARMI
object has a getChildren
method that will retrieve a list of its contents. For clarity,
reactors have a getAssemblies()
method and assemblies have a getBlocks()
method,
but these do exactly the same thing as getChildren()
in both cases.
Reactor, assembly, blocks, etc. objects act like lists as well, so you can get the fifth assembly out of a reactor just like you’d get the fifth item out of any other list (don’t forget that Python uses zero-based numbering):
>>> fifthAssem = core[4]
You can drill down the hierarchy for a particular assembly:
[4]:
core = o.r[0]
print(core)
assem = core[1]
print(assem)
block = assem[5]
print(block)
print(f"Block's parent is: {block.parent}")
components = block.getChildren()
print(components)
material = components[0].material
print(material)
<Core: core id:140207326517136>
<inner fuel Assembly A0006 at 002-001>
<fuel B0006-005 at 002-001-005 XS: A ENV GP: A>
Block's parent is: <inner fuel Assembly A0006 at 002-001>
[<Circle: fuel>, <Circle: bond>, <Circle: clad>, <Helix: wire>, <DerivedShape: coolant>, <Hexagon: duct>, <Hexagon: intercoolant>]
<Material: UZr>
5.2. Exploring the state of the reactor
State can be explored using a variety of framework methods, as well as looking at state parameters. Let’s first try out some methods to find out how much U-235 is in the model and what the average uranium enrichment is:
[5]:
u235 = core.getMass('U235')
u238 = core.getMass('U238')
print(f"The core contains {u235} grams of U-235")
print(f"The average fissile enrichment is {u235/(u235+u238)}")
The core contains 913110.7780886302 grams of U-235
The average fissile enrichment is 0.1615298013245032
That’s how much U-235 is in the 1/3 core. If we want the total mass (including all nuclides), we can just leave the argument out:
[6]:
core.getMass()/1.e6
[6]:
27.630279585150355
[7]:
core.getMass?
Furthermore, you can get a list of available methods by pressing the tab key. Try core.
followed by [Tab]
. Try out some options!
Use tab completion to explore other methods of ARMI reactors assemblies and blocks. You can
view a summary of the methods of any object in the API documentation.
For a good example, see the API docs for a block
.
Next, lets find out what the number density of U235 is in a particular fuel block. We’ll use the FLAGS system to select a particular type of block (in this case, a fuel block):
[8]:
from armi.reactor.flags import Flags
b = core.getFirstBlock(Flags.FUEL)
print(f"U-235 ndens: {b.getNumberDensity('U235'):.4e} (atoms/bn-cm)")
print(f"Block name: {b.getName()}")
print(f"Block type: {b.getType()}")
U-235 ndens: 1.5940e-03 (atoms/bn-cm)
Block name: B0000-001
Block type: fuel
You can find lots of other details about this block with:
[9]:
b.printContents(includeNuclides=False)
[impt] <fuel B0000-001 at 001-001-001 XS: A ENV GP: A>
[impt] <Circle: fuel>
[impt] ---------------------------------------------------------------------------------------------
Fuel Dimensions - Of First Fuel Block
Tcold (25.0) Thot (500.0)
---------------------------------------------------------------------------------------------
Inner Diameter (cm) 0.0 0.0
Material UZr
Multiplicity 271 271
Name fuel
Outer Diameter (cm) 0.6029 0.6086118601525807
[impt] <Circle: bond>
[impt] ---------------------------------------------------------------------------------------------
Bond Dimensions - Of First Fuel Block
Tcold (447.0) Thot (447.0)
---------------------------------------------------------------------------------------------
Inner Diameter (cm) 0.6029 0.6086118601525807
Material Sodium
Multiplicity 271 271
Name bond
Outer Diameter (cm) 0.6962 0.6996347645979837
Thickness (cm) 0.0466500 0.0455115
[impt] <Circle: clad>
[impt] ---------------------------------------------------------------------------------------------
Cladding Dimensions - Of First Fuel Block
Tcold (25.0) Thot (450.0)
---------------------------------------------------------------------------------------------
Inner Diameter (cm) 0.6962 0.6996347645979837
Material HT9
Multiplicity 271 271
Name clad
Outer Diameter (cm) 0.808 0.8119863398379357
Thickness (cm) 0.0559000 0.0561758
[impt] <Helix: wire>
[impt] ---------------------------------------------------------------------------------------------
Wire Dimensions - Of First Fuel Block
Tcold (25.0) Thot (450.0)
---------------------------------------------------------------------------------------------
Axial Pitch (cm) 30.0 30.148007667250084
Helix Diameter (cm) 0.8888 0.8931849738217292
Inner Diameter (cm) 0.0 0.0
Material HT9
Multiplicity 271 271
Name wire
Outer Diameter (cm) 0.0808 0.08119863398379355
[impt] <DerivedShape: coolant>
[impt] ---------------------------------------------------------------------------------------------
Coolant Dimensions - Of First Fuel Block
Tcold (450.0) Thot (450.0)
---------------------------------------------------------------------------------------------
Material Sodium
Name coolant
[impt] <Hexagon: duct>
[impt] ---------------------------------------------------------------------------------------------
Duct Dimensions - Of First Fuel Block
Tcold (25.0) Thot (450.0)
---------------------------------------------------------------------------------------------
Inner Pitch (cm) 14.922 14.995619013690193
Material HT9
Multiplicity 1.0 1.0
Name duct
Outer Pitch (cm) 15.71 15.787506681749962
Thickness (cm) 0.3940000 0.3959438
[impt] <Hexagon: intercoolant>
[impt] ---------------------------------------------------------------------------------------------
Intercoolant Dimensions - Of First Fuel Block
Tcold (450.0) Thot (450.0)
---------------------------------------------------------------------------------------------
Inner Pitch (cm) 15.71 15.787506681749962
Material Sodium
Multiplicity 1.0 1.0
Name intercoolant
Outer Pitch (cm) 16.142 16.142
Thickness (cm) 0.2160000 0.1772467
5.3. Modifying the state of the reactor
Each object in the Reactor model has a bunch of state parameters contained in its special .p
attribute, called its Parameter Collection. The state parameters are defined both by the ARMI framework and the collection of plugins. For instance, you can look at the core’s keff parameters or each individual block’s power and multi-group flux parameters like this:
[10]:
print(b.p.power)
print(core.p.keff)
print(b.p.mgFlux)
0.0
0.0
None
As you might expect, the values are zero because we have not performed any physics calculations yet. We could run a physics plugin at this point to add physics state, but for this tutorial, we’ll just apply dummy data. Here’s a fake physics kernel that just sets a power distribution based on spatial location of each block (e.g. a spherical distribution):
[11]:
import numpy as np
midplane = core[0].getHeight()/2.0
center = np.array([0,0,midplane])
peakPower = 1e6
mgFluxBase = np.arange(5)
def setFakePower(core):
for a in core:
sf = a.getSymmetryFactor()
for b in a:
vol = b.getVolume()
coords = b.spatialLocator.getGlobalCoordinates()
r = np.linalg.norm(abs(coords-center))
fuelFlag = 10 if b.isFuel() else 1.0
# Use the symmetry factor to account for the central assembly being split
b.p.power = peakPower / r**2 * fuelFlag / sf
b.p.pdens = b.p.power/vol
b.p.mgFlux = mgFluxBase*b.p.pdens
if b.isFuel():
print(b.p.power, b.getLocation())
setFakePower(core)
201.2121328751081 001-001-001
283.72676915791163 001-001-002
429.75679542940935 001-001-003
726.2065240578604 001-001-004
1481.7416753196674 001-001-005
594.2890628648304 002-001-001
832.7118344145881 002-001-002
1247.3666431166173 002-001-003
2061.589294063221 002-001-004
3983.795411797809 002-001-005
594.2890628648304 002-002-001
832.7118344145881 002-002-002
1247.3666431166173 002-002-003
2061.589294063221 002-002-004
3983.795411797809 002-002-005
567.9068752321263 003-001-001
781.8211719174191 003-001-002
1136.546832731319 003-001-003
1775.4675690469703 003-001-004
3037.7948251721677 003-001-005
576.436766311226 003-002-001
798.0792090090622 003-002-002
1171.232095330452 003-002-003
1861.5889992921707 003-002-004
3298.9174953243905 003-002-005
567.9068752321263 003-003-001
781.8211719174191 003-003-002
1136.546832731319 003-003-003
1775.4675690469703 003-003-004
3037.7948251721677 003-003-005
576.4367663112263 003-012-001
798.0792090090622 003-012-002
1171.232095330452 003-012-003
1861.5889992921707 003-012-004
3298.9174953243905 003-012-005
543.7674846477125 004-002-001
736.7925560723418 004-002-002
1043.811476571239 004-002-003
1559.086660392669 004-002-004
2454.8587995069606 004-002-005
543.7674846477125 004-003-001
736.7925560723418 004-003-002
1043.811476571239 004-003-003
1559.086660392669 004-003-004
2454.8587995069606 004-003-005
543.7674846477125 004-005-001
736.7925560723418 004-005-002
1043.811476571239 004-005-003
1559.086660392669 004-005-004
2454.8587995069606 004-005-005
543.7674846477125 004-018-001
736.7925560723418 004-018-002
1043.811476571239 004-018-003
1559.086660392669 004-018-004
2454.8587995069606 004-018-005
482.26958247687014 005-001-001
628.2425670515395 005-001-002
838.5497047927524 005-001-003
1141.6712238490518 005-001-004
1557.9644917470105 005-001-005
501.16274186391075 005-002-001
660.6884827804276 005-002-002
897.3713186381708 005-002-003
1253.5417832788535 005-002-004
1774.0124459802742 005-002-005
507.7937693841397 005-003-001
672.2615830527569 005-003-002
918.8562740000916 005-003-003
1295.8684850899372 005-003-004
1859.989350727691 005-003-005
501.16274186391075 005-004-001
660.6884827804276 005-004-002
897.3713186381708 005-004-003
1253.5417832788535 005-004-004
1774.0124459802742 005-004-005
482.26958247687014 005-005-001
628.2425670515395 005-005-002
838.5497047927524 005-005-003
1141.6712238490518 005-005-004
1557.9644917470105 005-005-005
501.16274186391075 005-006-001
660.6884827804276 005-006-002
897.3713186381708 005-006-003
1253.5417832788535 005-006-004
1774.0124459802742 005-006-005
507.7937693841397 005-023-001
672.2615830527569 005-023-002
918.8562740000918 005-023-003
1295.8684850899372 005-023-004
1859.989350727691 005-023-005
501.16274186391075 005-024-001
660.6884827804276 005-024-002
897.3713186381708 005-024-003
1253.5417832788535 005-024-004
1774.0124459802742 005-024-005
433.2686512340821 006-001-001
547.5702713630133 006-001-002
700.749781243437 006-001-003
900.5628571891203 006-001-004
1141.0693805556527 006-001-005
453.75938768776024 006-002-001
580.7120147457107 006-002-002
755.9623309969782 006-002-003
993.8470981807069 006-002-004
1295.093144979462 006-002-005
464.7491657921643 006-003-001
598.8342655277754 006-003-002
786.9650870342906 006-003-003
1048.1321554651122 006-003-004
1388.8263886151203 006-003-005
464.7491657921643 006-004-001
598.8342655277754 006-004-002
786.9650870342906 006-004-003
1048.1321554651122 006-004-004
1388.8263886151203 006-004-005
453.75938768776024 006-005-001
580.7120147457109 006-005-002
755.9623309969782 006-005-003
993.8470981807073 006-005-004
1295.093144979462 006-005-005
433.2686512340821 006-006-001
547.5702713630133 006-006-002
700.7497812434373 006-006-003
900.5628571891203 006-006-004
1141.069380555653 006-006-005
453.75938768776024 006-007-001
580.7120147457109 006-007-002
755.9623309969782 006-007-003
993.8470981807073 006-007-004
1295.093144979462 006-007-005
464.7491657921643 006-008-001
598.8342655277754 006-008-002
786.9650870342906 006-008-003
1048.1321554651122 006-008-004
1388.8263886151203 006-008-005
464.7491657921643 006-029-001
598.8342655277754 006-029-002
786.9650870342906 006-029-003
1048.1321554651122 006-029-004
1388.8263886151203 006-029-005
453.75938768776024 006-030-001
580.7120147457107 006-030-002
755.9623309969782 006-030-003
993.8470981807069 006-030-004
1295.093144979462 006-030-005
385.40733734089025 007-001-001
473.28984043160057 007-001-002
583.5451425775741 007-001-003
715.8005320700539 007-001-004
859.8515267335054 007-001-005
405.7823467609031 007-002-001
504.39119992660204 007-002-002
631.5597751814538 007-002-003
789.4185339360051 007-002-004
968.3266188429413 007-002-005
419.07528981152086 007-003-001
525.0945662075254 007-003-002
664.3581773715332 007-003-003
841.335903664775 007-003-004
1047.624870298122 007-003-005
419.07528981152086 007-005-001
525.0945662075254 007-005-002
664.3581773715332 007-005-003
841.335903664775 007-005-004
1047.624870298122 007-005-005
405.78234676090335 007-006-001
504.39119992660204 007-006-002
631.5597751814539 007-006-003
789.4185339360054 007-006-004
968.3266188429413 007-006-005
385.40733734089025 007-007-001
473.28984043160057 007-007-002
583.5451425775741 007-007-003
715.8005320700539 007-007-004
859.8515267335054 007-007-005
405.7823467609031 007-008-001
504.39119992660204 007-008-002
631.5597751814538 007-008-003
789.4185339360051 007-008-004
968.3266188429413 007-008-005
419.07528981152086 007-009-001
525.0945662075254 007-009-002
664.3581773715332 007-009-003
841.3359036647746 007-009-004
1047.6248702981216 007-009-005
419.07528981152086 007-035-001
525.0945662075254 007-035-002
664.3581773715332 007-035-003
841.335903664775 007-035-004
1047.624870298122 007-035-005
405.7823467609031 007-036-001
504.39119992660204 007-036-002
631.5597751814538 007-036-003
789.4185339360051 007-036-004
968.3266188429413 007-036-005
360.0940445113585 008-002-001
435.6795184040706 008-002-002
527.4099165571945 008-002-003
633.1389396547851 008-002-004
743.2808920676976 008-002-005
374.1357488147068 008-003-001
456.40437929246855 008-003-002
558.0878077962307 008-003-003
677.871204505851 008-003-004
805.6974218981927 008-003-005
381.5754294076418 008-004-001
467.5242208618066 008-004-002
574.8051751545618 008-004-003
702.6944398365334 008-004-004
841.0090146000248 008-004-005
381.5754294076418 008-005-001
467.5242208618066 008-005-002
574.8051751545618 008-005-003
702.6944398365334 008-005-004
841.0090146000249 008-005-005
374.135748814707 008-006-001
456.40437929246855 008-006-002
558.0878077962307 008-006-003
677.871204505851 008-006-004
805.6974218981929 008-006-005
360.0940445113585 008-007-001
435.6795184040706 008-007-002
527.4099165571945 008-007-003
633.1389396547851 008-007-004
743.2808920676976 008-007-005
360.0940445113585 008-009-001
435.6795184040706 008-009-002
527.4099165571945 008-009-003
633.1389396547851 008-009-004
743.2808920676976 008-009-005
374.1357488147068 008-010-001
456.40437929246855 008-010-002
558.0878077962307 008-010-003
677.8712045058508 008-010-004
805.6974218981927 008-010-005
381.5754294076418 008-011-001
467.5242208618066 008-011-002
574.8051751545618 008-011-003
702.6944398365334 008-011-004
841.0090146000248 008-011-005
381.5754294076418 008-040-001
467.5242208618066 008-040-002
574.8051751545618 008-040-003
702.6944398365334 008-040-004
841.0090146000248 008-040-005
374.1357488147068 008-041-001
456.40437929246855 008-041-002
558.0878077962307 008-041-003
677.871204505851 008-041-004
805.6974218981927 008-041-005
360.0940445113585 008-042-001
435.6795184040708 008-042-002
527.4099165571945 008-042-003
633.1389396547851 008-042-004
743.2808920676978 008-042-005
[12]:
print(b.p.power)
print(b.p.pdens)
201.2121328751081
0.13164561512574927
[13]:
import matplotlib.pyplot as plt
a = b.parent
z = [b.spatialLocator.getGlobalCoordinates()[2] for b in a]
power = a.getChildParamValues('power')
plt.plot(z,power,'.-')
plt.title("Fake power distribution on reactor")
[13]:
Text(0.5, 1.0, 'Fake power distribution on reactor')
We can take a look at the spatial distribution as well:
[14]:
from armi.utils import plotting
# Note, if you were plotting outside jupyter, you could click
# on different depths at the bottom to view different axial planes.
plotting.plotBlockDepthMap(core, "power", depthIndex=5)
5.4. Modifying number densities
Analysts frequently want to modify number densities. For example, if you needed to compute a coolant density coefficient, you could simply reduce the amount of coolant in the core.
[15]:
sodiumBefore = core.getMass('NA')
print(f"Before: {sodiumBefore/1e6:.2f} MT Sodium")
for b in core.getBlocks(): # loop through all blocks
refDens = b.getNumberDensity('NA23')
b.setNumberDensity('NA23',refDens*0.98) # reduce Na density by 2%
sodiumAfter = core.getMass('NA')
print(f"After: {sodiumAfter/1e6:.2f} MT Sodium")
Before: 2.48 MT Sodium
After: 2.43 MT Sodium
If you analyze the keff with a physics plugin before and after, the change in the core.p.keff
param would determine your density coefficient of reactivity.
5.5. Saving state to disk
During analysis, it’s often useful to save the reactor state to disk in a database. The ARMI database package handles this, and writes it out to an HDF-formatted file. This is typically done automatically at each point in time in a normal simulation, and can also be done manually, like this:
[16]:
dbi = o.getInterface("database")
dbi.initDB()
dbi.database.writeToDB(o.r)
[info] Opening database file at /home/runner/.armi/0-20241220173433494774/anl-afci-177.h5
[info] Writing to database for statepoint: /c00n00
5.6. Fuel management
One plugin that comes with the framework is the Fuel Handler. It attaches the Fuel Handler interface, which we can grab now to move fuel around. In a typical ARMI run, the detailed fuel management choices are specified by the user-input custom shuffle logic file. In this particular example, we will simply swap the 10 highest-power fuel assemblies with the 10 lowest-power ones.
[17]:
from armi.physics.fuelCycle import fuelHandlers
fh = fuelHandlers.fuelHandlerFactory(o)
[18]:
moved = []
for n in range(10):
high = fh.findAssembly(param="power", compareTo=1.0e6, blockLevelMax=True, exclusions=moved)
low = fh.findAssembly(param="power", compareTo=0.0, blockLevelMax=True, exclusions=moved)
fh.swapAssemblies(high, low)
moved.extend([high, low])
[19]:
plotting.plotBlockDepthMap(core, "power", depthIndex=5)
# You can also plot total assembly params, which are the sum of block params
plotting.plotFaceMap(core, "power", vals='sum')
We can write this new state to DB as well, since we’ve shuffled the fuel
[20]:
o.r.p.timeNode +=1
dbi.database.writeToDB(o.r)
dbi.database.close()
[info] Writing to database for statepoint: /c00n01
5.7. Loading from the database
Once you have a database, you can use it to load a Reactor object from any of the states that were written to it. First, create a Database object, then open it and call its load()
method.
[21]:
from armi.bookkeeping import db
databaseLocation = "../tutorials/anl-afci-177.h5"
cycle, timeNode = 0, 1
dbo = db.databaseFactory(databaseLocation, "r")
with dbo:
# Load a new reactor object from the requested cycle and time node
r = dbo.load(cycle, timeNode)
[info] Loading reactor state for time node (0, 1)
[info] Applying <Migration from 0.1.2: Removes now-invalid `centers:` lines fro...
[info] Removing `centers:` sections.
[info] Applying <Migration from 0.1.2: Update elemental nuclide flags....
[warn] Could not create a spatialGrid for block control, multiplicities are not 1 or N they are {1}
[warn] Cannot get pin pitch in <reflector B0023-000 at 008-040-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0017-000 at 008-041-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0078-000 at 003-012-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0072-000 at 004-018-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0000-000 at 008-042-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0032-000 at 001-001-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0050-000 at 002-001-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0055-000 at 003-001-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0077-000 at 002-002-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0020-000 at 003-002-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0009-000 at 004-002-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0006-000 at 008-002-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0070-000 at 003-003-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0012-000 at 008-003-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0061-000 at 004-005-000 XS: C ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0028-000 at 008-004-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0007-000 at 008-006-000 XS: B ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0001-000 at 008-007-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0022-000 at 008-010-000 XS: A ENV GP: A> because it does not have a wire and a clad
[warn] Cannot get pin pitch in <reflector B0011-000 at 008-009-000 XS: A ENV GP: A> because it does not have a wire and a clad
=========== Initializing Mesh, Assembly Zones, and Nuclide Categories ===========
[info] Will expand HE, NA, SI, V, CR, MN, FE, NI, ZR, MO, W elementals to have natural isotopics
[info] Constructing assembly `inner fuel`
[warn] Some component was missing in <reflector block-bol-000 at ExCore XS: A ENV GP: A> so pin-to-duct gap not calculated
[info] Constructing assembly `middle core fuel`
[warn] Some component was missing in <reflector block-bol-000 at ExCore XS: B ENV GP: A> so pin-to-duct gap not calculated
[info] Constructing assembly `outer core fuel`
[warn] Some component was missing in <reflector block-bol-000 at ExCore XS: C ENV GP: A> so pin-to-duct gap not calculated
[info] Constructing assembly `radial reflector`
[warn] Some component was missing in <reflector block-bol-000 at ExCore XS: A ENV GP: A> so pin-to-duct gap not calculated
[info] Constructing assembly `radial shield`
[info] Constructing assembly `control`
[info] Constructing assembly `ultimate shutdown`
=========== Verifying Assembly Configurations ===========
[info] Nuclide categorization for cross section temperature assignments:
------------------ -------------------------------------------------------------
Nuclide Category Nuclides
------------------ -------------------------------------------------------------
Fuel ZR96, PU236, LFP38, ZR94, LFP39, LFP40, ZR92, PU240, U236,
AM242M, PU238, HE4, PU239, NP237, LFP41, CM242, PU241, PU242,
ZR90, CM244, U238, CM243, LFP35, AM243, U235, CM246,
ZR91, AM241, U234, CM245, CM247, DUMP2, DUMP1, NP238
Coolant NA23
Structure CR50, V50, FE57, NI58, V51, CR53, MO98, MO95, SI28,
NI64, NI61, MO96, W184, NI60, MO94, C, SI30,
CR52, MO97, B10, W186, W182, W183, MO92, NI62,
FE58, MO100, SI29, FE56, B11, CR54, FE54, MN55
------------------ -------------------------------------------------------------
[warn] Changing the name of the Spent Fuel Pool to 'sfp'.
We can see that the time node is what we expect (node 1), and there is some fission product mass since we loaded from a cycle after a depletion step.
[22]:
print(r.p.timeNode)
print(o.r.getFissileMass())
1
909142.5216630063
Having a Reactor object by itself can be very useful for all sorts of post-processing tasks. However, sometimes we may wish initialize more ARMI components to do more advanced tasks and interactive follow-on analysis. Lucky for us, the database stores the settings that were used to run the case in the first place. We can get them like this:
[23]:
with dbo:
cs = dbo.loadCS()
print(cs["neutronicsKernel"])
With this Settings
object, we could create a brand new Case
and Operator
and do all sorts of magic. This way of interacting with ARMI is rather advanced, and beyond the scope of this tutorial.
That’s just a brief exploration of the data model. Hopefully it helped orient you to the underlying ARMI structure.