From 83df2127417dd454376155ebd2e49d725f0e0f4c Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Wed, 22 Jan 2025 17:15:52 +0000 Subject: [PATCH 01/20] Fix to keff for MG scattering --- Tallies/TallyClerks/keffImplicitClerk_class.f90 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Tallies/TallyClerks/keffImplicitClerk_class.f90 b/Tallies/TallyClerks/keffImplicitClerk_class.f90 index 008c50e02..d7f4852dd 100644 --- a/Tallies/TallyClerks/keffImplicitClerk_class.f90 +++ b/Tallies/TallyClerks/keffImplicitClerk_class.f90 @@ -26,7 +26,7 @@ module keffImplicitClerk_class private - !! Locations of diffrent bins wrt memory Address of the clerk + !! Locations of different bins wrt memory Address of the clerk integer(shortInt), parameter :: MEM_SIZE = 5 integer(longInt), parameter :: IMP_PROD = 0 ,& ! Implicit neutron production (from fission) SCATTER_PROD = 1 ,& ! Analog Stattering production (N,XN) @@ -38,7 +38,7 @@ module keffImplicitClerk_class !! and on analog estimators of (N,XN) reactions and leakage !! !! Private Members: - !! targetSTD -> Target Standard Deviation for convergance check + !! targetSTD -> Target Standard Deviation for convergence check !! !! Interface: !! tallyClerk interface @@ -96,10 +96,10 @@ subroutine init(self, dict, name) ! Set name call self % setName(name) - ! Configure convergance trigger + ! Configure convergence trigger call dict % getOrDefault(chr,'trigger','no') - ! Read convergance target + ! Read convergence target if( charCmp(chr,'yes')) then call dict % get(self % targetSTD,'SDtarget') @@ -126,7 +126,7 @@ elemental subroutine kill(self) end subroutine kill !! - !! Returns array of codes that represent diffrent reports + !! Returns array of codes that represent different reports !! !! See tallyClerk_inter for details !! @@ -225,7 +225,7 @@ subroutine reportOutColl(self, p, MT, muL, xsData, mem) score = 2.0_defReal * p % preCollision % wgt case(N_4N) score = 3.0_defReal * p % preCollision % wgt - case(macroAllScatter) ! Catch weight change for MG scattering + case(macroAllScatter, macroIEScatter) ! Catch weight change for MG scattering score = max(p % w - p % preCollision % wgt, ZERO) case default score = ZERO @@ -289,7 +289,7 @@ subroutine reportCycleEnd(self, end, mem) end subroutine reportCycleEnd !! - !! Perform convergance check in the Clerk + !! Perform convergence check in the Clerk !! !! See tallyClerk_inter for details !! @@ -306,7 +306,7 @@ function isConverged(self, mem) result(isIt) end function isConverged !! - !! Display convergance progress on the console + !! Display convergence progress on the console !! !! See tallyClerk_inter for details !! From 0791fe251f443601ed3b11332c7ac187d5ab13c4 Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Thu, 6 Feb 2025 19:15:33 +0000 Subject: [PATCH 02/20] BEAVRS_HZP and geometry fixes Added in the BEAVRS model with the D-bank partially inserted. Also fixed a flaw in the geometry where the outermost cell was defined such that there could be a rare particle lost between it and the geometry boundary. --- InputFiles/Benchmarks/BEAVRS/BEAVRS2D | 3 +- .../Benchmarks/BEAVRS/{BEAVRS => BEAVRS_ARO} | 9 +- InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP | 2410 +++++++++++++++++ 3 files changed, 2416 insertions(+), 6 deletions(-) rename InputFiles/Benchmarks/BEAVRS/{BEAVRS => BEAVRS_ARO} (97%) create mode 100644 InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP diff --git a/InputFiles/Benchmarks/BEAVRS/BEAVRS2D b/InputFiles/Benchmarks/BEAVRS/BEAVRS2D index 0ace8d16c..899a59c71 100644 --- a/InputFiles/Benchmarks/BEAVRS/BEAVRS2D +++ b/InputFiles/Benchmarks/BEAVRS/BEAVRS2D @@ -114,7 +114,8 @@ geometry { thickGrid {type simpleCell; id 55; surfaces (90 -91); filltype mat; material Inconel;} thinGrid {type simpleCell; id 56; surfaces (-92 93); filltype mat; material Inconel;} - pressureVessel { type simpleCell; id 7; surfaces (-1 2); filltype mat; material CarbonSteel;} + ! Does not use surface 1 to define it as that bounds the geometry + pressureVessel { type simpleCell; id 7; surfaces (2); filltype mat; material CarbonSteel;} RPVLiner { type simpleCell; id 8; surfaces (-2 3); filltype mat; material SS304;} outerWater1 {type simpleCell; id 9; surfaces (-3 4 ); filltype mat; material Water;} diff --git a/InputFiles/Benchmarks/BEAVRS/BEAVRS b/InputFiles/Benchmarks/BEAVRS/BEAVRS_ARO similarity index 97% rename from InputFiles/Benchmarks/BEAVRS/BEAVRS rename to InputFiles/Benchmarks/BEAVRS/BEAVRS_ARO index 52e5cb575..dd3ed25c5 100644 --- a/InputFiles/Benchmarks/BEAVRS/BEAVRS +++ b/InputFiles/Benchmarks/BEAVRS/BEAVRS_ARO @@ -3,14 +3,12 @@ !! This is not a fully faithful replica of BEAVRS at HZP: !! all rods are fully withdrawn. !! In reality, some rods are partially inserted. -!! TODO: add rods in the appropriate assemblies at the -!! correct heights! !! type eigenPhysicsPackage; -pop 10000000; +pop 1000000; active 50; -inactive 200; +inactive 150; XSdata ce; dataType ce; @@ -216,7 +214,8 @@ geometry { thickGrid {type simpleCell; id 555; surfaces (90 ); filltype mat; material Inconel;} thinGrid {type simpleCell; id 556; surfaces (92 ); filltype mat; material Zircaloy;} - pressureVessel { type simpleCell; id 7; surfaces (-1 2); filltype mat; material CarbonSteel;} + // Don't need to bound PV by 1 since it is the bounding surface of the geometry. + pressureVessel { type simpleCell; id 7; surfaces ( 2); filltype mat; material CarbonSteel;} RPVLiner { type simpleCell; id 8; surfaces (-2 3); filltype mat; material SS304;} outerWater1 {type simpleCell; id 9; surfaces (-3 4 ); filltype mat; material Water;} diff --git a/InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP b/InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP new file mode 100644 index 000000000..5a740ce28 --- /dev/null +++ b/InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP @@ -0,0 +1,2410 @@ +!! +!! 3D BEAVRS benchmark +!! At HZP, the D bank of rods is partially inserted up +!! to 115 steps inserted / 113 steps withdrawn. +!! A step corresponds to an increment of 1.58193cm +!! +type eigenPhysicsPackage; + +pop 1000000; +active 50; +inactive 250; +XSdata ce; +dataType ce; + +collisionOperator { neutronCE {type neutronCEstd;}} + +transportOperator { + !type transportOperatorDT; + type transportOperatorHT; cache 1; + } + +inactiveTally { + shannon { + type shannonEntropyClerk; + map {type multiMap; + maps (xax yax zax); + xax { type spaceMap; grid lin; min -161.2773; max 161.2773; N 15; axis x;} + yax { type spaceMap; grid lin; min -161.2773; max 161.2773; N 15; axis y;} + zax { type spaceMap; grid lin; min 36.748; max 402.508; N 15; axis z;} + } + cycles 200; + } + +} + +activeTally { + pinFissRadial { type collisionClerk; response (fission); fission { type macroResponse; MT -6;} + map {type multiMap; maps (xax yax); + xax {type spaceMap; axis x; grid lin; N 255; min -161.2773; max 161.2773; } + yax {type spaceMap; axis y; grid lin; N 255; min -161.2773; max 161.2773; } + } + } + assemblyFissRadial { type collisionClerk; response (fission); fission { type macroResponse; MT -6;} + map {type multiMap; maps (xax yax); + xax {type spaceMap; axis x; grid lin; N 15; min -161.2773; max 161.2773; } + yax {type spaceMap; axis y; grid lin; N 15; min -161.2773; max 161.2773; } + } + } + fissionAxial { type collisionClerk; response (fission); fission { type macroResponse; MT -6;} + map {type spaceMap; axis z; grid lin; N 60; min 36.748; max 402.508;} + } + fissionYZ { type collisionClerk; response (fission); fission { type macroResponse; MT -6;} + map {type multiMap; maps (yax zax); + yax {type spaceMap; axis y; grid lin; N 255; min -161.2773; max 161.2773; } + zax {type spaceMap; axis z; grid lin; N 60; min 36.748; max 402.508;} + } + } +} + +geometry { + type geometryStd; + boundary ( 0 0 0 0 0 0); + graph {type shrunk;} + + surfaces { + + // thickness specifications for RPV and RPV liner + outerRPV { id 1; type zTruncCylinder; radius 241.3; origin (0.0 0.0 230.0); halfwidth 230; } + innerRPV { id 2; type zCylinder; radius 219.710; origin (0.0 0.0 0.0); } + innerRPVLiner { id 3; type zCylinder; radius 219.150; origin (0.0 0.0 0.0); } + + // thickness specifications for neutron shield + outerBoundNS { id 4; type zCylinder; radius 201.630; origin (0.0 0.0 0.0); } + innerBoundNS { id 5; type zCylinder; radius 194.84; origin (0.0 0.0 0.0); } + + // thickness specifications for core barrel + outerCoreBarrel { id 6; type zCylinder; radius 193.675; origin (0.0 0.0 0.0); } + innerCoreBarrel { id 7; type zCylinder; radius 187.96; origin (0.0 0.0 0.0); } + + // four planes that intersect to bound the Neutron shield panel + P1 { id 8; type plane; coeffs (-0.48480962025 0.87461970714 0.0 0.0);} + P2 { id 9; type plane; coeffs (-0.87461970714 0.48480962025 0.0 0.0);} + P3 { id 10; type plane; coeffs (-0.87461970714 -0.48480962025 0.0 0.0);} + P4 { id 11; type plane; coeffs (-0.48480962025 -0.87461970714 0.0 0.0);} + + // bounding widths for baffle on various sides + // right & left refers to the side of the reactor that it is on + // close/away refers to its location in relation to the LATTICE it is a part of + // (NOT the reactor itself) + rightClose { id 50; type plane; coeffs (1.0 0.0 0.0 8.36662);} + rightAway { id 51; type plane; coeffs (1.0 0.0 0.0 10.58912);} + leftClose { id 52; type plane; coeffs (-1.0 0.0 0.0 8.36662);} + leftAway { id 53; type plane; coeffs (-1.0 0.0 0.0 10.58912);} + bottomClose { id 54; type plane; coeffs (0.0 -1.0 0.0 8.36662);} + bottomAway { id 55; type plane; coeffs (0.0 -1.0 0.0 10.58912);} + topClose { id 56; type plane; coeffs (0.0 1.0 0.0 8.36662);} + topAway { id 57; type plane; coeffs (0.0 1.0 0.0 10.58912);} + + // thickness specifications for grid with thickness of 0.0198cm (Inconel) + pinThickGridInner { id 90; type zSquareCylinder; origin (0.0 0.0 0.0); halfwidth (0.61015 0.61015 0.0); } + pinThickGridOuter { id 91; type zSquareCylinder; origin (0.0 0.0 0.0); halfwidth (0.62992 0.62992 0.0); } + + // thickness specifications for grid with thickness of 0.0194cm (Zircaloy) + pinThinGridInner { id 92; type zSquareCylinder; origin (0.0 0.0 0.0); halfwidth (0.61049 0.61049 0.0); } + pinThinGridOuter { id 93; type zSquareCylinder; origin (0.0 0.0 0.0); halfwidth (0.62992 0.62992 0.0); } + + // inner and outer surfaces of assembly sleeves (both SS and Zircaloy) + assemblySleeveInner { id 94; type zSquareCylinder; origin (0.0 0.0 0.0); halfwidth (10.70864 10.70864 0.0); } + assemblySleeveOuter { id 95; type zSquareCylinder; origin (0.0 0.0 0.0); halfwidth (10.74798 10.74798 0.0); } + + + // Axial planes across core height + // Names are based on axial heights + plane460 { id 100; type plane; coeffs (0.0 0.0 1.0 460.0 ); } + plane431p876 { id 101; type plane; coeffs (0.0 0.0 1.0 431.876); } + plane423p049 { id 102; type plane; coeffs (0.0 0.0 1.0 423.049); } + plane421p532 { id 103; type plane; coeffs (0.0 0.0 1.0 421.532); } + plane419p704 { id 104; type plane; coeffs (0.0 0.0 1.0 419.704); } + plane417p164 { id 105; type plane; coeffs (0.0 0.0 1.0 417.164); } + plane415p164 { id 106; type plane; coeffs (0.0 0.0 1.0 415.164); } + plane411p806 { id 107; type plane; coeffs (0.0 0.0 1.0 411.806); } + plane403p778 { id 108; type plane; coeffs (0.0 0.0 1.0 403.778); } + plane402p508 { id 109; type plane; coeffs (0.0 0.0 1.0 402.508); } + plane401p238 { id 110; type plane; coeffs (0.0 0.0 1.0 401.238); } + plane364p725 { id 111; type plane; coeffs (0.0 0.0 1.0 364.725); } + plane359p01 { id 112; type plane; coeffs (0.0 0.0 1.0 359.01 ); } + plane312p528 { id 113; type plane; coeffs (0.0 0.0 1.0 312.528); } + plane306p813 { id 114; type plane; coeffs (0.0 0.0 1.0 306.813); } + plane260p331 { id 115; type plane; coeffs (0.0 0.0 1.0 260.331); } + plane254p616 { id 116; type plane; coeffs (0.0 0.0 1.0 254.616); } + plane208p134 { id 117; type plane; coeffs (0.0 0.0 1.0 208.134); } + plane202p419 { id 118; type plane; coeffs (0.0 0.0 1.0 202.419); } + plane155p937 { id 119; type plane; coeffs (0.0 0.0 1.0 155.937); } + plane150p222 { id 120; type plane; coeffs (0.0 0.0 1.0 150.222); } + plane143p428 { id 121; type plane; coeffs (0.0 0.0 1.0 143.428); } + plane103p74 { id 122; type plane; coeffs (0.0 0.0 1.0 103.74 ); } + plane98p025 { id 123; type plane; coeffs (0.0 0.0 1.0 98.025 ); } + plane41p828 { id 124; type plane; coeffs (0.0 0.0 1.0 41.828 ); } + plane40p558 { id 125; type plane; coeffs (0.0 0.0 1.0 40.558 ); } + plane40p52 { id 126; type plane; coeffs (0.0 0.0 1.0 40.52 ); } + plane39p958 { id 127; type plane; coeffs (0.0 0.0 1.0 39.958 ); } + plane38p66 { id 128; type plane; coeffs (0.0 0.0 1.0 38.66 ); } + plane37p1621 { id 129; type plane; coeffs (0.0 0.0 1.0 37.1621); } + plane36p748 { id 130; type plane; coeffs (0.0 0.0 1.0 36.748 ); } + plane35 { id 131; type plane; coeffs (0.0 0.0 1.0 35.0 ); } + plane20 { id 132; type plane; coeffs (0.0 0.0 1.0 20.0 ); } + plane0 { id 133; type plane; coeffs (0.0 0.0 1.0 0.0 ); } + + planeSteelBottom { id 134; type plane; coeffs (0.0 0.0 1.0 400.638); } + planeCRLowerBottom { id 135; type plane; coeffs (0.0 0.0 1.0 402.508); } // same as 109 on withdrawal + planeCRUpperBottom { id 136; type plane; coeffs (0.0 0.0 1.0 504.108); } // out of core on withdrawal + + plane322p1861 {id 137; type plane; coeffs (0 0 1 322.18609);} + plane220p586 {id 138; type plane; coeffs (0 0 1 220.5861);} + plane218p716 {id 139; type plane; coeffs (0 0 1 218.71609);} + + } + + cells { + + // assembly wrappers and surrounding water at various heights + wrapper1 {type simpleCell; id 2001; surfaces (94 -95 129 -126); filltype mat; material SS304;} + wrapper2 {type simpleCell; id 2002; surfaces (94 -95 123 -122); filltype mat; material Zircaloy;} + wrapper3 {type simpleCell; id 2003; surfaces (94 -95 120 -119); filltype mat; material Zircaloy;} + wrapper4 {type simpleCell; id 2004; surfaces (94 -95 118 -117); filltype mat; material Zircaloy;} + wrapper5 {type simpleCell; id 2005; surfaces (94 -95 116 -115); filltype mat; material Zircaloy;} + wrapper6 {type simpleCell; id 2006; surfaces (94 -95 114 -113); filltype mat; material Zircaloy;} + wrapper7 {type simpleCell; id 2007; surfaces (94 -95 112 -111); filltype mat; material Zircaloy;} + wrapper8 {type simpleCell; id 2008; surfaces (94 -95 107 -106); filltype mat; material SS304;} + + assemWater0 {type simpleCell; id 2009; surfaces (94 -129); filltype mat; material Water;} + assemWater1 {type simpleCell; id 2010; surfaces (94 -95 126 -123); filltype mat; material Water;} + assemWater2 {type simpleCell; id 2011; surfaces (94 -95 122 -120); filltype mat; material Water;} + assemWater3 {type simpleCell; id 2012; surfaces (94 -95 119 -118); filltype mat; material Water;} + assemWater4 {type simpleCell; id 2013; surfaces (94 -95 117 -116); filltype mat; material Water;} + assemWater5 {type simpleCell; id 2014; surfaces (94 -95 115 -114); filltype mat; material Water;} + assemWater6 {type simpleCell; id 2015; surfaces (94 -95 113 -112); filltype mat; material Water;} + assemWater7 {type simpleCell; id 2016; surfaces (94 -95 111 -107); filltype mat; material Water;} + assemWater8 {type simpleCell; id 2017; surfaces (94 -95 106); filltype mat; material Water;} + assemWaterEx {type simpleCell; id 2018; surfaces (95); filltype mat; material Water;} + + // assemblies inside the wrappers + assem1424 {type simpleCell; id 2019; surfaces (-94); filltype uni; universe 1424;} + assem1416 {type simpleCell; id 2020; surfaces (-94); filltype uni; universe 1416;} + assem1431 {type simpleCell; id 2021; surfaces (-94); filltype uni; universe 1431;} + assem60316 {type simpleCell; id 2022; surfaces (-94); filltype uni; universe 60316;} + assem603112 {type simpleCell; id 2023; surfaces (-94); filltype uni; universe 603112;} + assem60313 {type simpleCell; id 2024; surfaces (-94); filltype uni; universe 60313;} + assem60319 {type simpleCell; id 2025; surfaces (-94); filltype uni; universe 60319;} + assem15315 {type simpleCell; id 2026; surfaces (-94); filltype uni; universe 15315;} + assem15317 {type simpleCell; id 2027; surfaces (-94); filltype uni; universe 15317;} + assem15311 {type simpleCell; id 2028; surfaces (-94); filltype uni; universe 15311;} + assem153111 {type simpleCell; id 2029; surfaces (-94); filltype uni; universe 153111;} + assem1631 {type simpleCell; id 2030; surfaces (-94); filltype uni; universe 1631;} + assem2031 {type simpleCell; id 2031; surfaces (-94); filltype uni; universe 2031;} + assem1224 {type simpleCell; id 2032; surfaces (-94); filltype uni; universe 1224;} + assem1624 {type simpleCell; id 2033; surfaces (-94); filltype uni; universe 1624;} + + // unrodded assemblies in wrappers + assem2424 {type simpleCell; id 2034; surfaces (-94); filltype uni; universe 2424;} + assem2416 {type simpleCell; id 2035; surfaces (-94); filltype uni; universe 2416;} + assem2431 {type simpleCell; id 2036; surfaces (-94); filltype uni; universe 2431;} + assem70316 {type simpleCell; id 2037; surfaces (-94); filltype uni; universe 70316;} + assem703112 {type simpleCell; id 2038; surfaces (-94); filltype uni; universe 703112;} + assem70313 {type simpleCell; id 2039; surfaces (-94); filltype uni; universe 70313;} + assem70319 {type simpleCell; id 2040; surfaces (-94); filltype uni; universe 70319;} + assem25315 {type simpleCell; id 2041; surfaces (-94); filltype uni; universe 25315;} + assem25317 {type simpleCell; id 2042; surfaces (-94); filltype uni; universe 25317;} + assem25311 {type simpleCell; id 2043; surfaces (-94); filltype uni; universe 25311;} + assem253111 {type simpleCell; id 2044; surfaces (-94); filltype uni; universe 253111;} + assem2631 {type simpleCell; id 2045; surfaces (-94); filltype uni; universe 2631;} + assem3031 {type simpleCell; id 2046; surfaces (-94); filltype uni; universe 3031;} + assem2224 {type simpleCell; id 2047; surfaces (-94); filltype uni; universe 2224;} + assem2624 {type simpleCell; id 2048; surfaces (-94); filltype uni; universe 2624;} + + // rodded assemblies in wrappers + assem1425 {type simpleCell; id 2049; surfaces (-94); filltype uni; universe 1425;} + assem1417 {type simpleCell; id 2050; surfaces (-94); filltype uni; universe 1417;} + + // pin grids - thick at the top and bottom, thin in fuelled region + thickGrid {type simpleCell; id 555; surfaces (90 ); filltype mat; material Inconel;} + thinGrid {type simpleCell; id 556; surfaces (92 ); filltype mat; material Zircaloy;} + + // Don't need to bound PV by 1 since it is the bounding surface of the geometry. + pressureVessel { type simpleCell; id 7; surfaces (2); filltype mat; material CarbonSteel;} + RPVLiner { type simpleCell; id 8; surfaces (-2 3); filltype mat; material SS304;} + outerWater1 {type simpleCell; id 9; surfaces (-3 4 ); filltype mat; material Water;} + + // Neutron shields + NS1 { type simpleCell; id 10; surfaces (-4 5 -8 9); filltype mat; material SS304;} + NS2 { type simpleCell; id 11; surfaces (-4 5 8 -9); filltype mat; material SS304;} + NS3 { type simpleCell; id 12; surfaces (-4 5 -10 11); filltype mat; material SS304;} + NS4 { type simpleCell; id 13; surfaces (-4 5 10 -11); filltype mat; material SS304;} + + // Water in the arc between neutron shields + outerWaterSeg1 {type simpleCell; id 14; surfaces (-4 5 ); filltype mat; material Water;} + outerWater2 {type simpleCell; id 15; surfaces (-5 6 ); filltype mat; material Water;} + + // Outer core + coreBarrel { type simpleCell; id 16; surfaces (-6 7); filltype mat; material SS304;} + core {type simpleCell; id 17; surfaces (-5); filltype uni; universe 9999;} + + + // Gridded pins + + // THICK GRID + // 2.4% in grid + grid24Thick {type simpleCell; id 253; surfaces (-90); filltype uni; universe 24000;} + // guide tube in grid + gridGTThick {type simpleCell; id 254; surfaces (-90); filltype uni; universe 12000;} + // 3.1% in grid + grid31Thick {type simpleCell; id 255; surfaces (-90); filltype uni; universe 31000;} + // 1.6 % in grid + grid16Thick {type simpleCell; id 256; surfaces (-90); filltype uni; universe 16000;} + // instrumentation tube in grid + gridITThick {type simpleCell; id 257; surfaces (-90); filltype uni; universe 14000;} + // empty GT at dashpot in grid + gridGTDPThick {type simpleCell; id 258; surfaces (-90); filltype uni; universe 1010;} + // pin upper fuel plenum in grid + gridFPPThick {type simpleCell; id 259; surfaces (-90); filltype uni; universe 1008;} + // stainless steel in guide tube in grid + gridSSGThick {type simpleCell; id 260; surfaces (-90); filltype uni; universe 1023;} + // stainless steel in dash pot in grid + gridSSDPThick {type simpleCell; id 261; surfaces (-90); filltype uni; universe 1024;} + // BP plenum in grid + gridBPPThick {type simpleCell; id 262; surfaces (-90); filltype uni; universe 1012;} + // Lower rodded GT in grid + gridLRGTThick {type simpleCell; id 263; surfaces (-90); filltype uni; universe 1014;} + // Upper rodded GT in grid + gridURGTThick {type simpleCell; id 463; surfaces (-90); filltype uni; universe 1013;} + + // THIN GRID + // 2.4% in grid + grid24Thin {type simpleCell; id 264; surfaces (-92); filltype uni; universe 24000;} + // guide tube in grid + gridGTThin {type simpleCell; id 265; surfaces (-92); filltype uni; universe 12000;} + // burnable poison in grid + gridBPThin {type simpleCell; id 266; surfaces (-92); filltype uni; universe 1000;} + // 3.1% in grid + grid31Thin {type simpleCell; id 267; surfaces (-92); filltype uni; universe 31000;} + // 1.6 % in grid + grid16Thin {type simpleCell; id 268; surfaces (-92); filltype uni; universe 16000;} + // instrumentation tube in grid + gridITThin {type simpleCell; id 269; surfaces (-92); filltype uni; universe 14000;} + // empty GT at dashpot in grid + gridGTDPThin {type simpleCell; id 270; surfaces (-92); filltype uni; universe 1010;} + // pin upper fuel plenum in grid + gridFPPThin {type simpleCell; id 271; surfaces (-92); filltype uni; universe 1008;} + // stainless steel in guide tube in grid + gridSSGTThin {type simpleCell; id 272; surfaces (-92); filltype uni; universe 1023;} + // stainless steel in dash pot in grid + gridSSDPThin {type simpleCell; id 273; surfaces (-92); filltype uni; universe 1024;} + // BP plenum in grid + gridBPPThin {type simpleCell; id 274; surfaces (-92); filltype uni; universe 1012;} + // Lower rodded GT in grid (not used when rods fully withdrawn) + gridLRGTThin {type simpleCell; id 275; surfaces (-92); filltype uni; universe 1014;} + // Upper rodded GT in grid (not used when rods fully withdrawn) + gridURGTThin {type simpleCell; id 475; surfaces (-92); filltype uni; universe 1013;} + + + // 3.1% enriched pins, axial layering + 31FP460 {type simpleCell; id 100; surfaces ( 101); filltype uni; universe 1001;} + 31FP431 {type simpleCell; id 101; surfaces (-101 102); filltype uni; universe 1003;} + 31FP423 {type simpleCell; id 102; surfaces (-102 104); filltype uni; universe 1001;} + 31FP419 {type simpleCell; id 103; surfaces (-104 105); filltype uni; universe 1006;} + 31FP417 {type simpleCell; id 104; surfaces (-105 106); filltype uni; universe 1008;} + 31FP415 {type simpleCell; id 105; surfaces (-106 107); filltype uni; universe 1017;} + 31FP411 {type simpleCell; id 106; surfaces (-107 109); filltype uni; universe 1008;} + 31FP402 {type simpleCell; id 107; surfaces (-109 111); filltype uni; universe 31000;} + 31FP364 {type simpleCell; id 108; surfaces (-111 112); filltype uni; universe 9231;} + 31FP359 {type simpleCell; id 109; surfaces (-112 113); filltype uni; universe 31000;} + 31FP312 {type simpleCell; id 110; surfaces (-113 114); filltype uni; universe 9231;} + 31FP306 {type simpleCell; id 111; surfaces (-114 115); filltype uni; universe 31000;} + 31FP260 {type simpleCell; id 112; surfaces (-115 116); filltype uni; universe 9231;} + 31FP254 {type simpleCell; id 113; surfaces (-116 117); filltype uni; universe 31000;} + 31FP208 {type simpleCell; id 114; surfaces (-117 118); filltype uni; universe 9231;} + 31FP202 {type simpleCell; id 115; surfaces (-118 119); filltype uni; universe 31000;} + 31FP155 {type simpleCell; id 116; surfaces (-119 120); filltype uni; universe 9231;} + 31FP150 {type simpleCell; id 117; surfaces (-120 122); filltype uni; universe 31000;} + 31FP103 {type simpleCell; id 118; surfaces (-122 123); filltype uni; universe 9231;} + 31FP98 {type simpleCell; id 119; surfaces (-123 126); filltype uni; universe 31000;} + 31FP4052 {type simpleCell; id 120; surfaces (-126 129); filltype uni; universe 1131;} + 31FP37 {type simpleCell; id 121; surfaces (-129 130); filltype uni; universe 31000;} + 31FP36 {type simpleCell; id 122; surfaces (-130 131); filltype uni; universe 1006;} + 31FP35 {type simpleCell; id 123; surfaces (-131 132); filltype uni; universe 1003;} + 31FP20 {type simpleCell; id 124; surfaces (-132 ); filltype uni; universe 1001;} + + + //2.4% enriched pins, axial layering + 24FP460 {type simpleCell; id 125; surfaces ( 101); filltype uni; universe 1001;} + 24FP431 {type simpleCell; id 126; surfaces (-101 102); filltype uni; universe 1003;} + 24FP423 {type simpleCell; id 127; surfaces (-102 104); filltype uni; universe 1001;} + 24FP419 {type simpleCell; id 128; surfaces (-104 105); filltype uni; universe 1006;} + 24FP417 {type simpleCell; id 129; surfaces (-105 106); filltype uni; universe 1008;} + 24FP415 {type simpleCell; id 130; surfaces (-106 107); filltype uni; universe 1017;} + 24FP411 {type simpleCell; id 131; surfaces (-107 109); filltype uni; universe 1008;} + 24FP402 {type simpleCell; id 132; surfaces (-109 111); filltype uni; universe 24000;} + 24FP364 {type simpleCell; id 133; surfaces (-111 112); filltype uni; universe 9224;} + 24FP359 {type simpleCell; id 134; surfaces (-112 113); filltype uni; universe 24000;} + 24FP312 {type simpleCell; id 135; surfaces (-113 114); filltype uni; universe 9224;} + 24FP306 {type simpleCell; id 136; surfaces (-114 115); filltype uni; universe 24000;} + 24FP260 {type simpleCell; id 137; surfaces (-115 116); filltype uni; universe 9224;} + 24FP254 {type simpleCell; id 138; surfaces (-116 117); filltype uni; universe 24000;} + 24FP208 {type simpleCell; id 139; surfaces (-117 118); filltype uni; universe 9224;} + 24FP202 {type simpleCell; id 140; surfaces (-118 119); filltype uni; universe 24000;} + 24FP155 {type simpleCell; id 141; surfaces (-119 120); filltype uni; universe 9224;} + 24FP150 {type simpleCell; id 142; surfaces (-120 122); filltype uni; universe 24000;} + 24FP103 {type simpleCell; id 143; surfaces (-122 123); filltype uni; universe 9224;} + 24FP98 {type simpleCell; id 144; surfaces (-123 126); filltype uni; universe 24000;} + 24FP4052 {type simpleCell; id 145; surfaces (-126 129); filltype uni; universe 1124;} + 24FP37 {type simpleCell; id 146; surfaces (-129 130); filltype uni; universe 24000;} + 24FP36 {type simpleCell; id 147; surfaces (-130 131); filltype uni; universe 1006;} + 24FP35 {type simpleCell; id 148; surfaces (-131 132); filltype uni; universe 1003;} + 24FP20 {type simpleCell; id 149; surfaces (-132); filltype uni; universe 1001;} + + //1.6% enriched pins, axial layering + 16FP460 {type simpleCell; id 150; surfaces ( 101); filltype uni; universe 1001;} + 16FP431 {type simpleCell; id 151; surfaces (-101 102); filltype uni; universe 1003;} + 16FP423 {type simpleCell; id 152; surfaces (-102 104); filltype uni; universe 1001;} + 16FP419 {type simpleCell; id 153; surfaces (-104 105); filltype uni; universe 1006;} + 16FP417 {type simpleCell; id 154; surfaces (-105 106); filltype uni; universe 1008;} + 16FP415 {type simpleCell; id 155; surfaces (-106 107); filltype uni; universe 1017;} + 16FP411 {type simpleCell; id 156; surfaces (-107 109); filltype uni; universe 1008;} + 16FP402 {type simpleCell; id 157; surfaces (-109 111); filltype uni; universe 16000;} + 16FP364 {type simpleCell; id 158; surfaces (-111 112); filltype uni; universe 9216;} + 16FP359 {type simpleCell; id 159; surfaces (-112 113); filltype uni; universe 16000;} + 16FP312 {type simpleCell; id 160; surfaces (-113 114); filltype uni; universe 9216;} + 16FP306 {type simpleCell; id 161; surfaces (-114 115); filltype uni; universe 16000;} + 16FP260 {type simpleCell; id 162; surfaces (-115 116); filltype uni; universe 9216;} + 16FP254 {type simpleCell; id 163; surfaces (-116 117); filltype uni; universe 16000;} + 16FP208 {type simpleCell; id 164; surfaces (-117 118); filltype uni; universe 9216;} + 16FP202 {type simpleCell; id 165; surfaces (-118 119); filltype uni; universe 16000;} + 16FP155 {type simpleCell; id 166; surfaces (-119 120); filltype uni; universe 9216;} + 16FP150 {type simpleCell; id 167; surfaces (-120 122); filltype uni; universe 16000;} + 16FP103 {type simpleCell; id 168; surfaces (-122 123); filltype uni; universe 9216;} + 16FP98 {type simpleCell; id 169; surfaces (-123 126); filltype uni; universe 16000;} + 16FP4052 {type simpleCell; id 170; surfaces (-126 129); filltype uni; universe 1116;} + 16FP37 {type simpleCell; id 171; surfaces (-129 130); filltype uni; universe 16000;} + 16FP36 {type simpleCell; id 172; surfaces (-130 131); filltype uni; universe 1006;} + 16FP35 {type simpleCell; id 173; surfaces (-131 132); filltype uni; universe 1003;} + 16FP20 {type simpleCell; id 174; surfaces (-132); filltype uni; universe 1001;} + + + //guide tube, with CR, axial layering + GC460 {type simpleCell; id 175; surfaces ( 101); filltype uni; universe 1014;} + GC431 {type simpleCell; id 176; surfaces (-101 106); filltype uni; universe 1014;} // Nozzle/support plate BW? Replaced just with rod + GC415 {type simpleCell; id 177; surfaces (-106 107); filltype uni; universe 1018;} // Rodded w/ grid + GC411 {type simpleCell; id 178; surfaces (-107 109); filltype uni; universe 1014;} + GC402 {type simpleCell; id 179; surfaces (-109 134); filltype uni; universe 1015;} + GC400 {type simpleCell; id 180; surfaces (-134 111); filltype uni; universe 12000;} + GC364 {type simpleCell; id 181; surfaces (-111 112); filltype uni; universe 9112;} + GC359 {type simpleCell; id 182; surfaces (-112 113); filltype uni; universe 12000;} + GC312 {type simpleCell; id 183; surfaces (-113 114); filltype uni; universe 9112;} + GC306 {type simpleCell; id 184; surfaces (-114 115); filltype uni; universe 12000;} + GC260 {type simpleCell; id 185; surfaces (-115 116); filltype uni; universe 9112;} + GC254 {type simpleCell; id 186; surfaces (-116 117); filltype uni; universe 12000;} + GC208 {type simpleCell; id 187; surfaces (-117 118); filltype uni; universe 9112;} + GC202 {type simpleCell; id 188; surfaces (-118 119); filltype uni; universe 12000;} + GC155 {type simpleCell; id 189; surfaces (-119 120); filltype uni; universe 9112;} + GC150 {type simpleCell; id 190; surfaces (-120 122); filltype uni; universe 12000;} + GC103 {type simpleCell; id 191; surfaces (-122 123); filltype uni; universe 9112;} + GC98 {type simpleCell; id 192; surfaces (-123 126); filltype uni; universe 1010;} + GC4052 {type simpleCell; id 193; surfaces (-126 127); filltype uni; universe 12000;} + GC39 {type simpleCell; id 194; surfaces (-127 129); filltype uni; universe 1019;} + GC37 {type simpleCell; id 195; surfaces (-129 131); filltype uni; universe 1010;} + GC35 {type simpleCell; id 196; surfaces (-131 132); filltype uni; universe 1005;} + GC20 {type simpleCell; id 197; surfaces (-132); filltype uni; universe 1001;} + + + // instrumentation tube, axial layering + IT460 {type simpleCell; id 198; surfaces ( 102); filltype uni; universe 1001;} + IT423 {type simpleCell; id 199; surfaces (-102 106); filltype uni; universe 14000;} + IT415 {type simpleCell; id 200; surfaces (-106 107); filltype uni; universe 1114;} + IT411 {type simpleCell; id 201; surfaces (-107 111); filltype uni; universe 14000;} + IT364 {type simpleCell; id 202; surfaces (-111 112); filltype uni; universe 9114;} + IT359 {type simpleCell; id 203; surfaces (-112 113); filltype uni; universe 14000;} + IT312 {type simpleCell; id 204; surfaces (-113 114); filltype uni; universe 9114;} + IT306 {type simpleCell; id 205; surfaces (-114 115); filltype uni; universe 14000;} + IT260 {type simpleCell; id 206; surfaces (-115 116); filltype uni; universe 9114;} + IT254 {type simpleCell; id 207; surfaces (-116 117); filltype uni; universe 14000;} + IT208 {type simpleCell; id 208; surfaces (-117 118); filltype uni; universe 9114;} + IT202 {type simpleCell; id 209; surfaces (-118 119); filltype uni; universe 14000;} + IT155 {type simpleCell; id 210; surfaces (-119 120); filltype uni; universe 9114;} + IT150 {type simpleCell; id 211; surfaces (-120 122); filltype uni; universe 14000;} + IT103 {type simpleCell; id 212; surfaces (-122 123); filltype uni; universe 9114;} + IT98 {type simpleCell; id 213; surfaces (-123 126); filltype uni; universe 14000;} + IT4052 {type simpleCell; id 214; surfaces (-126 129); filltype uni; universe 1114;} + IT37 {type simpleCell; id 215; surfaces (-129 131); filltype uni; universe 14000;} + IT35 {type simpleCell; id 216; surfaces (-131 132); filltype uni; universe 1005;} + IT20 {type simpleCell; id 217; surfaces (-132 ); filltype uni; universe 1011;} + + + // burnable absorber, axial layering + BA460 {type simpleCell; id 218; surfaces ( 101); filltype uni; universe 1001;} + BA431 {type simpleCell; id 219; surfaces (-101 102); filltype uni; universe 1002;} + BA423 {type simpleCell; id 220; surfaces (-102 103); filltype uni; universe 1023;} + BA421 {type simpleCell; id 230; surfaces (-103 106); filltype uni; universe 1012;} + BA415 {type simpleCell; id 231; surfaces (-106 107); filltype uni; universe 1027;} + BA411 {type simpleCell; id 232; surfaces (-107 110); filltype uni; universe 1012;} + BA401 {type simpleCell; id 233; surfaces (-110 111); filltype uni; universe 1000;} + BA364 {type simpleCell; id 234; surfaces (-111 112); filltype uni; universe 1110;} + BA359 {type simpleCell; id 235; surfaces (-112 113); filltype uni; universe 1000;} + BA312 {type simpleCell; id 236; surfaces (-113 114); filltype uni; universe 1110;} + BA306 {type simpleCell; id 237; surfaces (-114 115); filltype uni; universe 1000;} + BA260 {type simpleCell; id 238; surfaces (-115 116); filltype uni; universe 1110;} + BA254 {type simpleCell; id 239; surfaces (-116 117); filltype uni; universe 1000;} + BA208 {type simpleCell; id 240; surfaces (-117 118); filltype uni; universe 1110;} + BA202 {type simpleCell; id 241; surfaces (-118 119); filltype uni; universe 1000;} + BA155 {type simpleCell; id 242; surfaces (-119 120); filltype uni; universe 1110;} + BA150 {type simpleCell; id 243; surfaces (-120 122); filltype uni; universe 1000;} + BA103 {type simpleCell; id 244; surfaces (-122 123); filltype uni; universe 1110;} + BA98 {type simpleCell; id 245; surfaces (-123 125); filltype uni; universe 1000;} + BA4055 {type simpleCell; id 246; surfaces (-125 126); filltype uni; universe 1023;} + BA4052 {type simpleCell; id 247; surfaces (-126 127); filltype uni; universe 1021;} + BA39 {type simpleCell; id 248; surfaces (-127 128); filltype uni; universe 1025;} + BA38 {type simpleCell; id 249; surfaces (-128 129); filltype uni; universe 1019;} + BA37 {type simpleCell; id 250; surfaces (-129 131); filltype uni; universe 1010;} + BA35 {type simpleCell; id 251; surfaces (-131 132); filltype uni; universe 1005;} + BA20 {type simpleCell; id 252; surfaces (-132 ); filltype uni; universe 1001;} + + //guide tube, no CR, axial layering + GT460 {type simpleCell; id 353; surfaces ( 101); filltype uni; universe 1001;} + GT431 {type simpleCell; id 354; surfaces (-101 102); filltype uni; universe 1005;} + GT423 {type simpleCell; id 355; surfaces (-102 106); filltype uni; universe 12000;} + GT415 {type simpleCell; id 356; surfaces (-106 107); filltype uni; universe 1112;} + GT411 {type simpleCell; id 357; surfaces (-107 111); filltype uni; universe 12000;} + GT364 {type simpleCell; id 358; surfaces (-111 112); filltype uni; universe 9112;} + GT359 {type simpleCell; id 359; surfaces (-112 113); filltype uni; universe 12000;} + GT312 {type simpleCell; id 360; surfaces (-113 114); filltype uni; universe 9112;} + GT306 {type simpleCell; id 361; surfaces (-114 115); filltype uni; universe 12000;} + GT260 {type simpleCell; id 362; surfaces (-115 116); filltype uni; universe 9112;} + GT254 {type simpleCell; id 363; surfaces (-116 117); filltype uni; universe 12000;} + GT208 {type simpleCell; id 364; surfaces (-117 118); filltype uni; universe 9112;} + GT202 {type simpleCell; id 365; surfaces (-118 119); filltype uni; universe 12000;} + GT155 {type simpleCell; id 366; surfaces (-119 120); filltype uni; universe 9112;} + GT150 {type simpleCell; id 367; surfaces (-120 122); filltype uni; universe 12000;} + GT103 {type simpleCell; id 368; surfaces (-122 123); filltype uni; universe 9112;} + GT98 {type simpleCell; id 369; surfaces (-123 126); filltype uni; universe 1010;} + GT4052 {type simpleCell; id 370; surfaces (-126 127); filltype uni; universe 12000;} + GT39 {type simpleCell; id 371; surfaces (-127 129); filltype uni; universe 1019;} + GT37 {type simpleCell; id 372; surfaces (-129 131); filltype uni; universe 1010;} + GT35 {type simpleCell; id 373; surfaces (-131 132); filltype uni; universe 1005;} + GT20 {type simpleCell; id 374; surfaces (-132); filltype uni; universe 1001;} + + //guide tube, partially inserted CR, axial layering + // Note: universe is basically a combo of fully and partially inserted rods + GP460 {type simpleCell; id 375; surfaces ( 101); filltype uni; universe 1013;} + GP431 {type simpleCell; id 376; surfaces (-101 102); filltype uni; universe 1013;} + GP423 {type simpleCell; id 377; surfaces (-102 106); filltype uni; universe 1013;} + GP415 {type simpleCell; id 378; surfaces (-106 107); filltype uni; universe 1133;} + GP411 {type simpleCell; id 379; surfaces (-107 111); filltype uni; universe 1013;} + GP364 {type simpleCell; id 380; surfaces (-111 112); filltype uni; universe 9233;} + GP359 {type simpleCell; id 381; surfaces (-112 137); filltype uni; universe 1013;} + GP322 {type simpleCell; id 382; surfaces (-137 113); filltype uni; universe 1014;} + GP312 {type simpleCell; id 383; surfaces (-113 114); filltype uni; universe 9232;} + GP306 {type simpleCell; id 384; surfaces (-114 115); filltype uni; universe 1014;} + GP260 {type simpleCell; id 385; surfaces (-115 116); filltype uni; universe 9232;} + GP254 {type simpleCell; id 386; surfaces (-116 138); filltype uni; universe 1014;} + GP220 {type simpleCell; id 387; surfaces (-138 139); filltype uni; universe 1023;} + GP219 {type simpleCell; id 388; surfaces (-139 117); filltype uni; universe 12000;} + GP208 {type simpleCell; id 389; surfaces (-117 118); filltype uni; universe 9112;} + GP202 {type simpleCell; id 390; surfaces (-118 119); filltype uni; universe 12000;} + GP155 {type simpleCell; id 391; surfaces (-119 120); filltype uni; universe 9112;} + GP150 {type simpleCell; id 392; surfaces (-120 122); filltype uni; universe 12000;} + GP103 {type simpleCell; id 393; surfaces (-122 123); filltype uni; universe 9112;} + GP98 {type simpleCell; id 394; surfaces (-123 126); filltype uni; universe 1010;} + GP4052 {type simpleCell; id 395; surfaces (-126 127); filltype uni; universe 12000;} + GP39 {type simpleCell; id 396; surfaces (-127 129); filltype uni; universe 1019;} + GP37 {type simpleCell; id 397; surfaces (-129 131); filltype uni; universe 1010;} + GP35 {type simpleCell; id 398; surfaces (-131 132); filltype uni; universe 1005;} + GP20 {type simpleCell; id 399; surfaces (-132); filltype uni; universe 1001;} + + // control rod, axial layering + // Used (probably with some modification) only when fully inserted + //CR460 {type simpleCell; id 448; surfaces (-120 121); filltype uni; universe 1002;} + //CR415 {type simpleCell; id 449; surfaces (-126 403); filltype uni; universe 1013;} + //CR403 {type simpleCell; id 450; surfaces (-403 402); filltype uni; universe 1015;} + //CR402 {type simpleCell; id 451; surfaces (-402 1430); filltype uni; universe 1013;} + //CR143 {type simpleCell; id 452; surfaces (-1430 41); filltype uni; universe 1014;} + //CR41 {type simpleCell; id 453; surfaces (-41 143); filltype uni; universe 1002;} + //CR39 {type simpleCell; id 454; surfaces (-143 147); filltype uni; universe 1001;} + //CR35 {type simpleCell; id 455; surfaces (-147 148); filltype uni; universe 1005;} + //CR20 {type simpleCell; id 456; surfaces (-148 149); filltype uni; universe 1001;} + + + + outsideLeftBaffle { type simpleCell; id 52; surfaces (-50); filltype mat; material Water;} + leftBaffle { type simpleCell; id 53; surfaces (50 -51); filltype mat; material SS304;} + insideLeftBaffle { type simpleCell; id 54; surfaces (51); filltype mat; material Water;} + + outsideRightBaffle { type simpleCell; id 55; surfaces (-52); filltype mat; material Water;} + RightBaffle { type simpleCell; id 56; surfaces (52 -53); filltype mat; material SS304;} + insideRightBaffle { type simpleCell; id 57; surfaces (53); filltype mat; material Water;} + + outsideTopBaffle { type simpleCell; id 58; surfaces (-54); filltype mat; material Water;} + TopBaffle { type simpleCell; id 59; surfaces (54 -55); filltype mat; material SS304;} + insideTopBaffle { type simpleCell; id 60; surfaces (55); filltype mat; material Water;} + + outsideBottomBaffle { type simpleCell; id 61; surfaces (-56); filltype mat; material Water;} + BottomBaffle { type simpleCell; id 62; surfaces (56 -57); filltype mat; material SS304;} + insideBottomBaffle { type simpleCell; id 63; surfaces (57); filltype mat; material Water;} + + topLeftCornerBaffle1 { type simpleCell; id 64; surfaces (52 -53 -57); filltype mat; material SS304;} + topLeftCornerBaffle2 { type simpleCell; id 65; surfaces (56 -57 -52); filltype mat; material SS304;} + topLeftCornerGap1 { type simpleCell; id 66; surfaces (57); filltype mat; material Water;} + topLeftCornerGap2 { type simpleCell; id 67; surfaces (53); filltype mat; material Water;} + topLeftMajorGap { type simpleCell; id 68; surfaces (-56 -52); filltype mat; material Water;} + + topRightCornerBaffle1 { type simpleCell; id 69; surfaces (-57 50 -51); filltype mat; material SS304;} + topRightCornerBaffle2 { type simpleCell; id 70; surfaces (-50 56 -57); filltype mat; material SS304;} + topRightCornerGap1 { type simpleCell; id 71; surfaces (57); filltype mat; material Water;} + topRightCornerGap2 { type simpleCell; id 72; surfaces (51); filltype mat; material Water;} + topRightMajorGap { type simpleCell; id 73; surfaces (-56 -50); filltype mat; material Water;} + + bottomLeftCornerBaffle1 { type simpleCell; id 74; surfaces (-55 52 -53); filltype mat; material SS304;} + bottomLeftCornerBaffle2 { type simpleCell; id 75; surfaces (-55 54 -52); filltype mat; material SS304;} + bottomLeftCornerGap1 { type simpleCell; id 76; surfaces (55); filltype mat; material Water;} + bottomLeftCornerGap2 { type simpleCell; id 77; surfaces (53); filltype mat; material Water;} + bottomLeftMajorGap { type simpleCell; id 78; surfaces (-54 -52); filltype mat; material Water;} + + bottomRightCornerBaffle1 { type simpleCell; id 79; surfaces (-51 50 -55); filltype mat; material SS304;} + bottomRightCornerBaffle2 { type simpleCell; id 80; surfaces (-55 54 -50); filltype mat; material SS304;} + bottomRightCornerGap1 { type simpleCell; id 81; surfaces (51); filltype mat; material Water;} + bottomRightCornerGap2 { type simpleCell; id 82; surfaces (55); filltype mat; material Water;} + bottomRightMajorGap { type simpleCell; id 83; surfaces (-50 -54); filltype mat; material Water;} + + + TLSG1 { type simpleCell; id 84; surfaces (-56 -52); filltype mat; material Water;} + TLSG2 { type simpleCell; id 85; surfaces (-56 52); filltype mat; material Water;} + TLSG3 { type simpleCell; id 86; surfaces (56 -52); filltype mat; material Water;} + topLeftSquare { type simpleCell; id 87; surfaces (56 52); filltype mat; material SS304;} + + TRSG1 { type simpleCell; id 88; surfaces (-56 50); filltype mat; material Water;} + TRSG2 { type simpleCell; id 89; surfaces (-56 -50); filltype mat; material Water;} + TRSG3 { type simpleCell; id 90; surfaces (56 -50); filltype mat; material Water;} + topRightSquare { type simpleCell; id 91; surfaces (56 50); filltype mat; material SS304;} + + BLSG1 { type simpleCell; id 92; surfaces (54 -52); filltype mat; material Water;} + BLSG2 { type simpleCell; id 93; surfaces (-54 52); filltype mat; material Water;} + BLSG3 { type simpleCell; id 94; surfaces (-54 -52); filltype mat; material Water;} + bottomLeftSquare { type simpleCell; id 95; surfaces (54 52); filltype mat; material SS304;} + + BRSG1 { type simpleCell; id 96; surfaces (-54 50); filltype mat; material Water;} + BRSG2 { type simpleCell; id 97; surfaces (54 -50); filltype mat; material Water;} + BRSG3 { type simpleCell; id 98; surfaces (-54 -50); filltype mat; material Water;} + bottomRightSquare { type simpleCell; id 99; surfaces (54 50); filltype mat; material SS304;} + } + + universes { + root { id 1; type rootUniverse; border 1; fill u<8888>; } + + // Pin universes + + //Burnable poison + pinBPaboveDP { id 1000; type pinUniverse; radii (0.21400 0.23051 0.24130 0.42672 0.43688 0.48387 0.56134 0.60198 0.0); + fills (Air SS304 Helium BorosilicateGlass Helium SS304 Water Zircaloy Water);} + pinBPPlenumGeometry { id 1012; type pinUniverse; radii ( 0.21400 0.23051 0.43688 0.48387 0.50419 0.54610 0.0); + fills (Air SS304 Helium SS304 Water Zircaloy Water);} + + //guide tubes + pinGTaboveDP { id 12000; type pinUniverse; radii (0.56134 0.60198 0.0 ); fills (Water Zircaloy Water);} + pinGTatDP { id 1010; type pinUniverse; radii (0.50419 0.54610 0.0); fills (Water Zircaloy Water);} + + //INST Tube + pinIT { id 14000; type pinUniverse; radii (0.43688 0.48387 0.56134 0.60198 0.0 ); + fills (Air Zircaloy Water Zircaloy Water);} + pinBareInstrumentThimble { id 1011; type pinUniverse; radii (0.43688 0.48387 0.0); fills (Air Zircaloy Water);} + + // Fuel pins + pin16 { id 16000; type pinUniverse; radii (0.39218 0.40005 0.45720 0.0); + fills (UO2-16 Helium Zircaloy Water);} + pin24 { id 24000; type pinUniverse; radii (0.39218 0.40005 0.45720 0.0); + fills (UO2-24 Helium Zircaloy Water);} + pin31 { id 31000; type pinUniverse; radii (0.39218 0.40005 0.45720 0.0); + fills (UO2-31 Helium Zircaloy Water);} + // Higher enrichments not used + //pin32 { id 32000; type pinUniverse; radii (0.39218 0.40005 0.45720 0.0); + // fills (UO2-32 Helium Zircaloy Water);} + //pin34 { id 34000; type pinUniverse; radii (0.39218 0.40005 0.45720 0.0); + // fills (UO2-34 Helium Zircaloy Water);} + + pinWater { id 1001; type pinUniverse; radii ( 0.0); fills (Water);} + + + // Solid pins, assumed radius to be that of a fuel pin (0.45720) + pinNozzle_SupportSteel { id 1003; type pinUniverse; radii ( 0.45720 0.0); fills (SupportPlateSS Water);} + pinSupportPlateBW { id 1005; type pinUniverse; radii ( 0.45720 0.0); fills (SupportPlateBW Water);} + pinZircaloy { id 1006; type pinUniverse; radii ( 0.45720 0.0); fills (Zircaloy Water);} + + + SSinDashPot { id 1024; type pinUniverse; radii (0.50419 0.54610 0.0); fills (SS304 Zircaloy Water);} + SSinGuideTube { id 1023; type pinUniverse; radii ( 0.56134 0.60198 0.0); fills (SS304 Zircaloy Water);} + SSnoGuideTube { id 1002; type pinUniverse; radii ( 0.56134 0.0); fills (SS304 Water);} + + + pinUpperFuelPlenum { id 1008; type pinUniverse; radii ( 0.06459 0.40005 0.45720 0.0); + fills (Inconel Helium Zircaloy Water);} + + // Control rod pins + pinControlRodUpper { id 1013; type pinUniverse; radii ( 0.37338 0.38608 0.48387 0.56134 0.60198 0.0); + fills (B4C Helium SS304 Water Zircaloy Water);} + pinControlRodLower { id 1014; type pinUniverse; radii ( 0.38227 0.38608 0.48387 0.56134 0.60198 0.0); + fills (Ag-In-Cd Helium SS304 Water Zircaloy Water);} + pinControlRodSpacer { id 1015; type pinUniverse; radii ( 0.37845 0.38608 0.48387 0.56134 0.60198 0.0); + fills (SS304 Helium SS304 Water Zircaloy Water);} + pinControlRodPlenum { id 1016; type pinUniverse; radii ( 0.06459 0.38608 0.48387 0.56134 0.60198 0.0); + fills (Inconel Helium SS304 Water Zircaloy Water);} + + // pins that have grids + fuelRodPlenumWithGridThick { + id 1017; + type cellUniverse; + cells ( 259 555);} + + GTRodThick { + id 1018; + type cellUniverse; + cells (263 555);} + + dashPotGuideTubeGridThick { + id 1019; + type cellUniverse; + cells ( 258 555);} + + dashPotGuideTubeGridThin { + id 1020; + type cellUniverse; + cells ( 270 556);} + + SSinGuideTubeThick { + id 1021; + type cellUniverse; + cells ( 260 555);} + + SSinGuideTubeThin { + id 1022; + type cellUniverse; + cells ( 272 556);} + + SSinDashPotThick { + id 1025; + type cellUniverse; + cells ( 261 555);} + + SSinDashPotThin { + id 1026; + type cellUniverse; + cells ( 273 556);} + + BPPlenumThick { + id 1027; + type cellUniverse; + cells ( 262 555);} + + BPPlenumThin { + id 1028; + type cellUniverse; + cells ( 274 556);} + + BPaboveDPThin { + id 1110; + type cellUniverse; + cells (266 556);} + + GTThick { + id 1112; + type cellUniverse; + cells (254 555);} + + ITThick { + id 1114; + type cellUniverse; + cells (257 555);} + + pin16Thick { + id 1116; + type cellUniverse; + cells (256 555);} + + pin24Thick { + id 1124; + type cellUniverse; + cells (253 555);} + + pin31Thick { + id 1131; + type cellUniverse; + cells (255 555);} + + LowerRodGTThick { + id 1132; + type cellUniverse; + cells (263 555);} + + UpperRodGTThick { + id 1133; + type cellUniverse; + cells (463 555);} + + BPThin { // Is this necessary given 1110, BPaboveDPThin??? + id 9110; + type cellUniverse; + cells (266 556);} + + GTThin { + id 9112; + type cellUniverse; + cells (265 556);} + + ITThin { + id 9114; + type cellUniverse; + cells (269 556);} + + pin16Thin { + id 9216; + type cellUniverse; + cells (268 556);} + + pin24Thin { + id 9224; + type cellUniverse; + cells (264 556);} + + pin31Thin { + id 9231; + type cellUniverse; + cells (267 556);} + + LowerRodGTThin { + id 9232; + type cellUniverse; + cells (275 556);} + + UpperRodGTThin { + id 9233; + type cellUniverse; + cells (475 556);} + + // Axial stacks of universes to make up full pins + + // 3.1 % + fuelPin31 { + id 31; + type cellUniverse; + cells ( 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);} + + // 2.4 % + fuelPin24 { + id 24; + type cellUniverse; + cells ( 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);} + + //1.6 % + fuelPin16 { + id 16; + type cellUniverse; + cells ( 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);} + + //burnable absorber + BP { + id 10; + type cellUniverse; + cells (218 219 220 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252);} + + // guide tube, with CR + GuideTubeRodded { + id 12; + type cellUniverse; + cells (175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197);} + + //control rod, fully retracted + GuideTubeEmpty { + id 13; + type cellUniverse; + cells (353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374);} + + //instr. tube + instrumentTube { + id 14; + type cellUniverse; + cells (198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217);} + + + // control rod, partially inserted + GuideTubePartial { + id 15; + type cellUniverse; + cells (375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399); + + } + + + + // Lattices w/o grid + // Names represent AE + A0E24 { + id 1424; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 12 24 24 12 24 24 12 24 24 24 24 24 + 24 24 24 12 24 24 24 24 24 24 24 24 24 12 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 12 24 24 12 24 24 12 24 24 12 24 24 12 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 12 24 24 12 24 24 14 24 24 12 24 24 12 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 12 24 24 12 24 24 12 24 24 12 24 24 12 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 12 24 24 24 24 24 24 24 24 24 12 24 24 24 + 24 24 24 24 24 12 24 24 12 24 24 12 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 ); } + + // assembly with sleeves at different heights + A0E24Sleeve { + id 14240; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2019 + );} + + + A0E16 { + id 1416; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 12 16 16 12 16 16 12 16 16 16 16 16 + 16 16 16 12 16 16 16 16 16 16 16 16 16 12 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 12 16 16 12 16 16 12 16 16 12 16 16 12 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 12 16 16 12 16 16 14 16 16 12 16 16 12 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 12 16 16 12 16 16 12 16 16 12 16 16 12 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 12 16 16 16 16 16 16 16 16 16 12 16 16 16 + 16 16 16 16 16 12 16 16 12 16 16 12 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16); } + + A0E16Sleeve { + id 14160; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2020 + ); + } + + A0E31 { + id 1431; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 12 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 14 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 12 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A0E31Sleeve { + id 14310; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2021 + ); + } + + + A6BE31B { + id 60316; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 12 31 31 10 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 12 31 31 12 31 31 12 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 14 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 12 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + + A6BE31BSleeve { + id 603160; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2022 + ); + } + + A6BE31T { + id 603112; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 12 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 14 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 12 31 31 12 31 31 12 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 10 31 31 12 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A6BE31TSleeve { + id 6031120; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2023 + ); + } + + A6BE31R { + id 60313; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 12 31 31 12 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 14 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 12 31 31 12 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 10 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A6BE31RSleeve { + id 603130; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2024 + ); + } + + A6BE31L { + id 60319; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 10 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 12 31 31 12 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 14 31 31 12 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 12 31 31 12 31 31 12 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A6BE31LSleeve { + id 603190; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2025 + ); + } + + A15BE31BR { + id 15315; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 10 31 31 10 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 14 31 31 10 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 10 31 31 10 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A15BE31BRSleeve { + id 153150; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2026 + ); + } + + A15BE31BL { + id 15317; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 10 31 31 10 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 10 31 31 14 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 10 31 31 10 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A15BE31BLSleeve { + id 153170; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2027 + ); + } + + A15BE31TR { + id 15311; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 10 31 31 10 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 14 31 31 10 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 10 31 31 10 31 31 12 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A15BE31TRSleeve { + id 153110; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2028 + ); + } + + A15BE31TL { + id 153111; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 12 31 31 12 31 31 12 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 12 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 10 31 31 10 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 10 31 31 14 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 12 31 31 10 31 31 10 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 12 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A15BE31TLSleeve { + id 1531110; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2029 + ); + } + + A16BE31 { + id 1631; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 12 31 31 12 31 31 12 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 12 31 31 14 31 31 12 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 12 31 31 12 31 31 12 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A16BE31Sleeve { + id 16310; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2030 + ); + } + + A20BE31 { + id 2031; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 12 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 12 31 31 14 31 31 12 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 12 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A20BE31Sleeve { + id 20310; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2031 + ); + } + + A12BE24 { + id 1224; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 10 24 24 12 24 24 10 24 24 24 24 24 + 24 24 24 10 24 24 24 24 24 24 24 24 24 10 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 12 24 24 12 24 24 12 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 12 24 24 12 24 24 14 24 24 12 24 24 12 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 12 24 24 12 24 24 12 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 10 24 24 24 24 24 24 24 24 24 10 24 24 24 + 24 24 24 24 24 10 24 24 12 24 24 10 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 ); } + + A12BE24Sleeve { + id 12240; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2032 + ); + } + + A16BE24 { + id 1624; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 10 24 24 10 24 24 10 24 24 24 24 24 + 24 24 24 10 24 24 24 24 24 24 24 24 24 10 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 12 24 24 12 24 24 12 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 12 24 24 14 24 24 12 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 12 24 24 12 24 24 12 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 10 24 24 24 24 24 24 24 24 24 10 24 24 24 + 24 24 24 24 24 10 24 24 10 24 24 10 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 ); } + + A16BE24Sleeve { + id 16240; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2033 + ); + } + + // Unrodded assemblies + A0E24U { + id 2424; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 13 24 24 13 24 24 13 24 24 24 24 24 + 24 24 24 13 24 24 24 24 24 24 24 24 24 13 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 13 24 24 13 24 24 13 24 24 13 24 24 13 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 13 24 24 13 24 24 14 24 24 13 24 24 13 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 13 24 24 13 24 24 13 24 24 13 24 24 13 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 13 24 24 24 24 24 24 24 24 24 13 24 24 24 + 24 24 24 24 24 13 24 24 13 24 24 13 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 ); } + + A0E24USleeve { + id 24240; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2034 + );} + + A0E16U { + id 2416; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 13 16 16 13 16 16 13 16 16 16 16 16 + 16 16 16 13 16 16 16 16 16 16 16 16 16 13 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 13 16 16 13 16 16 13 16 16 13 16 16 13 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 13 16 16 13 16 16 14 16 16 13 16 16 13 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 13 16 16 13 16 16 13 16 16 13 16 16 13 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 13 16 16 16 16 16 16 16 16 16 13 16 16 16 + 16 16 16 16 16 13 16 16 13 16 16 13 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16); } + + // sleeved + A0E16USleeve { + id 24160; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2035 + ); + } + + A0E31U { + id 2431; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 13 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 14 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 13 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A0E31USleeve { + id 24310; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2036 + ); + } + + + A6BE31BU { + id 70316; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 13 31 31 10 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 13 31 31 13 31 31 13 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 14 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 13 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + + A6BE31BUSleeve { + id 703160; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2037 + ); + } + + A6BE31TU { + id 703112; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 13 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 14 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 13 31 31 13 31 31 13 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 10 31 31 13 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A6BE31TUSleeve { + id 7031120; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2038 + ); + } + + A6BE31RU { + id 70313; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 13 31 31 13 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 14 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 13 31 31 13 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 10 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A6BE31RUSleeve { + id 703130; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2039 + ); + } + + A6BE31LU { + id 70319; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 10 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 13 31 31 13 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 14 31 31 13 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 13 31 31 13 31 31 13 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A6BE31LUSleeve { + id 703190; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2040 + ); + } + + A15BE31BRU { + id 25315; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 10 31 31 10 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 14 31 31 10 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 10 31 31 10 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A15BE31BRUSleeve { + id 253150; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2041 + ); + } + + A15BE31BLU { + id 25317; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 10 31 31 10 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 10 31 31 14 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 10 31 31 10 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A15BE31BLUSleeve { + id 253170; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2042 + ); + } + + A15BE31TRU { + id 25311; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 10 31 31 10 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 14 31 31 10 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 10 31 31 10 31 31 13 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A15BE31TRUSleeve { + id 253110; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2043 + ); + } + + A15BE31TLU { + id 253111; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 13 31 31 13 31 31 13 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 13 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 10 31 31 10 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 10 31 31 14 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 13 31 31 10 31 31 10 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 13 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A15BE31TLUSleeve { + id 2531110; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2044 + ); + } + + A16BE31U { + id 2631; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 13 31 31 13 31 31 13 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 13 31 31 14 31 31 13 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 13 31 31 13 31 31 13 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A16BE31USleeve { + id 26310; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2045 + ); + } + + A20BE31U { + id 3031; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 13 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 13 31 31 14 31 31 13 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 10 31 31 10 31 31 13 31 31 10 31 31 10 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 10 31 31 31 31 31 31 31 31 31 10 31 31 31 + 31 31 31 31 31 10 31 31 10 31 31 10 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 + 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 ); } + + A20BE31USleeve { + id 30310; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2046 + ); + } + + A12BE24U { + id 2224; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 10 24 24 13 24 24 10 24 24 24 24 24 + 24 24 24 10 24 24 24 24 24 24 24 24 24 10 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 13 24 24 13 24 24 13 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 13 24 24 13 24 24 14 24 24 13 24 24 13 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 13 24 24 13 24 24 13 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 10 24 24 24 24 24 24 24 24 24 10 24 24 24 + 24 24 24 24 24 10 24 24 13 24 24 10 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 ); } + + A12BE24USleeve { + id 22240; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2047 + ); + } + + A16BE24U { + id 2624; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 10 24 24 10 24 24 10 24 24 24 24 24 + 24 24 24 10 24 24 24 24 24 24 24 24 24 10 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 13 24 24 13 24 24 13 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 13 24 24 14 24 24 13 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 10 24 24 13 24 24 13 24 24 13 24 24 10 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 10 24 24 24 24 24 24 24 24 24 10 24 24 24 + 24 24 24 24 24 10 24 24 10 24 24 10 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 ); } + + A16BE24USleeve { + id 26240; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2048 + ); + } + + A0E24DBank { + id 1425; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 15 24 24 15 24 24 15 24 24 24 24 24 + 24 24 24 15 24 24 24 24 24 24 24 24 24 15 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 15 24 24 15 24 24 15 24 24 15 24 24 15 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 15 24 24 15 24 24 14 24 24 15 24 24 15 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 15 24 24 15 24 24 15 24 24 15 24 24 15 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 15 24 24 24 24 24 24 24 24 24 15 24 24 24 + 24 24 24 24 24 15 24 24 15 24 24 15 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 ); } + + // assembly with sleeves at different heights + A0E24SleeveDBank { + id 14250; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2049 + );} + + A0E16DBank { + id 1417; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (1.26 1.26 0.0); + shape (17 17 0); + padMat Water; + map ( + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 15 16 16 15 16 16 15 16 16 16 16 16 + 16 16 16 15 16 16 16 16 16 16 16 16 16 15 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 15 16 16 15 16 16 15 16 16 15 16 16 15 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 15 16 16 15 16 16 14 16 16 15 16 16 15 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 15 16 16 15 16 16 15 16 16 15 16 16 15 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 15 16 16 16 16 16 16 16 16 16 15 16 16 16 + 16 16 16 16 16 15 16 16 15 16 16 15 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 + 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16); } + + A0E16SleeveDBank { + id 14170; + type cellUniverse; + cells ( + 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 + 2016 2017 2018 2050 + ); + } + + + leftBaffleUni { + id 5222; + type cellUniverse; + cells (52 53 54);} + + + rightBaffleUni { + id 5223; + type cellUniverse; + cells (55 56 57);} + + topBaffleUni { + id 5224; + type cellUniverse; + cells (58 59 60);} + + bottomBaffleUni { + id 5225; + type cellUniverse; + cells (61 62 63);} + + + topLeft { + id 5226; + type cellUniverse; + cells (64 65 66 67 68);} + + topRight { + id 5227; + type cellUniverse; + cells ( 69 70 71 72 73);} + + BottomLeft { + id 5228; + type cellUniverse; + cells ( 74 75 76 77 78);} + + BottomRight { + id 5229; + type cellUniverse; + cells ( 79 80 81 82 83);} + + + SQTL { + id 1500; + type cellUniverse; + cells (84 85 86 87);} + + + SQTR { + id 1600; + type cellUniverse; + cells (88 89 90 91);} + + SQBL { + id 1700; + type cellUniverse; + cells (92 93 94 95);} + + SQBR { + id 1800; + type cellUniverse; + cells (96 97 98 99);} + + + latCore { + id 9999; + type latUniverse; + origin (0.0 0.0 0.0); + pitch (21.50364 21.50364 0.0); + shape (17 17 0); + padMat Water; + map ( + 1001 1001 1001 1001 1800 5224 5224 5224 5224 5224 5224 5224 1700 1001 1001 1001 1001 + 1001 1001 1800 5224 5229 24310 7031120 24310 7031120 24310 7031120 24310 5228 5224 1700 1001 1001 + 1001 1800 5229 24310 14310 26310 14160 30310 14160 30310 14160 26310 14310 24310 5228 1700 1001 + 1001 5222 24310 2531110 26240 14160 26240 14160 26240 14160 26240 14160 26240 25311 24310 5223 1001 + 1800 5229 14310 26240 14250 26240 24160 22240 14160 22240 24160 26240 14250 26240 14310 5228 1700 + 5222 24310 26310 14160 26240 24160 22240 24160 22240 24160 22240 24160 26240 14160 26310 24310 5223 + 5222 703190 14160 26240 24160 22240 14160 22240 14160 22240 14160 22240 24160 26240 14160 703130 5223 + 5222 24310 30310 14160 22240 24160 22240 24160 26240 24160 22240 24160 22240 14160 30310 24310 5223 + 5222 703190 14160 26240 14160 22240 14160 26240 14170 26240 14160 22240 14160 26240 14160 703130 5223 + 5222 24310 30310 14160 22240 24160 22240 24160 26240 24160 22240 24160 22240 14160 30310 24310 5223 + 5222 703190 14160 26240 24160 22240 14160 22240 14160 22240 14160 22240 24160 26240 14160 703130 5223 + 5222 24310 26310 14160 26240 24160 22240 24160 22240 24160 22240 24160 26240 14160 26310 24310 5223 + 1600 5227 14310 26240 14250 26240 24160 22240 14160 22240 24160 26240 14250 26240 14310 5226 1500 + 1001 5222 24310 253170 26240 14160 26240 14160 26240 14160 26240 14160 26240 253150 24310 5223 1001 + 1001 1600 5227 24310 14310 26310 14160 30310 14160 30310 14160 26310 14310 24310 5226 1500 1001 + 1001 1001 1600 5225 5227 24310 703160 24310 703160 24310 703160 24310 5226 5225 1500 1001 1001 + 1001 1001 1001 1001 1600 5225 5225 5225 5225 5225 5225 5225 1500 1001 1001 1001 1001 ); } + +! Note partial rodded assemblies end with a 1, i.e., 14170 and 14250 + + coreAndStructures { + id 8888; + type cellUniverse; + cells (7 8 9 10 11 12 13 14 15 16 17);} + + + + } +} + + +viz { + bmpZ { + type bmp; + output imgXY; + what material; + centre (-17.13 240.69 167.74); + width (50 50); + axis z; + res (1000 1000); + } + bmpYZ { + type bmp; + output imgYZ; + what material; + centre (0.0 0.0 232.0); + width (100.0 200.0); + axis x; + res (1000 2000); + } +} + + +nuclearData { + handles { + ce {type aceNeutronDatabase; aceLibrary $SCONE_ACE; ures 0; } + } + + materials { + + // Note that commented nuclide densities are included in the specification + // but are not available in the JEFF-3.11 data library + + Air { + temp 566; + composition { + 18036.06 7.8730E-09; + 18038.06 1.4844E-09; + 18040.06 2.3506E-06; + 6012.06 6.7539E-08; + //6013.06 7.5658E-10; + 7014.06 1.9680E-04; + 7015.06 7.2354E-07; + 8016.06 5.2866E-05; + 8017.06 2.0084E-08; + //8018.06 1.0601E-07; + } + } + + SS304 { + temp 566; + composition { + 24050.06 7.6778E-04; + 24052.06 1.4806E-02; + 24053.06 1.6789E-03; + 24054.06 4.1791E-04; + 26054.06 3.4620E-03; + 26056.06 5.4345E-02; + 26057.06 1.2551E-03; + 26058.06 1.6703E-04; + 25055.06 1.7604E-03; + 28058.06 5.6089E-03; + 28060.06 2.1605E-03; + 28061.06 9.3917E-05; + 28062.06 2.9945E-04; + 28064.06 7.6261E-05; + 14028.06 9.5281E-04; + 14029.06 4.8381E-05; + 14030.06 3.1893E-05; } + } + + Helium { + temp 566; + composition { + 2003.06 4.8089E-10; + 2004.06 2.4044E-04; } + } + + BorosilicateGlass { + temp 566; + composition { + 13027.06 1.7352E-03; + 5010.06 9.6506E-04; + 5011.06 3.9189E-03; + 8016.06 4.6514E-02; + 8017.06 1.7671E-05; + //8018.06 9.3268E-05; + 14028.06 1.6926E-02; + 14029.06 8.5944E-04; + 14030.06 5.6654E-04; } + } + + Water { + temp 566; + moder {1001.06 (lwj3.11 lwj3.09); } + composition { + 5010.06 7.9714E-06; + 5011.06 3.2247E-05; + 1001.06 4.9456E-02; + 1002.06 7.7035E-06; + 8016.06 2.4673E-02; + 8017.06 9.3734E-06; + //8018.06 4.9474E-05; + } + } + + Zircaloy { + temp 566; + composition { + 24050.06 3.2962E-06; + 24052.06 6.3564E-05; + 24053.06 7.2076E-06; + 24054.06 1.7941E-06; + 26054.06 8.6698E-06; + 26056.06 1.3610E-04; + 26057.06 3.1431E-06; + 26058.06 4.1829E-07; + 8016.06 3.0744E-04; + 8017.06 1.1680E-07; + //8018.03 6.1648E-07; + 50112.06 4.6735E-06; + 50114.06 3.1799E-06; + 50115.06 1.6381E-06; + 50116.06 7.0055E-05; + 50117.06 3.7003E-05; + 50118.06 1.1669E-04; + 50119.06 4.1387E-05; + 50120.06 1.5697E-04; + 50122.06 2.2308E-05; + 50124.06 2.7897E-05; + 40090.06 2.1828E-02; + 40091.06 4.7601E-03; + 40092.06 7.2759E-03; + 40094.06 7.3734E-03; + 40096.06 1.1879E-03; } + } + + Inconel{ + temp 566; + composition { + 24050.06 7.8239E-04; + 24052.06 1.5088E-02; + 24053.06 1.7108E-03; + 24054.06 4.2586E-04; + 26054.06 1.4797E-03; + 26056.06 2.3229E-02; + 26057.06 5.3645E-04; + 26058.06 7.1392E-05; + 25055.06 7.8201E-04; + 28058.06 2.9320E-02; + 28060.06 1.1294E-02; + 28061.06 4.9094E-04; + 28062.06 1.5653E-03; + 28064.06 3.9864E-04; + 14028.06 5.6757E-04; + 14029.06 2.8820E-05; + 14030.06 1.8998E-05; } + } + + B4C{ + temp 566; + composition { + 5010.06 1.5206E-02; + 5011.06 6.1514E-02; + 6012.06 1.8972E-02; + //6013.06 2.1252E-04; + } + } + + Ag-In-Cd{ + temp 566; + composition { + 47107.06 2.3523E-02; + 47109.06 2.1854E-02; + 48106.06 3.3882E-05; + 48108.06 2.4166E-05; + 48110.06 3.3936E-04; + 48111.06 3.4821E-04; + 48112.06 6.5611E-04; + 48113.06 3.3275E-04; + 48114.06 7.8252E-04; + 48116.06 2.0443E-04; + 49113.06 3.4219E-04; + 49115.06 7.6511E-03; } + } + + UO2-16 { + temp 566; + tms 1; + composition { + 8016.03 4.5897E-02; + 8017.03 1.7436E-05; + //8018.03 9.2032E-05; + 92234.03 3.0131E-06; + 92235.03 3.7503E-04; + 92238.03 2.2625E-02;} + } + + UO2-24 { + temp 566; + tms 1; + composition { + 8016.03 4.5830E-02; + 8017.03 1.7411E-05; + //8018.03 9.1898E-05; + 92234.03 4.4842E-06; + 92235.03 5.5814E-04; + 92238.03 2.2407E-02;} + } + + UO2-31 { + temp 566; + tms 1; + composition { + 8016.03 4.5853E-02; + 8017.03 1.7420E-05; + //8018.03 9.1942E-05; + 92234.03 5.7987E-06; + 92235.03 7.2175E-04; + 92238.03 2.2253E-02;} + } + + UO2-32 { + temp 566; + tms 1; + composition { + 8016.03 4.6029E-02; + 8017.03 1.7487E-05; + //8018.03 9.2296E-05; + 92234.03 5.9959E-06; + 92235.03 7.4630E-04; + 92238.03 2.2317E-02; + } + } + + UO2-34 { + temp 566; + tms 1; + composition { + 8016.03 4.6110E-02; + 8017.03 1.7517E-05; + //8018.03 9.2459E-05; + 92234.03 6.4018E-06; + 92235.03 7.9681E-04; + 92238.03 2.2307E-02;} + } + + // vanadium51 was stated twice in carbonsteel below + // in the beavrs pdf - typo? + CarbonSteel { + temp 566; + composition { + 13027.06 4.3523E-05; + 5010.06 2.5833E-06; + 5011.06 1.0450E-05; + 6012.06 1.0442E-03; + //6013.06 1.1697E-05 ; + 20040.06 1.7043E-05; + 20042.06 1.1375E-07; + 20043.06 2.3734E-08; + 20044.06 3.6673E-07; + 20046.06 7.0322E-10; + 20048.06 3.2875E-08; + 24050.06 1.3738E-05; + 24052.06 2.6493E-04; + 24053.06 3.0041E-05; + 24054.06 7.4778E-06; + 29063.06 1.0223E-04; + 29065.06 4.5608E-05; + 26054.06 4.7437E-03; + 26056.06 7.4465E-02; + 26057.06 1.7197E-03; + 26058.06 2.2886E-04; + 25055.06 6.4126E-04; + 42100.06 2.9814E-05; + 42092.06 4.4822E-05; + 42094.06 2.8110E-05; + 42095.06 4.8567E-05; + 42096.06 5.1015E-05; + 42097.06 2.9319E-05; + 42098.06 7.4327E-05; + 41093.06 5.0559E-06; + 28058.06 4.0862E-04; + 28060.06 1.5740E-04; + 28061.06 6.8420E-06; + 28062.06 2.1815E-05; + 28064.06 5.5557E-06; + 15031.06 3.7913E-05; + 16032.06 3.4808E-05; + 16033.06 2.7420E-07; + 16034.06 1.5368E-06; + 16036.06 5.3398E-09; + 14028.06 6.1702E-04; + 14029.06 3.1330E-05; + 14030.06 2.0653E-05; + 22046.06 1.2144E-06; + 22047.06 1.0952E-06; + 22048.06 1.0851E-05; + 22049.06 7.9634E-07; + 22050.06 7.6249E-07; + //23050.06 1.1526E-07; + 23051.06 4.5989E-05; + } + } + + SupportPlateSS { + temp 566; + composition { + 24050.06 3.5223E-04; + 24052.06 6.7924E-03; + 24053.06 7.7020E-04; + 24054.06 1.9172E-04; + 26054.06 1.5882E-03; + 26056.06 2.4931E-02; + 26057.06 5.7578E-04; + 26058.06 7.6625E-05; + 25055.06 8.0762E-04; + 28058.06 2.5731E-03; + 28060.06 9.9117E-04; + 28061.06 4.3085E-05; + 28062.06 1.3738E-04; + 28064.06 3.4985E-05; + 14028.06 4.3711E-04; + 14029.06 2.2195E-05; + 14030.06 1.4631E-05;} + } + + SupportPlateBW { + temp 566; + moder {1001.06 (lwj3.11 lwj3.09); } + composition { + 5010.06 1.0559E-05; + 5011.06 4.2716E-05; + 1001.06 6.5512E-02; + 1002.06 1.0204E-05; + 8016.06 3.2683E-02; + 8017.06 1.2416E-05; + //8018.06 6.5535E-05; + } + } + + +} +} From 03cae61055ec7588decfeb95059860e493b1a72b Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Tue, 1 Apr 2025 23:31:01 +0100 Subject: [PATCH 03/20] Adding cell searching accelerations --- Geometry/Cells/cell_inter.f90 | 8 +- Geometry/Universes/cellUniverse_class.f90 | 117 +++++++++++++++++++++- Geometry/geometryStd_class.f90 | 2 +- 3 files changed, 120 insertions(+), 7 deletions(-) diff --git a/Geometry/Cells/cell_inter.f90 b/Geometry/Cells/cell_inter.f90 index 9a51a2e2b..1a82f8d72 100644 --- a/Geometry/Cells/cell_inter.f90 +++ b/Geometry/Cells/cell_inter.f90 @@ -29,7 +29,7 @@ module cell_inter !! !! Abstract interface for all cells !! - !! Cell is intendet to represent a volume of space. It is not intended to be + !! Cell is intended to represent a volume of space. It is not intended to be !! a independent entity, but rather to be used as a component of universes. !! !! Private Members: @@ -40,9 +40,9 @@ module cell_inter !! inside -> Return true is a given position is cntained inside the cell !! distance -> Assuming the point is inside the cell, calculate distance to the boundary !! and give surfIdx for the surface that will be crossed - !! setId -> Set ID of a cell - !! id -> Return id of a cell - !! kill -> Return to uninitialised state + !! setId -> Set ID of a cell + !! id -> Return id of a cell + !! kill -> Return to uninitialised state !! type, public, abstract :: cell private diff --git a/Geometry/Universes/cellUniverse_class.f90 b/Geometry/Universes/cellUniverse_class.f90 index ce528ab0f..cd1e07dd6 100644 --- a/Geometry/Universes/cellUniverse_class.f90 +++ b/Geometry/Universes/cellUniverse_class.f90 @@ -10,6 +10,9 @@ module cellUniverse_class use cell_inter, only : cell use cellShelf_class, only : cellShelf use universe_inter, only : universe, kill_super => kill + use omp_lib, only : omp_test_lock, omp_unset_lock, & + omp_init_lock, omp_destroy_lock, & + omp_lock_kind implicit none private @@ -22,6 +25,8 @@ module cellUniverse_class !! type, private :: localCell integer(shortInt) :: idx = 0 + integer(longInt) :: visits = 0 + integer(shortInt), dimension(:), allocatable :: neighb class(cell), pointer :: ptr => null() end type localCell @@ -53,6 +58,9 @@ module cellUniverse_class !! type, public, extends(universe) :: cellUniverse type(localCell), dimension(:), allocatable :: cells +#ifdef _OPENMP + integer(kind=omp_lock_kind), dimension(:), allocatable :: cellLocks +#endif contains ! Superclass procedures procedure :: init @@ -107,6 +115,14 @@ subroutine init(self, fill, dict, cells, surfs, mats) end do fill(N+1) = UNDEF_MAT + ! Create OMP locks for the cells +#ifdef _OPENMP + allocate(self % cellLocks(N)) + do i = 1, N + call OMP_init_lock(self % cellLocks) + end do +#endif + end subroutine init !! @@ -114,17 +130,44 @@ end subroutine init !! !! See universe_inter for details. !! - subroutine findCell(self, localID, cellIdx, r, u) + subroutine findCell(self, localID, cellIdx, r, u, initID, newNeighb) class(cellUniverse), intent(inout) :: self integer(shortInt), intent(out) :: localID integer(shortInt), intent(out) :: cellIdx real(defReal), dimension(3), intent(in) :: r real(defReal), dimension(3), intent(in) :: u + logical(defReal), intent(out), optional :: newNeighb + integer(shortInt) :: initID, i + + newNeighb = .true. + + ! Search neighbours if starting cell is given + if (present(initID)) then + + if ((initID > 0) .and. allocated(self % cells(initID) % neighb)) then + do i = 1, size(self % cells(initID) % neighb) + + localID = self % cells(initID) % neighb(i) + + if (self % cells(localID) % ptr % inside(r, u)) then + cellIdx = self % cells(localID) % idx + newNeighb = .false. + !$omp atomic + self % cells(localID) % visits = self % cells(localID) % visits + 1 + return + + end if + + end do + end if + end if ! Search all cells do localID = 1, size(self % cells) if (self % cells(localID) % ptr % inside(r, u)) then cellIdx = self % cells(localID) % idx + !$omp atomic + self % cells(localID) % visits = self % cells(localID) % visits + 1 return end if @@ -175,6 +218,11 @@ subroutine cross(self, coords, surfIdx) class(cellUniverse), intent(inout) :: self type(coord), intent(inout) :: coords integer(shortInt), intent(in) :: surfIdx + integer(shortInt) :: local0 + logical(defBool) :: lockSet + + ! Keep initial cell ID to add to neighbour lists + local0 = coords % localID ! NUDGE position slightly forward to escape surface tolerance ! and avoid calculating normal and extra dot-products @@ -185,10 +233,72 @@ subroutine cross(self, coords, surfIdx) call self % findCell(coords % localID, & coords % cellIdx, & coords % r, & - coords % dir) + coords % dir, & + initID = local0, & + newNeighb = newNeighb) + + ! Add to neighbour list + if (newNeighb) then + lockSet = .true. + +#ifdef _OPENMP + lockSet = OMP_test_lock(self % cellLocks(local0)) +#endif + if (lockSet) then + call self % addNeighbour(local0, coords % localID) +#ifdef _OPENMP + call OMP_unset_lock(self % cellLocks(local0)) +#endif + end if + +#ifdef _OPENMP + lockSet = OMP_test_lock(self % cellLocks(coords % localID)) +#endif + if (lockSet) then + call self % addNeighbour(coords % localID, local0) +#ifdef _OPENMP + call OMP_unset_lock(self % cellLocks(coords % localID)) +#endif + end if + + end if end subroutine cross + !! + !! Add one cell to another's neighbour list + !! + subroutine addNeighbour(self, id1, id2) + class(cellUniverse), intent(inout) :: self + integer(shortInt), intent(in) :: id1 + integer(shortInt), intent(in) :: id2 + integer(shortInt) :: sz + integer(shortInt), dimension(:), allocatable :: temp + + associate(neighb => self % cells(id1) % neighb) + + ! Size list + sz = size(neighb) + + ! Handle case where array is not allocated + if (sz1 == 0) then + allocate(neighb) + neighb(1) = id2 + else + + ! Ensure neighbour isn't already present + if (any(neighb == id2)) return + + temp = neighb + deallocate(neighb) + allocate(neighb(sz + 1)) + neighb(sz + 1) = temp + end if + + end associate + + end subroutine addNeighbour + !! !! Return offset for the current cell !! @@ -215,6 +325,9 @@ elemental subroutine kill(self) ! Local if(allocated(self % cells)) deallocate(self % cells) +#ifdef _OPENMP + if(allocated(self % cellLocks)) deallocate(self % cellLocks) +#endif end subroutine kill diff --git a/Geometry/geometryStd_class.f90 b/Geometry/geometryStd_class.f90 index d53e33020..334943014 100644 --- a/Geometry/geometryStd_class.f90 +++ b/Geometry/geometryStd_class.f90 @@ -233,7 +233,7 @@ subroutine move_noCache(self, coords, maxDist, event) ! Place back in geometry call self % placeCoord(coords) - else ! Crosses to diffrent local cell + else ! Crosses to different local cell ! Move to boundary at hit level call coords % moveLocal(dist, level) event = CROSS_EV From 95ada4f8f900772359d3a2b4fceae393af8c114b Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Thu, 3 Apr 2025 22:58:43 +0100 Subject: [PATCH 04/20] Small fixes --- DataStructures/CMakeLists.txt | 2 + DataStructures/Tests/dynArray_test.f90 | 6 +- DataStructures/Tests/linkedList_test.f90 | 103 +++++++ DataStructures/linkedList_class.f90 | 188 ++++++++++++ .../Universes/Tests/cellUniverse_test.f90 | 3 +- Geometry/Universes/cellUniverse_class.f90 | 271 ++++++++++-------- Geometry/Universes/latUniverse_class.f90 | 2 +- Geometry/Universes/pinUniverse_class.f90 | 2 +- Geometry/Universes/rootUniverse_class.f90 | 2 +- Geometry/Universes/universe_inter.f90 | 2 +- 10 files changed, 460 insertions(+), 121 deletions(-) create mode 100644 DataStructures/Tests/linkedList_test.f90 create mode 100644 DataStructures/linkedList_class.f90 diff --git a/DataStructures/CMakeLists.txt b/DataStructures/CMakeLists.txt index 6aa7a53af..bc4e7aced 100644 --- a/DataStructures/CMakeLists.txt +++ b/DataStructures/CMakeLists.txt @@ -4,6 +4,7 @@ add_sources( ./dictionary_class.f90 ./charMap_class.f90 ./stack_class.f90 ./dynArray_class.f90 + ./linkedList_class.f90 ./dictParser_func.f90) # Add Unit Tests to a global List @@ -11,6 +12,7 @@ add_unit_tests( ./Tests/dictionary_test.f90 ./Tests/intMap_test.f90 ./Tests/charMap_test.f90 ./Tests/dynArray_test.f90 + ./Tests/linkedList_test.f90 ./Tests/dictParser_test.f90) add_integration_tests( ./Tests/dictParser_iTest.f90) diff --git a/DataStructures/Tests/dynArray_test.f90 b/DataStructures/Tests/dynArray_test.f90 index f9eae3587..43be8af1b 100644 --- a/DataStructures/Tests/dynArray_test.f90 +++ b/DataStructures/Tests/dynArray_test.f90 @@ -22,7 +22,7 @@ subroutine testUnallocatedInt() @assertEqual(0, array % capacity(), 'Capacity of unallocated array') @assertTrue(array % isEmpty(),'isEmpty on unallocated array') - ! Make shure no SEG ERR happens + ! Make sure no SEG ERR happens call array % shrink() end subroutine testUnallocatedInt @@ -40,7 +40,7 @@ subroutine testEmptyInt() @assertEqual(0, array % getSize(),'Size of empty array') @assertTrue(array % isEmpty(),'isEmpty on empty array') - ! Make shure no SEG ERR happens + ! Make sure no SEG ERR happens call array % shrink() @assertEqual(0, array % capacity(),'Capacity of shrunk empty array') @@ -101,7 +101,7 @@ subroutine testUsage() @assertEqual(2*i, array % pop()) end do - ! Test building by emelent and vector + ! Test building by element and vector call array % add(1) call array % add([8,3]) diff --git a/DataStructures/Tests/linkedList_test.f90 b/DataStructures/Tests/linkedList_test.f90 new file mode 100644 index 000000000..c46fbeb63 --- /dev/null +++ b/DataStructures/Tests/linkedList_test.f90 @@ -0,0 +1,103 @@ +module linkedList_test + use numPrecision + use linkedList_class, only : linkedIntList + use funit + + implicit none + +contains + +!!<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> +!! PROPER TESTS BEGIN HERE +!!<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> + + !! + !! Test correct behaviour on unallocated linkedList + !! +@Test + subroutine testUnallocatedInt() + type(linkedIntList) :: list + + @assertEqual(0, list % getSize(),'Size of unallocated list') + + end subroutine testUnallocatedInt + + !! + !! Test correct behaviour on empty linkedIntList + !! +@Test + subroutine testEmptyInt() + type(linkedIntlist) :: list + + call list % add(5) + call list % add(3) + call list % add(4) + + call list % kill() + + @assertEqual(0, list % getSize(),'Size of empty list') + + end subroutine testEmptyInt + + !! + !! Test resizing + !! +@Test + subroutine testAddInt() + type(linkedIntList) :: list + + call list % add(7) + @assertEqual(1, list % getSize()) + + call list % add(4) + call list % add(6) + @assertEqual(3, list % getSize()) + + call list % kill() + @assertEqual(0, list % getSize()) + + end subroutine testAddInt + + !! + !! Test usage + !! +@Test + subroutine testUsage() + type(linkedIntList) :: list + integer(shortInt) :: i + + call list % add(8) + call list % add(42) + call list % add(666) + + ! Test getting elements by index + @assertEqual(8, list % get(1)) + @assertEqual(42, list % get(2)) + @assertEqual(666, list % get(3)) + + call list % kill() + + ! Build by elements + do i=1,7 + call list % add(2 * i) + end do + + ! Test getSize + @assertFalse(list % getSize() == 0) + @assertEqual(7, list % getSize()) + + + end subroutine testUsage + + !! + !! Test kill of unallocated array + !! +@Test + subroutine testKillUnalloc() + type(linkedIntList) :: list + + call list % kill() + + end subroutine testKillUnalloc + +end module linkedList_test diff --git a/DataStructures/linkedList_class.f90 b/DataStructures/linkedList_class.f90 new file mode 100644 index 000000000..e2d025374 --- /dev/null +++ b/DataStructures/linkedList_class.f90 @@ -0,0 +1,188 @@ +module linkedList_class + + use numPrecision + use genericProcedures, only : fatalError + + implicit none + private + + !! Presently only contains a linked list of shortInts. Can be easily duplicated + !! for other variable types. + + !! + !! Linked list node containing an int and pointer + !! to the next node + !! + type :: intNode + integer(shortInt) :: data + type(intNode), pointer :: next => null() + end type intNode + + + !! + !! Linked list for shortIntegers + !! + !! Contains the start of the list and end (for faster additions). + !! Could be optimised by returning the node as an iterator. + !! The current implementation of traversal will start to become slow + !! for searching long lists. + !! + !! Public interface: + !! add -> add a new entry to the list (omp critical) + !! get -> get a value in the list at a particular index + !! getSize -> return the length of the list + !! display -> output the contents of the list to display + !! kill -> clean up the list + !! + !! Private procedures: + !! traverse -> move to a specified node in the list + !! + type, public :: linkedIntList + private + type(intNode), pointer :: head => null() + type(intNode), pointer :: tail => null() + integer(shortInt) :: length = 0 + contains + ! Public interface + procedure :: add => add_shortInt + procedure :: get => get_shortInt + procedure :: getSize => getSize_shortInt + procedure :: display => display_shortInt + procedure :: kill => kill_shortInt + + ! Private procedures + procedure, private :: traverse => traverse_shortInt + + end type linkedIntList + +contains + + !! + !! Add entry at the end of linked list + !! + !! Enclosed in a critical statement to prevent corruption. + !! + subroutine add_shortInt(self, entry) + class(linkedIntList), intent(inout) :: self + integer(shortInt), intent(in) :: entry + class(intNode), pointer :: tail + + !$omp critical + ! Go to the end of the list + if (self % length == 0) then + allocate(self % head) + self % head % data = entry + self % tail => self % head + + else + tail => self % tail + allocate(tail % next) + self % tail => tail % next + self % tail % data = entry + end if + + self % length = self % length + 1 + !$omp end critical + + end subroutine add_shortInt + + !! + !! Move down the linked list until a given index + !! + !! Errors: + !! Requested index exceeds the length of the list + !! + function traverse_shortInt(self, idx) result(resNode) + class(linkedIntList), intent(in) :: self + integer(shortInt), intent(in) :: idx + class(intNode), pointer :: resNode + integer(shortInt) :: i + character(100), parameter :: Here = 'traverse_shortInt (linkedList_Class.f90)' + + if (idx > self % length) call fatalError(Here,& + 'Requested index exceeds list length') + + resNode => self % head + i = 1 + do while (i < idx) + resNode => resNode % next + i = i + 1 + end do + + end function traverse_shortInt + + !! + !! Get size of the linked list + !! + pure function getSize_shortInt(self) result(S) + class(linkedIntList), intent(in) :: self + integer(shortInt) :: S + + S = self % length + + end function getSize_shortInt + + !! + !! Return a value from the list at a given index + !! + !! Errors: + !! The list has no elements + !! + function get_shortInt(self, idx) result(res) + class(linkedIntList), intent(in) :: self + integer(shortInt), intent(in) :: idx + integer(shortInt) :: res + class(intNode), pointer :: resNode + character(100), parameter :: Here = 'get_shortInt (linkedList_Class.f90)' + + if (self % getSize() == 0) call fatalError(Here,'Linked list is not allocated') + + resNode => self % traverse(idx) + res = resNode % data + + end function get_shortInt + + !! + !! Deallocate linked list + !! + subroutine kill_shortInt(self) + class(linkedIntList), intent(inout) :: self + integer(shortInt) :: i + class(intNode), pointer :: resNode + + ! Traverse the list and nullify pointers + do while (self % length > 1) + self % length = self % length - 1 + resNode => self % traverse(self % length) + resNode % next => null() + end do + self % head => null() + self % tail => null() + self % length = 0 + + end subroutine kill_shortInt + + !! + !! Print contents of linked list + !! + subroutine display_shortInt(self) + class(linkedIntList), intent(inout) :: self + integer(shortInt) :: i + class(intNode), pointer :: resNode + + if (self % length == 0) then + print *,'Empty list' + return + end if + + resNode => self % head + i = 1 + do while (i < self % length) + print *, resNode % data + resNode => resNode % next + i = i + 1 + end do + + end subroutine display_shortInt + +end module linkedList_class diff --git a/Geometry/Universes/Tests/cellUniverse_test.f90 b/Geometry/Universes/Tests/cellUniverse_test.f90 index 875f71403..3a8c0bf98 100644 --- a/Geometry/Universes/Tests/cellUniverse_test.f90 +++ b/Geometry/Universes/Tests/cellUniverse_test.f90 @@ -13,7 +13,7 @@ module cellUniverse_test use funit implicit none - + ! Parameters character(*), parameter :: SURF_DEF = & " surf1 { id 1; type sphere; origin (0.0 0.0 0.0); radius 2;}& @@ -161,7 +161,6 @@ subroutine test_enter() @assertEqual([ZERO, -ONE, ZERO], new % rotMat(2,:), TOL) @assertEqual([ONE , ZERO, ZERO], new % rotMat(3,:), TOL) - end subroutine test_enter !! diff --git a/Geometry/Universes/cellUniverse_class.f90 b/Geometry/Universes/cellUniverse_class.f90 index cd1e07dd6..14e6ab5fb 100644 --- a/Geometry/Universes/cellUniverse_class.f90 +++ b/Geometry/Universes/cellUniverse_class.f90 @@ -6,6 +6,7 @@ module cellUniverse_class use dictionary_class, only : dictionary use coord_class, only : coord use charMap_class, only : charMap + use linkedList_class, only : linkedIntList use surfaceShelf_class, only : surfaceShelf use cell_inter, only : cell use cellShelf_class, only : cellShelf @@ -15,19 +16,23 @@ module cellUniverse_class omp_lock_kind implicit none private + + integer(longInt), public, parameter :: reorderFreq = 10_longInt**6 !! !! Local helper class to group cell data !! !! Public Members: - !! idx -> cellIdx of the cell in cellShelf - !! ptr -> Pointer to the cell + !! idx -> cellIdx of the cell in cellShelf + !! ptr -> Pointer to the cell + !! visits -> Number of times the cell has been found + !! neighb -> Neighbour list of adjacent cells !! type, private :: localCell integer(shortInt) :: idx = 0 - integer(longInt) :: visits = 0 - integer(shortInt), dimension(:), allocatable :: neighb class(cell), pointer :: ptr => null() + integer(longInt) :: visits = 0 + type(linkedIntList) :: neighb end type localCell !! @@ -37,6 +42,10 @@ module cellUniverse_class !! An extra local cell is always defined inside the cellUniverse with UNDEF_MAT !! (undefined material) filling. If position is not in any user-defined cell, it is in this !! extra cell. Extra cell exists to enable plotting of geometry without fatalErrors. + !! The universe periodically reorders the cells by frequency of visits to accelerate cell + !! search operations. + !! Additionally, neighbour lists are built when the cross operation is invoked. These also + !! accelerate cell searches. !! !! Sample Input Dictionary: !! uni { type cellUniverse; @@ -51,16 +60,17 @@ module cellUniverse_class !! - Cell overlaps are forbidden, but there is no check to find overlaps. !! !! Public Members: - !! cells -> Structure that stores cellIdx and pointers to the cells + !! cells -> Structure that stores cellIdx and pointers to the cells + !! searchIdx -> Array of cell indices to search in order. Used to accelerate search. + !! reordering -> Flag to allow searchIdx to be safely reordered in parallel !! !! Interface: !! universe interface !! type, public, extends(universe) :: cellUniverse - type(localCell), dimension(:), allocatable :: cells -#ifdef _OPENMP - integer(kind=omp_lock_kind), dimension(:), allocatable :: cellLocks -#endif + type(localCell), dimension(:), allocatable :: cells + integer(shortInt), dimension(:), allocatable :: searchIdx + logical(defBool) :: reordering = .false. contains ! Superclass procedures procedure :: init @@ -69,6 +79,10 @@ module cellUniverse_class procedure :: distance procedure :: cross procedure :: cellOffset + + ! Local procedures + procedure :: findCellNeighb + procedure :: reorderCells end type cellUniverse contains @@ -115,69 +129,142 @@ subroutine init(self, fill, dict, cells, surfs, mats) end do fill(N+1) = UNDEF_MAT - ! Create OMP locks for the cells -#ifdef _OPENMP - allocate(self % cellLocks(N)) - do i = 1, N - call OMP_init_lock(self % cellLocks) - end do -#endif + ! Create search indices to accelerate cell search + allocate(self % searchIdx(N)) + self % searchIdx = [(i, i = 1, size(self % cells))] + + ! Initialise flag for blocking visit-ordered searches + self % reordering = .false. end subroutine init + !! + !! Change the order in which cells are searched. + !! Done by insertion sort. + !! Should make cell searches more efficient, reordering to + !! place the most frequently visited cells first. + !! + subroutine reorderCells(self) + class(cellUniverse), intent(inout) :: self + integer(shortInt) :: i, j, N, keyIdx + integer(longInt) :: keyVisit + + associate(cells => self % cells, idx => self % searchIdx) + N = size(cells) + do i = 2, n + keyIdx = idx(i) + keyVisit = cells(keyIdx) % visits + j = i - 1 + + ! Shift elements right until correct position found + do while (j >= 1 .and. cells(idx(j)) % visits < keyVisit) + idx(j + 1) = idx(j) + j = j - 1 + end do + + ! Insert element in correct position + idx(j + 1) = keyIdx + end do + end associate + + end subroutine reorderCells + !! !! Find local cell ID given a point !! !! See universe_inter for details. !! - subroutine findCell(self, localID, cellIdx, r, u, initID, newNeighb) + subroutine findCell(self, localID, cellIdx, r, u) class(cellUniverse), intent(inout) :: self integer(shortInt), intent(out) :: localID integer(shortInt), intent(out) :: cellIdx real(defReal), dimension(3), intent(in) :: r real(defReal), dimension(3), intent(in) :: u - logical(defReal), intent(out), optional :: newNeighb - integer(shortInt) :: initID, i - - newNeighb = .true. - - ! Search neighbours if starting cell is given - if (present(initID)) then - - if ((initID > 0) .and. allocated(self % cells(initID) % neighb)) then - do i = 1, size(self % cells(initID) % neighb) - - localID = self % cells(initID) % neighb(i) - - if (self % cells(localID) % ptr % inside(r, u)) then - cellIdx = self % cells(localID) % idx - newNeighb = .false. - !$omp atomic - self % cells(localID) % visits = self % cells(localID) % visits + 1 - return - - end if - - end do - end if + integer(shortInt) :: i + integer(shortInt), dimension(:), allocatable :: array + + ! Decide whether to use ordered array of cells or sorted array + if (self % reordering) then + array = [(i, i = 1, size(self % cells))] + else + array = self % searchIdx end if ! Search all cells - do localID = 1, size(self % cells) + do i = 1, size(self % cells) + localID = array(i) if (self % cells(localID) % ptr % inside(r, u)) then cellIdx = self % cells(localID) % idx !$omp atomic self % cells(localID) % visits = self % cells(localID) % visits + 1 + + if (mod(self % cells(localID) % visits, reorderFreq) == 0) then + !$omp critical + self % reordering = .true. + call self % reorderCells() + self % reordering = .false. + !$omp end critical + end if return end if end do ! If not found return undefined cell - ! Already set to localID (== size(self % cells) + 1) by the do loop + localID = i cellIdx = 0 end subroutine findCell + + !! + !! Find local cell ID given a cell and its neighbour list + !! + subroutine findCellNeighb(self, localID, cellIdx, r, u, initID, foundNeighb) + class(cellUniverse), intent(inout) :: self + integer(shortInt), intent(out) :: localID + integer(shortInt), intent(out) :: cellIdx + real(defReal), dimension(3), intent(in) :: r + real(defReal), dimension(3), intent(in) :: u + integer(shortInt), intent(in) :: initID + logical(defBool), intent(out) :: foundNeighb + integer(shortInt) :: i + + ! If not found return undefined cell + cellIdx = 0 + foundNeighb = .false. + + if (initID < 1) return + + associate(neighb => self % cells(initID) % neighb) + + ! Search neighbours if starting cell is given + if (neighb % getSize() > 0) then + do i = 1, neighb % getSize() + + localID = neighb % get(i) + + if (self % cells(localID) % ptr % inside(r, u)) then + cellIdx = self % cells(localID) % idx + foundNeighb = .true. + !$omp atomic + self % cells(localID) % visits = self % cells(localID) % visits + 1 + if (mod(self % cells(localID) % visits, reorderFreq) == 0) then + !$omp critical + self % reordering = .true. + call self % reorderCells() + self % reordering = .false. + !$omp end critical + end if + return + + end if + + end do + end if + + end associate + + end subroutine findCellNeighb !! !! Return distance to the next boundary between local cells in the universe @@ -219,7 +306,7 @@ subroutine cross(self, coords, surfIdx) type(coord), intent(inout) :: coords integer(shortInt), intent(in) :: surfIdx integer(shortInt) :: local0 - logical(defBool) :: lockSet + logical(defBool) :: foundNeighb ! Keep initial cell ID to add to neighbour lists local0 = coords % localID @@ -229,75 +316,31 @@ subroutine cross(self, coords, surfIdx) coords % r = coords % r + coords % dir * NUDGE ! Find cell - ! TODO: Some cell neighbout list - call self % findCell(coords % localID, & + ! First perform a neighbour search + call self % findCellNeighb(coords % localID, & coords % cellIdx, & coords % r, & coords % dir, & - initID = local0, & - newNeighb = newNeighb) - - ! Add to neighbour list - if (newNeighb) then - lockSet = .true. - -#ifdef _OPENMP - lockSet = OMP_test_lock(self % cellLocks(local0)) -#endif - if (lockSet) then - call self % addNeighbour(local0, coords % localID) -#ifdef _OPENMP - call OMP_unset_lock(self % cellLocks(local0)) -#endif - end if - -#ifdef _OPENMP - lockSet = OMP_test_lock(self % cellLocks(coords % localID)) -#endif - if (lockSet) then - call self % addNeighbour(coords % localID, local0) -#ifdef _OPENMP - call OMP_unset_lock(self % cellLocks(coords % localID)) -#endif - end if + local0, & + foundNeighb) - end if - - end subroutine cross - - !! - !! Add one cell to another's neighbour list - !! - subroutine addNeighbour(self, id1, id2) - class(cellUniverse), intent(inout) :: self - integer(shortInt), intent(in) :: id1 - integer(shortInt), intent(in) :: id2 - integer(shortInt) :: sz - integer(shortInt), dimension(:), allocatable :: temp - - associate(neighb => self % cells(id1) % neighb) + if (foundNeighb) return - ! Size list - sz = size(neighb) - - ! Handle case where array is not allocated - if (sz1 == 0) then - allocate(neighb) - neighb(1) = id2 - else - - ! Ensure neighbour isn't already present - if (any(neighb == id2)) return - - temp = neighb - deallocate(neighb) - allocate(neighb(sz + 1)) - neighb(sz + 1) = temp - end if + ! If that failed, perform an exhaustive search and add the + ! new cell to the neighbour list + call self % findCell(coords % localID, & + coords % cellIdx, & + coords % r, & + coords % dir) - end associate + ! Ensure the cells can be added to the neighbour list + if (coords % cellIdx < 1) return + + ! Add each cell to the other's neighbour list + call self % cells(local0) % neighb % add(coords % localID) + call self % cells(coords % localID) % neighb % add(local0) - end subroutine addNeighbour + end subroutine cross !! !! Return offset for the current cell @@ -317,17 +360,21 @@ end function cellOffset !! !! Return to uninitialised state !! - elemental subroutine kill(self) + subroutine kill(self) class(cellUniverse), intent(inout) :: self + integer(shortInt) :: i - ! SUperclass + ! Superclass call kill_super(self) ! Local - if(allocated(self % cells)) deallocate(self % cells) -#ifdef _OPENMP - if(allocated(self % cellLocks)) deallocate(self % cellLocks) -#endif + if(allocated(self % cells)) then + do i = 1, size(self % cells) + call self % cells(i) % neighb % kill() + end do + deallocate(self % cells) + end if + if(allocated(self % searchIdx)) deallocate(self % searchIdx) end subroutine kill diff --git a/Geometry/Universes/latUniverse_class.f90 b/Geometry/Universes/latUniverse_class.f90 index ca950e9cd..8232ca6f8 100644 --- a/Geometry/Universes/latUniverse_class.f90 +++ b/Geometry/Universes/latUniverse_class.f90 @@ -345,7 +345,7 @@ end function cellOffset !! !! Return to uninitialised state !! - elemental subroutine kill(self) + subroutine kill(self) class(latUniverse), intent(inout) :: self ! Superclass diff --git a/Geometry/Universes/pinUniverse_class.f90 b/Geometry/Universes/pinUniverse_class.f90 index e22fae1cc..3b02cbe88 100644 --- a/Geometry/Universes/pinUniverse_class.f90 +++ b/Geometry/Universes/pinUniverse_class.f90 @@ -269,7 +269,7 @@ end function cellOffset !! !! Return to uninitialised state !! - elemental subroutine kill(self) + subroutine kill(self) class(pinUniverse), intent(inout) :: self ! Superclass diff --git a/Geometry/Universes/rootUniverse_class.f90 b/Geometry/Universes/rootUniverse_class.f90 index 54f6d76be..2d8773dc1 100644 --- a/Geometry/Universes/rootUniverse_class.f90 +++ b/Geometry/Universes/rootUniverse_class.f90 @@ -197,7 +197,7 @@ end function cellOffset !! !! Return to uninitialised state !! - elemental subroutine kill(self) + subroutine kill(self) class(rootUniverse), intent(inout) :: self ! Superclass diff --git a/Geometry/Universes/universe_inter.f90 b/Geometry/Universes/universe_inter.f90 index c903a50bd..0da4ba300 100644 --- a/Geometry/Universes/universe_inter.f90 +++ b/Geometry/Universes/universe_inter.f90 @@ -398,7 +398,7 @@ end subroutine enter !! !! Return to uninitialised state !! - elemental subroutine kill(self) + subroutine kill(self) class(universe), intent(inout) :: self self % uniIdx = 0 From a607f7f3b37a2d041cb50b434bf93d7e63679eb7 Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Mon, 7 Apr 2025 20:14:32 +0100 Subject: [PATCH 05/20] Added overlap feature to cellUniverse Can enable overlap checking in cell universes. Required adding an overlap material. In adding this, also fixed a few typos, updated docs, and changed transport operators to use select cases rather than several ifs. --- DataStructures/linkedList_class.f90 | 2 +- .../Universes/Tests/cellUniverse_test.f90 | 104 ++++++++++++++- Geometry/Universes/cellUniverse_class.f90 | 120 ++++++++++++++---- Geometry/coord_class.f90 | 2 +- Geometry/geomGraph_class.f90 | 2 +- Geometry/geometryStd_class.f90 | 8 +- NuclearData/materialMenu_mod.f90 | 6 +- .../Source/fissionSource_class.f90 | 11 +- .../rayVolPhysicsPackage_class.f90 | 6 +- SharedModules/universalVariables.f90 | 9 +- Tallies/TallyClerks/collisionClerk_class.f90 | 2 + .../transportOperatorDT_class.f90 | 46 ++++--- .../transportOperatorHT_class.f90 | 96 ++++++++------ .../transportOperatorST_class.f90 | 56 +++++--- Visualisation/visualiser_class.f90 | 1 + docs/User Manual.rst | 11 +- 16 files changed, 361 insertions(+), 121 deletions(-) diff --git a/DataStructures/linkedList_class.f90 b/DataStructures/linkedList_class.f90 index e2d025374..4a242f2ed 100644 --- a/DataStructures/linkedList_class.f90 +++ b/DataStructures/linkedList_class.f90 @@ -58,7 +58,7 @@ module linkedList_class contains !! - !! Add entry at the end of linked list + !! Add entry at the end of linked list. !! !! Enclosed in a critical statement to prevent corruption. !! diff --git a/Geometry/Universes/Tests/cellUniverse_test.f90 b/Geometry/Universes/Tests/cellUniverse_test.f90 index 3a8c0bf98..9d9e705fc 100644 --- a/Geometry/Universes/Tests/cellUniverse_test.f90 +++ b/Geometry/Universes/Tests/cellUniverse_test.f90 @@ -2,7 +2,7 @@ module cellUniverse_test use numPrecision use genericProcedures - use universalVariables, only : UNDEF_MAT + use universalVariables, only : UNDEF_MAT, OVERLAP_MAT use dictionary_class, only : dictionary use dictParser_func, only : charToDict use charMap_class, only : charMap @@ -32,12 +32,25 @@ module cellUniverse_test ! character(*), parameter :: UNI_DEF = & "id 1; type cellUniverse; origin (2.0 0.0 0.0); rotation (90.0 90.0 90.0); cells (1 2);" + + character(*), parameter :: SURF2_DEF = & + " surf1 { id 1; type sphere; origin (21.0 0.0 0.0); radius 4.5;}& + & surf2 { id 2; type sphere; origin (0.0 0.0 0.0); radius 24.1;}& + & surf3 { id 3; type sphere; origin (0.0 0.0 0.0); radius 28;}" + + character(*), parameter :: CELL2_DEF = & + " cell1 {id 1; type simpleCell; surfaces (-1); filltype uni; universe 3;} & + & cell2 {id 2; type simpleCell; surfaces (1 -2); filltype uni; universe 4;}& + & cell3 {id 3; type simpleCell; surfaces (2); filltype uni; universe 5;}" + + character(*), parameter :: UNI2_DEF = & + "id 2; type cellUniverse; origin (0.0 0.0 0.0); checkOverlap 1; cells (1 2 3);" ! Variables - type(surfaceShelf) :: surfs - type(cellShelf) :: cells - type(charMap) :: mats - type(cellUniverse) :: uni + type(surfaceShelf) :: surfs, surfs2 + type(cellShelf) :: cells, cells2 + type(charMap) :: mats, mats2 + type(cellUniverse) :: uni, uni2 contains @@ -46,7 +59,7 @@ module cellUniverse_test !! @Before subroutine setUp() - integer(shortInt), dimension(:), allocatable :: fill + integer(shortInt), dimension(:), allocatable :: fill, fill2 type(dictionary) :: dict ! Build surfaces and MATS @@ -66,9 +79,27 @@ subroutine setUp() ! Set index call uni % setIdx(8) + + ! Build overlapping universe + call charToDict(dict, SURF2_DEF) + call surfs2 % init(dict) + call dict % kill() + + call charToDict(dict, CELL2_DEF) + call cells2 % init(dict, surfs2, mats2) + call dict % kill() + + ! Build universe + call charToDict(dict, UNI2_DEF) + call uni2 % init(fill2, dict, cells2, surfs2, mats2) + call dict % kill() + + ! Set index + call uni2 % setIdx(9) ! Verify fill - @assertEqual([-3, -4, UNDEF_MAT], fill) + @assertEqual([-3, -4, UNDEF_MAT, OVERLAP_MAT], fill) + @assertEqual([-3, -4, -5, UNDEF_MAT, OVERLAP_MAT], fill2) end subroutine setUp @@ -82,6 +113,11 @@ subroutine clean() call cells % kill() call mats % kill() call uni % kill() + + call surfs2 % kill() + call cells2 % kill() + call mats2 % kill() + call uni2 % kill() end subroutine clean @@ -259,6 +295,60 @@ subroutine test_cellOffset() end subroutine test_cellOffset + !! + !! Test identifying overlapping cells + !! +@Test + subroutine test_overlap() + type(coord) :: new + real(defReal), dimension(3) :: r_ref, u_ref, r, dir + real(defReal), parameter :: TOL = 1.0E-7_defReal + + ! ** Enter into local cell 1 + r = [22.0_defReal, 0.0_defReal, 0.0_defReal ] + dir = [ONE, ZERO, ZERO] + + call uni2 % enter(new, r, dir) + + ! Verify location + r_ref = [22.0_defReal, 0.0_defReal, 0.0_defReal] + u_ref = [ONE, ZERO, ZERO] + @assertEqual(r_ref, new % r, TOL ) + @assertEqual(u_ref, new % dir, TOL) + @assertEqual(9, new % uniIdx) + @assertEqual(1, new % localID) + @assertEqual(cells2 % getIdx(1), new % cellIdx) + + ! ** Enter into local cell 3 + r = [0.0_defReal, 25.0_defReal, 0.0_defReal] + dir = [ONE, ZERO, ZERO] + + call uni2 % enter(new, r, dir) + + ! Verify location + r_ref = [0.0_defReal, 25.0_defReal, 0.0_defReal] + u_ref = [ONE, ZERO, ZERO] + @assertEqual(r_ref, new % r, TOL ) + @assertEqual(u_ref, new % dir, TOL) + @assertEqual(9, new % uniIdx) + @assertEqual(3, new % localID) + @assertEqual(cells2 % getIdx(3), new % cellIdx) + + ! ** Enter into the OVERLAP cell + r = [24.2_defReal, 0.0_defReal, 0.0_defReal] + dir = [ONE, ZERO, ZERO] + + call uni2 % enter(new, r, dir) + + ! Verify location + r_ref = [24.2_defReal, 0.0_defReal, 0.0_defReal] + u_ref = [ONE, ZERO, ZERO] + @assertEqual(r_ref, new % r, TOL ) + @assertEqual(u_ref, new % dir, TOL) + @assertEqual(9, new % uniIdx) + @assertEqual(5, new % localID) + @assertEqual(0, new % cellIdx) + end subroutine test_overlap end module cellUniverse_test diff --git a/Geometry/Universes/cellUniverse_class.f90 b/Geometry/Universes/cellUniverse_class.f90 index 14e6ab5fb..2dfa0f4f5 100644 --- a/Geometry/Universes/cellUniverse_class.f90 +++ b/Geometry/Universes/cellUniverse_class.f90 @@ -1,7 +1,7 @@ module cellUniverse_class use numPrecision - use universalVariables, only : UNDEF_MAT, NUDGE + use universalVariables, only : UNDEF_MAT, OVERLAP_MAT, NUDGE use genericProcedures, only : fatalError, numToChar use dictionary_class, only : dictionary use coord_class, only : coord @@ -39,30 +39,40 @@ module cellUniverse_class !! Representation of a universe via cells !! !! Each local cell in the universe corresponds to a cell given by an ID. - !! An extra local cell is always defined inside the cellUniverse with UNDEF_MAT - !! (undefined material) filling. If position is not in any user-defined cell, it is in this - !! extra cell. Extra cell exists to enable plotting of geometry without fatalErrors. + !! Two extra local cells are always defined inside the cellUniverse with UNDEF_MAT + !! (undefined material) and OVERLAP_MAT (overlapping cells) filling. + !! If position is not in any user-defined cell, it is in the undefined cell. If position + !! is in more than one user-defined cell, it is in the overlapping cell. These both exist + !! to enable plotting of geometry without fatalErrors. + !! However, overlapping cells can only be detected if a less optimal cell search is enabled + !! using the checkOverlap flag. This is encouraged for plotting and debugging, but discouraged + !! during transport. + !! !! The universe periodically reorders the cells by frequency of visits to accelerate cell !! search operations. !! Additionally, neighbour lists are built when the cross operation is invoked. These also !! accelerate cell searches. !! + !! Can optionally check for overlaps. + !! !! Sample Input Dictionary: !! uni { type cellUniverse; !! id 7; !! # origin (2.0 0.0 0.0); # !! # rotation (23.0 0.0 0.0); # + !! # checkOverlap 0; # !! cells ( 1 3 4); } !! !! Note: !! - Local IDs are assigned in order as in definition. In the example above local id would map - !! to following cell [localID: cellID] {1: 1, 2: 3, 3: 4, 4: UNDEF } - !! - Cell overlaps are forbidden, but there is no check to find overlaps. + !! to following cell [localID: cellID] {1: 1, 2: 3, 3: 4, 4: UNDEF, 5: OVERLAP } + !! - Cell overlaps are forbidden, but there is no check to find overlaps unless specified in input. !! !! Public Members: - !! cells -> Structure that stores cellIdx and pointers to the cells - !! searchIdx -> Array of cell indices to search in order. Used to accelerate search. - !! reordering -> Flag to allow searchIdx to be safely reordered in parallel + !! cells -> Structure that stores cellIdx and pointers to the cells + !! searchIdx -> Array of cell indices to search in order. Used to accelerate search. + !! reordering -> Flag to allow searchIdx to be safely reordered in parallel + !! checkOverlap -> Flag to induce slower, thorough cell searches to detect overlaps !! !! Interface: !! universe interface @@ -71,6 +81,7 @@ module cellUniverse_class type(localCell), dimension(:), allocatable :: cells integer(shortInt), dimension(:), allocatable :: searchIdx logical(defBool) :: reordering = .false. + logical(defBool) :: checkOverlap = .false. contains ! Superclass procedures procedure :: init @@ -81,6 +92,7 @@ module cellUniverse_class procedure :: cellOffset ! Local procedures + procedure :: findCellOverlap procedure :: findCellNeighb procedure :: reorderCells end type cellUniverse @@ -122,12 +134,16 @@ subroutine init(self, fill, dict, cells, surfs, mats) end do ! Create fill array - allocate(fill(N+1)) + allocate(fill(N+2)) do i = 1, N fill(i) = cells % getFill(self % cells(i) % idx) end do fill(N+1) = UNDEF_MAT + fill(N+2) = OVERLAP_MAT + + ! Check for overlaps? + call dict % getOrDefault(self % checkOverlap, 'checkOverlap', .false.) ! Create search indices to accelerate cell search allocate(self % searchIdx(N)) @@ -143,6 +159,7 @@ end subroutine init !! Done by insertion sort. !! Should make cell searches more efficient, reordering to !! place the most frequently visited cells first. + !! Insertion sort should be fast for nearly-sorted arrays. !! subroutine reorderCells(self) class(cellUniverse), intent(inout) :: self @@ -183,6 +200,12 @@ subroutine findCell(self, localID, cellIdx, r, u) integer(shortInt) :: i integer(shortInt), dimension(:), allocatable :: array + ! If being careful, only do exhaustive searches to check for overlap + if (self % checkOverlap) then + call self % findCellOverlap(localID, cellIdx, r, u) + return + end if + ! Decide whether to use ordered array of cells or sorted array if (self % reordering) then array = [(i, i = 1, size(self % cells))] @@ -216,6 +239,53 @@ subroutine findCell(self, localID, cellIdx, r, u) end subroutine findCell + !! + !! Find local cell ID given a point + !! DEBUG procedure for detecting overlaps. + !! Searches every cell and checks for more than one cell found. + !! Significantly slower than alternatives in universes with + !! many cells. + !! + !! See universe_inter for details. + !! + subroutine findCellOverlap(self, localID, cellIdx, r, u) + class(cellUniverse), intent(inout) :: self + integer(shortInt), intent(out) :: localID + integer(shortInt), intent(out) :: cellIdx + real(defReal), dimension(3), intent(in) :: r + real(defReal), dimension(3), intent(in) :: u + integer(shortInt) :: i, foundID, cellsFound + character(100), parameter :: Here = 'findCellOverlap (cellUniverse_class.f90)' + + cellsFound = 0 + + ! Search all cells + do i = 1, size(self % cells) + localID = i + if (self % cells(localID) % ptr % inside(r, u)) then + foundID = localID + cellIdx = self % cells(localID) % idx + cellsFound = cellsFound + 1 + !$omp atomic + self % cells(localID) % visits = self % cells(localID) % visits + 1 + + end if + end do + + ! If not found return undefined cell + if (cellsFound == 0) then + localID = i + cellIdx = 0 + ! If more than one found, return overlap cell + elseif (cellsFound > 1) then + localID = i + 1 + cellIdx = 0 + else + localID = foundID + end if + + end subroutine findCellOverlap + !! !! Find local cell ID given a cell and its neighbour list !! @@ -272,7 +342,7 @@ end subroutine findCellNeighb !! See universe_inter for details. !! !! Errors: - !! fatalError if in UNDEFINED cell + !! fatalError if in UNDEFINED cell or OVERLAP cell !! subroutine distance(self, d, surfIdx, coords) class(cellUniverse), intent(inout) :: self @@ -284,8 +354,10 @@ subroutine distance(self, d, surfIdx, coords) localID = coords % localID - if (localID > size(self % cells)) then + if (localID == size(self % cells) + 1) then call fatalError(Here, 'Particle is in undefined local cell. Local ID: '//numToChar(localID)) + elseif (localID == size(self % cells) + 2) then + call fatalError(Here, 'Particle is in an overlapping local cell. Local ID: '//numToChar(localID)) end if ! Calculate distance @@ -317,14 +389,16 @@ subroutine cross(self, coords, surfIdx) ! Find cell ! First perform a neighbour search - call self % findCellNeighb(coords % localID, & - coords % cellIdx, & - coords % r, & - coords % dir, & - local0, & - foundNeighb) - - if (foundNeighb) return + if (.not. self % checkOverlap) then + call self % findCellNeighb(coords % localID, & + coords % cellIdx, & + coords % r, & + coords % dir, & + local0, & + foundNeighb) + + if (foundNeighb) return + end if ! If that failed, perform an exhaustive search and add the ! new cell to the neighbour list @@ -337,8 +411,10 @@ subroutine cross(self, coords, surfIdx) if (coords % cellIdx < 1) return ! Add each cell to the other's neighbour list - call self % cells(local0) % neighb % add(coords % localID) - call self % cells(coords % localID) % neighb % add(local0) + if (.not. self % checkOverlap) then + call self % cells(local0) % neighb % add(coords % localID) + call self % cells(coords % localID) % neighb % add(local0) + end if end subroutine cross diff --git a/Geometry/coord_class.f90 b/Geometry/coord_class.f90 index d7900d9a7..b578254b4 100644 --- a/Geometry/coord_class.f90 +++ b/Geometry/coord_class.f90 @@ -147,7 +147,7 @@ subroutine display_coord(self) print *, "R: ", self % r print *, "U: ", self % dir print *, "UniIdx: ", numToChar(self % uniIDx), " LocalID: ", numToChar(self % localID), & - "UniRootId", numToChar(self % uniRootID) + " UniRootId: ", numToChar(self % uniRootID) end subroutine display_coord diff --git a/Geometry/geomGraph_class.f90 b/Geometry/geomGraph_class.f90 index f722b490f..d9cce614e 100644 --- a/Geometry/geomGraph_class.f90 +++ b/Geometry/geomGraph_class.f90 @@ -54,7 +54,7 @@ module geomGraph_class !! !! Interface: !! init -> Build fron uniFills and dictionary definition - !! getFill -> Get filling invormation at location given by uniRootIr & localID + !! getFill -> Get filling information at location given by uniRootIr & localID !! kill -> Return to uninitialised state !! type, public :: geomGraph diff --git a/Geometry/geometryStd_class.f90 b/Geometry/geometryStd_class.f90 index 334943014..cf7957f7f 100644 --- a/Geometry/geometryStd_class.f90 +++ b/Geometry/geometryStd_class.f90 @@ -409,8 +409,13 @@ function activeMats(self) result(matList) N = N - 1 lastIdx = self % geom % graph % usedMats(N) end if - ! Check if the last entry of the list is an undefined material + ! Check if the last entry of the list is an actual material or an undefined material if (lastIdx == UNDEF_MAT) then + N = N - 1 + lastIdx = self % geom % graph % usedMats(N) + end if + ! Check if the last entry of the list is an actual material or an overlap material + if (lastIdx == OVERLAP_MAT) then matList = self % geom % graph % usedMats(1:N-1) else matList = self % geom % graph % usedMats(1:N) @@ -445,6 +450,7 @@ subroutine diveToMat(self, coords, start) ! Find cell fill rootId = coords % lvl(i) % uniRootID localID = coords % lvl(i) % localID + call self % geom % graph % getFill(fill, id, rootID, localID) if (fill >= 0) then ! Found material cell diff --git a/NuclearData/materialMenu_mod.f90 b/NuclearData/materialMenu_mod.f90 index 8714db834..3231ab5d1 100644 --- a/NuclearData/materialMenu_mod.f90 +++ b/NuclearData/materialMenu_mod.f90 @@ -22,7 +22,7 @@ module materialMenu_mod use numPrecision - use universalVariables, only : NOT_FOUND, VOID_MAT, OUTSIDE_MAT, UNDEF_MAT + use universalVariables, only : NOT_FOUND, VOID_MAT, OUTSIDE_MAT, UNDEF_MAT, OVERLAP_MAT use genericProcedures, only : fatalError, charToInt, numToChar use colours_func, only : rgb24bit use intMap_class, only : intMap @@ -131,6 +131,7 @@ module materialMenu_mod integer(shortInt), parameter :: COL_OUTSIDE = int(z'ffffff', shortInt) integer(shortInt), parameter :: COL_VOID = int(z'000000', shortInt) integer(shortInt), parameter :: COL_UNDEF = int(z'00ff00', shortInt) + integer(shortInt), parameter :: COL_OVERLAP = int(z'ff0000', shortInt) !! MODULE COMPONENTS @@ -183,11 +184,14 @@ subroutine init(dict) call nameMap % add(temp, VOID_MAT) temp = 'outside' call nameMap % add(temp, OUTSIDE_MAT) + temp = 'overlap' + call nameMap % add(temp, OVERLAP_MAT) !! Load colours for the special materials call colourMap % add(VOID_MAT, COL_VOID) call colourMap % add(OUTSIDE_MAT, COL_OUTSIDE) call colourMap % add(UNDEF_MAT, COL_UNDEF) + call colourMap % add(OVERLAP_MAT, COL_OVERLAP) end subroutine init diff --git a/ParticleObjects/Source/fissionSource_class.f90 b/ParticleObjects/Source/fissionSource_class.f90 index bf3176c54..0efc8be8a 100644 --- a/ParticleObjects/Source/fissionSource_class.f90 +++ b/ParticleObjects/Source/fissionSource_class.f90 @@ -2,7 +2,7 @@ module fissionSource_class use numPrecision use endfConstants - use universalVariables, only : OUTSIDE_MAT, VOID_MAT + use universalVariables, only : OUTSIDE_MAT, VOID_MAT, UNDEF_MAT, OVERLAP_MAT use genericProcedures, only : rotateVector, numToChar use errors_mod, only : fatalError use dictionary_class, only : dictionary @@ -188,6 +188,15 @@ function sampleParticle(self, rand) result(p) ! Reject if there is no material if (matIdx == VOID_MAT .or. matIdx == OUTSIDE_MAT) cycle rejection + ! Terminate if there is an error in the geometry + if (matIdx == UNDEF_MAT) then + print *, r + call fatalError(Here, 'Particle position was sampled in an undefined material') + elseif (matIdx == OVERLAP_MAT) then + print *, r + call fatalError(Here, 'Particle position was sampled in an overlapping cell region') + end if + mat => neutronMaterial_CptrCast(nucData % getMaterial(matIdx)) if (.not.associated(mat)) call fatalError(Here, "Nuclear data did not return neutron material.") diff --git a/PhysicsPackages/rayVolPhysicsPackage_class.f90 b/PhysicsPackages/rayVolPhysicsPackage_class.f90 index 26c7560d8..4a92298ec 100644 --- a/PhysicsPackages/rayVolPhysicsPackage_class.f90 +++ b/PhysicsPackages/rayVolPhysicsPackage_class.f90 @@ -40,7 +40,7 @@ module rayVolPhysicsPackage_class !! !! Rays travel by a random, exponentially distributed distance with a user-defined mean free !! path. After each segment, the ray scatters isotropically. At each scattering event - !! ray mat be terminated with provided probability `abs_prob`. Ray will also be killed + !! ray may be terminated with provided probability `abs_prob`. Ray will also be killed !! if it has reached the OUTSIDE material. !! !! Simulation can be performed in the ROBUST mode, which is intended to be used for debugging. @@ -59,7 +59,7 @@ module rayVolPhysicsPackage_class !! pop 2000; // Number of rays per cycle !! cycles 100; // Number of cycles !! robust 1; // 1 for true; 0 for false; Enable robust mode - !! cache 1; // 1 for treu; 0 for false; Enable distance caching + !! cache 1; // 1 for true; 0 for false; Enable distance caching !! #seed 86868;# // Optional RNG seed !! geometry {} !! nuclearData {} @@ -270,7 +270,7 @@ subroutine cycles(self, rand) i = i + 1 if (i > 1000) then - call fatalError(Here, 'Infinate loop when searching ray start in the geometry.') + call fatalError(Here, 'Infinite loop when searching ray start in the geometry.') end if end do rejection diff --git a/SharedModules/universalVariables.f90 b/SharedModules/universalVariables.f90 index fdb8a2d57..6565933c4 100644 --- a/SharedModules/universalVariables.f90 +++ b/SharedModules/universalVariables.f90 @@ -22,7 +22,7 @@ module universalVariables surface_tol = 1.0e-12_defReal, & ! Tol. on closeness to surface SURF_TOL = 1.0E-12_defReal, & INF = 2.0_defReal**63, & - NUDGE = 1.0e-8_defReal ! Distance to poke neutrons across boundaries for surface tracking + NUDGE = 1.0e-9_defReal ! Distance to poke neutrons across boundaries for surface tracking ! Flags for different possible events in movement in geometry integer(shortINt), parameter, public :: COLL_EV = 1, & @@ -40,15 +40,16 @@ module universalVariables ! NOTE: All material indices MUST BE NON-NEGATIVE! integer(shortInt), parameter :: OUTSIDE_MAT = 0 ,& VOID_MAT = huge(OUTSIDE_MAT), & - UNDEF_MAT = VOID_MAT - 1 + UNDEF_MAT = VOID_MAT - 1, & + OVERLAP_MAT = VOID_MAT - 2 ! Define integers for each fill type that a cell may have integer(shortInt), parameter :: OUTSIDE_FILL = 0, & materialFill = 1, & universeFill = 2, & - latticeFill = 3 - + latticeFill = 3 + ! Define integers for boundary condition types integer(shortInt), parameter :: VACUUM_BC = 0, & REFLECTIVE_BC = 1, & diff --git a/Tallies/TallyClerks/collisionClerk_class.f90 b/Tallies/TallyClerks/collisionClerk_class.f90 index 67cec49af..1d68e2992 100644 --- a/Tallies/TallyClerks/collisionClerk_class.f90 +++ b/Tallies/TallyClerks/collisionClerk_class.f90 @@ -36,6 +36,7 @@ module collisionClerk_class !! map -> Space to store tally Map !! response -> Array of responses !! width -> Number of responses (# of result bins for each map position) + !! handleVirtual -> score on virtual collisions (due to TMS or delta tracking) !! !! Interface !! tallyClerk Interface @@ -44,6 +45,7 @@ module collisionClerk_class !! !! myCollisionClerk { !! type collisionClerk; + !! # handleVirtual 1; # !! # filter { } # !! # map { } # !! response (resName1 #resName2 ... #) diff --git a/TransportOperator/transportOperatorDT_class.f90 b/TransportOperator/transportOperatorDT_class.f90 index 568e161ec..5771ebf23 100644 --- a/TransportOperator/transportOperatorDT_class.f90 +++ b/TransportOperator/transportOperatorDT_class.f90 @@ -56,7 +56,7 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) ! Get majorant XS inverse: 1/Sigma_majorant majorant_inv = ONE / self % xsData % getTrackingXS(p, p % matIdx(), MAJORANT_XS) - ! Should never happen! Prevents Inf distances + ! Should never happen! Prevents Inf distances if (abs(majorant_inv) > huge(majorant_inv)) call fatalError(Here, "Majorant is 0") DTLoop:do @@ -64,25 +64,31 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) ! Move partice in the geometry call self % geom % teleport(p % coords, distance) - - ! If particle has leaked, exit - if (p % matIdx() == OUTSIDE_FILL) then - p % fate = LEAK_FATE - p % isDead = .true. - return - end if - - ! Check for void - if (p % matIdx() == VOID_MAT) then - call tally % reportInColl(p, .true.) - cycle DTLoop - end if - - ! Give error if the particle somehow ended in an undefined material - if (p % matIdx() == UNDEF_MAT) then - print *, p % rGlobal() - call fatalError(Here, "Particle is in undefined material") - end if + + select case(p % matIdx()) + + ! If particle has leaked exit + case(OUTSIDE_FILL) + p % fate = LEAK_FATE + p % isDead = .true. + return + + ! Check for void + case(VOID_MAT) + call tally % reportInColl(p, .true.) + cycle DTLoop + + ! Give error if the particle somehow ended in an undefined material + case(UNDEF_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in undefined material") + case(OVERLAP_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in overlapping cells") + + case default + + end select ! Obtain the local cross-section sigmaT = self % xsData % getTrackMatXS(p, p % matIdx()) diff --git a/TransportOperator/transportOperatorHT_class.f90 b/TransportOperator/transportOperatorHT_class.f90 index e714cf30e..8429cd9a9 100644 --- a/TransportOperator/transportOperatorHT_class.f90 +++ b/TransportOperator/transportOperatorHT_class.f90 @@ -100,24 +100,30 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) ! Move particle in the geometry call self % geom % teleport(p % coords, distance) - ! If particle has leaked exit - if (p % matIdx() == OUTSIDE_FILL) then - p % fate = LEAK_FATE - p % isDead = .true. - return - end if + select case(p % matIdx()) - ! Check for void - if (p % matIdx() == VOID_MAT) then - call tally % reportInColl(p, .true.) - cycle DTLoop - end if + ! If particle has leaked exit + case(OUTSIDE_FILL) + p % fate = LEAK_FATE + p % isDead = .true. + return - ! Give error if the particle somehow ended in an undefined material - if (p % matIdx() == UNDEF_MAT) then - print *, p % rGlobal() - call fatalError(Here, "Particle is in undefined material") - end if + ! Check for void + case(VOID_MAT) + call tally % reportInColl(p, .true.) + cycle DTLoop + + ! Give error if the particle somehow ended in an undefined material + case(UNDEF_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in undefined material") + case(OVERLAP_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in overlapping cells") + + case default + + end select ! Obtain the local cross-section sigmaT = self % xsData % getTrackMatXS(p, p % matIdx()) @@ -150,19 +156,28 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) character(100), parameter :: Here = 'surfaceTracking (transportOperatorHT_class.f90)' STLoop: do + + ! Obtain the local cross-section, depending on the material + select case(p % matIdx()) + case(VOID_MAT) + dist = INFINITY - ! Obtain the local cross-section - if (p % matIdx() == VOID_MAT) then - dist = INFINITY + case(UNDEF_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in undefined material") + + case(OVERLAP_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in overlapping cells") - else - sigmaT = self % xsData % getTrackingXS(p, p % matIdx(), MATERIAL_XS) - dist = -log( p % pRNG % get()) / sigmaT + case default + sigmaT = self % xsData % getTrackingXS(p, p % matIdx(), MATERIAL_XS) + dist = -log( p % pRNG % get()) / sigmaT - ! Should never happen! Catches NaN distances - if (dist /= dist) call fatalError(Here, "Distance is NaN") + ! Should never happen! Catches NaN distances + if (dist /= dist) call fatalError(Here, "Distance is NaN") - end if + end select ! Save state before movement call p % savePrePath() @@ -172,18 +187,25 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) ! Send tally report for a path moved call tally % reportPath(p, dist) - - ! Kill particle if it has leaked - if (p % matIdx() == OUTSIDE_FILL) then - p % isDead = .true. - p % fate = LEAK_FATE - end if - - ! Give error if the particle somehow ended in an undefined material - if (p % matIdx() == UNDEF_MAT) then - print *, p % rGlobal() - call fatalError(Here, "Particle is in undefined material") - end if + + select case(p % matIdx()) + + ! Kill particle if it has leaked + case(OUTSIDE_FILL) + p % isDead = .true. + p % fate = LEAK_FATE + + ! Give error if the particle somehow ended in an undefined material + case(UNDEF_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in undefined material") + case(OVERLAP_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in overlapping cells") + + case default + + end select ! Return if particle stoped at collision (not cell boundary) if (event == COLL_EV .or. p % isDead) exit STLoop diff --git a/TransportOperator/transportOperatorST_class.f90 b/TransportOperator/transportOperatorST_class.f90 index 1ef7a138b..68cb3bf6d 100644 --- a/TransportOperator/transportOperatorST_class.f90 +++ b/TransportOperator/transportOperatorST_class.f90 @@ -58,18 +58,27 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) STLoop: do - ! Obtain the local cross-section - if (p % matIdx() == VOID_MAT) then - dist = INFINITY + ! Obtain the local cross-section, depending on the material + select case(p % matIdx()) + case(VOID_MAT) + dist = INFINITY - else - sigmaT = self % xsData % getTrackingXS(p, p % matIdx(), MATERIAL_XS) - dist = -log( p % pRNG % get()) / sigmaT + case(UNDEF_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in undefined material") + + case(OVERLAP_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in overlapping cells") - ! Should never happen! Catches NaN distances - if (dist /= dist) call fatalError(Here, "Distance is NaN") + case default + sigmaT = self % xsData % getTrackingXS(p, p % matIdx(), MATERIAL_XS) + dist = -log( p % pRNG % get()) / sigmaT - end if + ! Should never happen! Catches NaN distances + if (dist /= dist) call fatalError(Here, "Distance is NaN") + + end select ! Save state before movement call p % savePrePath() @@ -86,17 +95,24 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) ! Send tally report for a path moved call tally % reportPath(p, dist) - ! Kill particle if it has leaked - if (p % matIdx() == OUTSIDE_FILL) then - p % isDead = .true. - p % fate = LEAK_FATE - end if - - ! Give error if the particle somehow ended in an undefined material - if (p % matIdx() == UNDEF_MAT) then - print *, p % rGlobal() - call fatalError(Here, "Particle is in undefined material") - end if + select case(p % matIdx()) + + ! Kill particle if it has leaked + case(OUTSIDE_FILL) + p % isDead = .true. + p % fate = LEAK_FATE + + ! Give error if the particle somehow ended in an undefined material + case(UNDEF_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in undefined material") + case(OVERLAP_MAT) + print *, p % rGlobal() + call fatalError(Here, "Particle is in overlapping cells") + + case default + + end select ! Return if particle stoped at collision (not cell boundary) if (event == COLL_EV .or. p % isDead) exit STLoop diff --git a/Visualisation/visualiser_class.f90 b/Visualisation/visualiser_class.f90 index a0cdcd768..44fa1f280 100644 --- a/Visualisation/visualiser_class.f90 +++ b/Visualisation/visualiser_class.f90 @@ -352,6 +352,7 @@ end subroutine kill !! OUTSIDE_MAT -> white (#ffffff) !! VOID_MAT -> black (#000000) !! UNDEF_MAT -> green (#00ff00) + !! OVERLAP_MAT -> red (#ff0000) !! !! Args: !! matIdx [in] -> Value of the material index diff --git a/docs/User Manual.rst b/docs/User Manual.rst index 56cc5eb9f..52d42acd6 100644 --- a/docs/User Manual.rst +++ b/docs/User Manual.rst @@ -616,13 +616,17 @@ Similarly to the surfaces and cells, the **universes** in the geometry can be de Several ``universeTypes`` are possible: * cellUniverse, composed of the union of different cells. Note that overlaps are - forbidden, but there is no check to find overlaps + forbidden, but there is no check to find overlaps by default. This can be enabled + at the cost of slower particle transport. - cells: array containing the ``cellIds`` as used in the cell definition - origin (*optional*, default = (0.0 0.0 0.0)): (x y z) array with the origin of the universe. [cm] - rotation (*optional*, default = (0.0 0.0 0.0)): (x y z) array with the rotation angles in degrees applied to the universe. [°] + - checkOverlap (*optional*, default = 0): enables checking for overlaps between cells, useful + for debugging and plotting. However, this slows down particle transport by making exhaustive + cell searches mandatory. .. note:: When creating a ``cellUniverse`` a user needs to take care to avoid leaving @@ -632,7 +636,7 @@ Several ``universeTypes`` are possible: Example: :: - uni3 { id 3; type cellUniverse; cells (1 2 55); origin (1.0 0.0 0.0); rotation (0.0 90.0 180.0); } + uni3 {id 3; type cellUniverse; cells (1 7); origin (1.0 0.0 0.0); rotation (0.0 90.0 180.0); checkOverlap 0;} * pinUniverse, composed of infinite co-centred cylinders @@ -740,6 +744,9 @@ Example: :: SCONE can be run to visualise geometry without actually doing transport, by including ``--plot`` when running the application. In this case the visualiser has to be included in the file. + Certain special materials use particular colours during plotting. Void regions + are plotted in black. Regions outside the geometry are plotted in white. + Undefined regions are plotted in light green. Overlap regions are plotted in red. Nuclear Data ------------ From 8577994fb8fa2496ad9ec127c3c9ba71e1d7af97 Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Tue, 8 Apr 2025 19:13:22 +0100 Subject: [PATCH 06/20] Fixes to BEAVRS to remove overlaps --- InputFiles/Benchmarks/BEAVRS/BEAVRS2D | 28 +++++++++++++++++-------- InputFiles/Benchmarks/BEAVRS/BEAVRS_ARO | 27 +++++++++++++++--------- InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP | 24 ++++++++++++++------- 3 files changed, 52 insertions(+), 27 deletions(-) diff --git a/InputFiles/Benchmarks/BEAVRS/BEAVRS2D b/InputFiles/Benchmarks/BEAVRS/BEAVRS2D index 899a59c71..47e9ec515 100644 --- a/InputFiles/Benchmarks/BEAVRS/BEAVRS2D +++ b/InputFiles/Benchmarks/BEAVRS/BEAVRS2D @@ -123,15 +123,25 @@ geometry { NS2{ type simpleCell; id 11; surfaces (-4 5 8 -9); filltype mat; material SS304;} NS3{ type simpleCell; id 12; surfaces (-4 5 -10 11); filltype mat; material SS304;} NS4{ type simpleCell; id 13; surfaces (-4 5 10 -11); filltype mat; material SS304;} - outerWaterSeg1 {type simpleCell; id 14; surfaces (-4 5 ); filltype mat; material Water;} - - outerWater2 {type simpleCell; id 15; surfaces (-5 6 ); filltype mat; material Water;} - - coreBarrel { type simpleCell; id 16; surfaces (-6 7); filltype mat; material SS304;} - + + // Water in the radial sliver between neutron shields and core + waterSliver1 {type simpleCell; id 14; surfaces (6 -5 -8 9); filltype mat; material Water;} + waterSliver2 {type simpleCell; id 15; surfaces (6 -5 8 -9); filltype mat; material Water;} + waterSliver3 {type simpleCell; id 16; surfaces (6 -5 -10 11); filltype mat; material Water;} + waterSliver4 {type simpleCell; id 17; surfaces (6 -5 10 -11); filltype mat; material Water;} + + // Water in the arc between neutron shields + outerWaterSeg1 {type simpleCell; id 18; surfaces (-4 6 8 11); filltype mat; material Water;} + outerWaterSeg2 {type simpleCell; id 19; surfaces (-4 6 -8 -11); filltype mat; material Water;} + outerWaterSeg3 {type simpleCell; id 20; surfaces (-4 6 -9 10); filltype mat; material Water;} + outerWaterSeg4 {type simpleCell; id 21; surfaces (-4 6 9 -10); filltype mat; material Water;} + + // Outer core + coreBarrel { type simpleCell; id 22; surfaces (-6 7); filltype mat; material SS304;} + ! Choose whether to include a grid by commenting/uncommenting - !coreWithGrid {type simpleCell; id 17; surfaces (-5); filltype uni; universe 9999;} - coreWithoutGrid {type simpleCell; id 17; surfaces (-5); filltype uni; universe 10000;} + !coreWithGrid {type simpleCell; id 23; surfaces (-7); filltype uni; universe 9999;} + coreWithoutGrid {type simpleCell; id 23; surfaces (-7); filltype uni; universe 10000;} grid1 {type simpleCell; id 124; surfaces (-90); filltype uni; universe 24;} @@ -1239,7 +1249,7 @@ geometry { coreAndStructures { id 8888; type cellUniverse; - cells (7 8 9 10 11 12 13 14 15 16 17);} + cells (7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23);} diff --git a/InputFiles/Benchmarks/BEAVRS/BEAVRS_ARO b/InputFiles/Benchmarks/BEAVRS/BEAVRS_ARO index dd3ed25c5..a079eafbc 100644 --- a/InputFiles/Benchmarks/BEAVRS/BEAVRS_ARO +++ b/InputFiles/Benchmarks/BEAVRS/BEAVRS_ARO @@ -6,7 +6,7 @@ !! type eigenPhysicsPackage; -pop 1000000; +pop 5000000; active 50; inactive 150; XSdata ce; @@ -16,7 +16,7 @@ collisionOperator { neutronCE {type neutronCEstd;}} transportOperator { !type transportOperatorDT; - type transportOperatorHT; cache 1; + type transportOperatorST; cache 1; } inactiveTally { @@ -225,15 +225,22 @@ geometry { NS3 { type simpleCell; id 12; surfaces (-4 5 -10 11); filltype mat; material SS304;} NS4 { type simpleCell; id 13; surfaces (-4 5 10 -11); filltype mat; material SS304;} + // Water in the radial sliver between neutron shields and core + waterSliver1 {type simpleCell; id 14; surfaces (6 -5 -8 9); filltype mat; material Water;} + waterSliver2 {type simpleCell; id 15; surfaces (6 -5 8 -9); filltype mat; material Water;} + waterSliver3 {type simpleCell; id 16; surfaces (6 -5 -10 11); filltype mat; material Water;} + waterSliver4 {type simpleCell; id 17; surfaces (6 -5 10 -11); filltype mat; material Water;} + // Water in the arc between neutron shields - outerWaterSeg1 {type simpleCell; id 14; surfaces (-4 5 ); filltype mat; material Water;} - outerWater2 {type simpleCell; id 15; surfaces (-5 6 ); filltype mat; material Water;} + outerWaterSeg1 {type simpleCell; id 18; surfaces (-4 6 8 11); filltype mat; material Water;} + outerWaterSeg2 {type simpleCell; id 19; surfaces (-4 6 -8 -11); filltype mat; material Water;} + outerWaterSeg3 {type simpleCell; id 20; surfaces (-4 6 -9 10); filltype mat; material Water;} + outerWaterSeg4 {type simpleCell; id 21; surfaces (-4 6 9 -10); filltype mat; material Water;} // Outer core - coreBarrel { type simpleCell; id 16; surfaces (-6 7); filltype mat; material SS304;} - core {type simpleCell; id 17; surfaces (-5); filltype uni; universe 9999;} - - + coreBarrel { type simpleCell; id 22; surfaces (-6 7); filltype mat; material SS304;} + core {type simpleCell; id 23; surfaces (-7); filltype uni; universe 9999;} + // Gridded pins // THICK GRID @@ -1918,7 +1925,7 @@ geometry { coreAndStructures { id 8888; type cellUniverse; - cells (7 8 9 10 11 12 13 14 15 16 17);} + cells (7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23);} @@ -1931,7 +1938,7 @@ viz { type bmp; output imgZ; what material; - centre (0.0 0.0 232.0); + !centre (0.0 0.0 232.0); //width (400.0 400.0); axis z; res (4000 4000); diff --git a/InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP b/InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP index 5a740ce28..e50bad87a 100644 --- a/InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP +++ b/InputFiles/Benchmarks/BEAVRS/BEAVRS_HZP @@ -232,13 +232,21 @@ geometry { NS3 { type simpleCell; id 12; surfaces (-4 5 -10 11); filltype mat; material SS304;} NS4 { type simpleCell; id 13; surfaces (-4 5 10 -11); filltype mat; material SS304;} + // Water in the radial sliver between neutron shields and core + waterSliver1 {type simpleCell; id 14; surfaces (6 -5 -8 9); filltype mat; material Water;} + waterSliver2 {type simpleCell; id 15; surfaces (6 -5 8 -9); filltype mat; material Water;} + waterSliver3 {type simpleCell; id 16; surfaces (6 -5 -10 11); filltype mat; material Water;} + waterSliver4 {type simpleCell; id 17; surfaces (6 -5 10 -11); filltype mat; material Water;} + // Water in the arc between neutron shields - outerWaterSeg1 {type simpleCell; id 14; surfaces (-4 5 ); filltype mat; material Water;} - outerWater2 {type simpleCell; id 15; surfaces (-5 6 ); filltype mat; material Water;} + outerWaterSeg1 {type simpleCell; id 18; surfaces (-4 6 8 11); filltype mat; material Water;} + outerWaterSeg2 {type simpleCell; id 19; surfaces (-4 6 -8 -11); filltype mat; material Water;} + outerWaterSeg3 {type simpleCell; id 20; surfaces (-4 6 -9 10); filltype mat; material Water;} + outerWaterSeg4 {type simpleCell; id 21; surfaces (-4 6 9 -10); filltype mat; material Water;} // Outer core - coreBarrel { type simpleCell; id 16; surfaces (-6 7); filltype mat; material SS304;} - core {type simpleCell; id 17; surfaces (-5); filltype uni; universe 9999;} + coreBarrel { type simpleCell; id 22; surfaces (-6 7); filltype mat; material SS304;} + core {type simpleCell; id 23; surfaces (-7); filltype uni; universe 9999;} // Gridded pins @@ -2057,7 +2065,7 @@ geometry { coreAndStructures { id 8888; type cellUniverse; - cells (7 8 9 10 11 12 13 14 15 16 17);} + cells (7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23);} @@ -2070,10 +2078,10 @@ viz { type bmp; output imgXY; what material; - centre (-17.13 240.69 167.74); - width (50 50); + centre (0.0 0.0 232.0); + !width (50 50); axis z; - res (1000 1000); + res (2000 2000); } bmpYZ { type bmp; From 13e44385faa8141d1cc628f215bb83335bf89c57 Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 16:58:39 +0100 Subject: [PATCH 07/20] Update Tallies/TallyClerks/collisionClerk_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- Tallies/TallyClerks/collisionClerk_class.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tallies/TallyClerks/collisionClerk_class.f90 b/Tallies/TallyClerks/collisionClerk_class.f90 index 1d68e2992..3416c248e 100644 --- a/Tallies/TallyClerks/collisionClerk_class.f90 +++ b/Tallies/TallyClerks/collisionClerk_class.f90 @@ -45,7 +45,7 @@ module collisionClerk_class !! !! myCollisionClerk { !! type collisionClerk; - !! # handleVirtual 1; # + !! # handleVirtual 0; # default is 1 !! # filter { } # !! # map { } # !! response (resName1 #resName2 ... #) From 11e24de29fe8a48393e40ce91f959a8e249e44f3 Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 17:04:56 +0100 Subject: [PATCH 08/20] Update TransportOperator/transportOperatorDT_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- TransportOperator/transportOperatorDT_class.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/TransportOperator/transportOperatorDT_class.f90 b/TransportOperator/transportOperatorDT_class.f90 index 5771ebf23..11808f729 100644 --- a/TransportOperator/transportOperatorDT_class.f90 +++ b/TransportOperator/transportOperatorDT_class.f90 @@ -87,6 +87,7 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) call fatalError(Here, "Particle is in overlapping cells") case default + ! All is well end select From 4144f52909de6e6171e761a84832342fc0f33458 Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 17:05:23 +0100 Subject: [PATCH 09/20] Update TransportOperator/transportOperatorDT_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- TransportOperator/transportOperatorDT_class.f90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TransportOperator/transportOperatorDT_class.f90 b/TransportOperator/transportOperatorDT_class.f90 index 11808f729..18e7e06ff 100644 --- a/TransportOperator/transportOperatorDT_class.f90 +++ b/TransportOperator/transportOperatorDT_class.f90 @@ -82,6 +82,8 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) case(UNDEF_MAT) print *, p % rGlobal() call fatalError(Here, "Particle is in undefined material") + + ! Give error if the particle is in a region with overlapping cells case(OVERLAP_MAT) print *, p % rGlobal() call fatalError(Here, "Particle is in overlapping cells") From 615f1ac371096af9e7fe871dbbfb2f9455dc92ee Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 17:29:54 +0100 Subject: [PATCH 10/20] Update Geometry/Universes/cellUniverse_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- Geometry/Universes/cellUniverse_class.f90 | 44 +++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Geometry/Universes/cellUniverse_class.f90 b/Geometry/Universes/cellUniverse_class.f90 index 2dfa0f4f5..ad086fe31 100644 --- a/Geometry/Universes/cellUniverse_class.f90 +++ b/Geometry/Universes/cellUniverse_class.f90 @@ -307,30 +307,30 @@ subroutine findCellNeighb(self, localID, cellIdx, r, u, initID, foundNeighb) associate(neighb => self % cells(initID) % neighb) - ! Search neighbours if starting cell is given - if (neighb % getSize() > 0) then - do i = 1, neighb % getSize() - - localID = neighb % get(i) - - if (self % cells(localID) % ptr % inside(r, u)) then - cellIdx = self % cells(localID) % idx - foundNeighb = .true. - !$omp atomic - self % cells(localID) % visits = self % cells(localID) % visits + 1 - if (mod(self % cells(localID) % visits, reorderFreq) == 0) then - !$omp critical - self % reordering = .true. - call self % reorderCells() - self % reordering = .false. - !$omp end critical - end if - return + ! Search neighbours if starting cell is given + if (neighb % getSize() > 0) then + do i = 1, neighb % getSize() + + localID = neighb % get(i) + + if (self % cells(localID) % ptr % inside(r, u)) then + cellIdx = self % cells(localID) % idx + foundNeighb = .true. + !$omp atomic + self % cells(localID) % visits = self % cells(localID) % visits + 1 + if (mod(self % cells(localID) % visits, reorderFreq) == 0) then + !$omp critical + self % reordering = .true. + call self % reorderCells() + self % reordering = .false. + !$omp end critical + end if + return - end if + end if - end do - end if + end do + end if end associate From 2e44464a8051bfec276754860edc127da783fd52 Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 17:35:55 +0100 Subject: [PATCH 11/20] Update TransportOperator/transportOperatorDT_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- TransportOperator/transportOperatorDT_class.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TransportOperator/transportOperatorDT_class.f90 b/TransportOperator/transportOperatorDT_class.f90 index 18e7e06ff..883af4f34 100644 --- a/TransportOperator/transportOperatorDT_class.f90 +++ b/TransportOperator/transportOperatorDT_class.f90 @@ -80,7 +80,7 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) ! Give error if the particle somehow ended in an undefined material case(UNDEF_MAT) - print *, p % rGlobal() + print*, 'Particle location: ', p % rGlobal() call fatalError(Here, "Particle is in undefined material") ! Give error if the particle is in a region with overlapping cells From e121a3579b6efa3c9de1cac7457e5e778736d1dc Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 17:36:21 +0100 Subject: [PATCH 12/20] Update TransportOperator/transportOperatorDT_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- TransportOperator/transportOperatorDT_class.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TransportOperator/transportOperatorDT_class.f90 b/TransportOperator/transportOperatorDT_class.f90 index 883af4f34..f07b4808e 100644 --- a/TransportOperator/transportOperatorDT_class.f90 +++ b/TransportOperator/transportOperatorDT_class.f90 @@ -85,7 +85,7 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) ! Give error if the particle is in a region with overlapping cells case(OVERLAP_MAT) - print *, p % rGlobal() + print*, 'Particle location: ', p % rGlobal() call fatalError(Here, "Particle is in overlapping cells") case default From abf5edcdd62d920988737ebea497ecf5fb87d01b Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 17:36:43 +0100 Subject: [PATCH 13/20] Update TransportOperator/transportOperatorHT_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- TransportOperator/transportOperatorHT_class.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/TransportOperator/transportOperatorHT_class.f90 b/TransportOperator/transportOperatorHT_class.f90 index 8429cd9a9..965faff54 100644 --- a/TransportOperator/transportOperatorHT_class.f90 +++ b/TransportOperator/transportOperatorHT_class.f90 @@ -108,6 +108,7 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) p % isDead = .true. return + ! Check for void case(VOID_MAT) call tally % reportInColl(p, .true.) From 3bd0741354f4badbea48b976b2181f9ce8159929 Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 17:37:48 +0100 Subject: [PATCH 14/20] Update TransportOperator/transportOperatorHT_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- TransportOperator/transportOperatorHT_class.f90 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/TransportOperator/transportOperatorHT_class.f90 b/TransportOperator/transportOperatorHT_class.f90 index 965faff54..ac4fa1bce 100644 --- a/TransportOperator/transportOperatorHT_class.f90 +++ b/TransportOperator/transportOperatorHT_class.f90 @@ -116,13 +116,16 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) ! Give error if the particle somehow ended in an undefined material case(UNDEF_MAT) - print *, p % rGlobal() + print*, 'Particle location: ', p % rGlobal() call fatalError(Here, "Particle is in undefined material") + + ! Give error if the particle is in a region with overlapping cells case(OVERLAP_MAT) - print *, p % rGlobal() + print*, 'Particle location: ', p % rGlobal() call fatalError(Here, "Particle is in overlapping cells") case default + ! All is well end select From 8f71c1d6fdc18f7c00aa3547249811324eb8275e Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 17:38:27 +0100 Subject: [PATCH 15/20] Update TransportOperator/transportOperatorHT_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- TransportOperator/transportOperatorHT_class.f90 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/TransportOperator/transportOperatorHT_class.f90 b/TransportOperator/transportOperatorHT_class.f90 index ac4fa1bce..edeeadb1b 100644 --- a/TransportOperator/transportOperatorHT_class.f90 +++ b/TransportOperator/transportOperatorHT_class.f90 @@ -201,13 +201,16 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) ! Give error if the particle somehow ended in an undefined material case(UNDEF_MAT) - print *, p % rGlobal() + print*, 'Particle location: ', p % rGlobal() call fatalError(Here, "Particle is in undefined material") + + ! Give error if the particle is in a region with overlapping cells case(OVERLAP_MAT) - print *, p % rGlobal() + print*, 'Particle location: ', p % rGlobal() call fatalError(Here, "Particle is in overlapping cells") case default + ! All is well end select From 09f25a99c92e9aeb8ac25f7114cd15c743f800b9 Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Sat, 26 Jul 2025 18:45:43 +0100 Subject: [PATCH 16/20] Addressing changes and robust matIdx check --- DataStructures/Tests/linkedList_test.f90 | 12 ------- .../Universes/Tests/cellUniverse_test.f90 | 3 +- Geometry/Universes/cellUniverse_class.f90 | 5 ++- .../ceNeutronData/ceNeutronDatabase_inter.f90 | 21 ++++++++++-- .../baseMgNeutronDatabase_class.f90 | 16 +++++++++ .../transportOperatorHT_class.f90 | 33 ++++++++---------- .../transportOperatorST_class.f90 | 34 ++++++++----------- 7 files changed, 66 insertions(+), 58 deletions(-) diff --git a/DataStructures/Tests/linkedList_test.f90 b/DataStructures/Tests/linkedList_test.f90 index c46fbeb63..d09c459d2 100644 --- a/DataStructures/Tests/linkedList_test.f90 +++ b/DataStructures/Tests/linkedList_test.f90 @@ -75,18 +75,6 @@ subroutine testUsage() @assertEqual(42, list % get(2)) @assertEqual(666, list % get(3)) - call list % kill() - - ! Build by elements - do i=1,7 - call list % add(2 * i) - end do - - ! Test getSize - @assertFalse(list % getSize() == 0) - @assertEqual(7, list % getSize()) - - end subroutine testUsage !! diff --git a/Geometry/Universes/Tests/cellUniverse_test.f90 b/Geometry/Universes/Tests/cellUniverse_test.f90 index 9d9e705fc..b0a351991 100644 --- a/Geometry/Universes/Tests/cellUniverse_test.f90 +++ b/Geometry/Universes/Tests/cellUniverse_test.f90 @@ -35,8 +35,7 @@ module cellUniverse_test character(*), parameter :: SURF2_DEF = & " surf1 { id 1; type sphere; origin (21.0 0.0 0.0); radius 4.5;}& - & surf2 { id 2; type sphere; origin (0.0 0.0 0.0); radius 24.1;}& - & surf3 { id 3; type sphere; origin (0.0 0.0 0.0); radius 28;}" + & surf2 { id 2; type sphere; origin (0.0 0.0 0.0); radius 24.1;}" character(*), parameter :: CELL2_DEF = & " cell1 {id 1; type simpleCell; surfaces (-1); filltype uni; universe 3;} & diff --git a/Geometry/Universes/cellUniverse_class.f90 b/Geometry/Universes/cellUniverse_class.f90 index 2dfa0f4f5..2d7d5840b 100644 --- a/Geometry/Universes/cellUniverse_class.f90 +++ b/Geometry/Universes/cellUniverse_class.f90 @@ -17,8 +17,9 @@ module cellUniverse_class implicit none private + ! Determines how frequently to reorder the cell list integer(longInt), public, parameter :: reorderFreq = 10_longInt**6 - + !! !! Local helper class to group cell data !! @@ -53,8 +54,6 @@ module cellUniverse_class !! Additionally, neighbour lists are built when the cross operation is invoked. These also !! accelerate cell searches. !! - !! Can optionally check for overlaps. - !! !! Sample Input Dictionary: !! uni { type cellUniverse; !! id 7; diff --git a/NuclearData/ceNeutronData/ceNeutronDatabase_inter.f90 b/NuclearData/ceNeutronData/ceNeutronDatabase_inter.f90 index da0f636f5..afff78c01 100644 --- a/NuclearData/ceNeutronData/ceNeutronDatabase_inter.f90 +++ b/NuclearData/ceNeutronData/ceNeutronDatabase_inter.f90 @@ -2,7 +2,7 @@ module ceNeutronDatabase_inter use numPrecision use universalVariables - use genericProcedures, only : fatalError + use genericProcedures, only : fatalError, numToChar use RNG_class, only : RNG use particle_class, only : particle, P_NEUTRON, printType use charMap_class, only : charMap @@ -13,6 +13,9 @@ module ceNeutronDatabase_inter use materialHandle_inter, only : materialHandle use reactionHandle_inter, only : reactionHandle use nuclearDatabase_inter, only : nuclearDatabase + + ! Material Menu + use materialMenu_mod, only : mm_nMat => nMat ! Cache use ceNeutronCache_mod, only : materialCache, majorantCache, trackingCache @@ -347,6 +350,13 @@ function getTrackMatXS(self, p, matIdx) result(xs) call fatalError(Here, 'Dynamic type of the partcle is not CE Neutron but:'//p % typeToChar()) end if + ! Check that matIdx exists + if (matIdx < 1 .or. matIdx > mm_nMat()) then + print *,'Particle location: ', p % rGlobal() + call fatalError(Here, 'Particle is in an undefined material with index: '& + //numToChar(matIdx)) + end if + ! Check Cache and update if needed if (materialCache(matIdx) % E_track /= p % E) call self % updateTrackMatXS(p % E, matIdx, p % pRNG) @@ -374,7 +384,14 @@ function getTotalMatXS(self, p, matIdx) result(xs) if (p % isMG .or. p % type /= P_NEUTRON) then call fatalError(Here, 'Dynamic type of the partcle is not CE Neutron but:'//p % typeToChar()) end if - + + ! Check that matIdx exists + if (matIdx < 1 .or. matIdx > mm_nMat()) then + print *,'Particle location: ', p % rGlobal() + call fatalError(Here, 'Particle is in an undefined material with index: '& + //numToChar(matIdx)) + end if + ! Check Cache and update if needed if (materialCache(matIdx) % E_tot /= p % E) call self % updateTotalMatXS(p % E, matIdx, p % pRNG) diff --git a/NuclearData/mgNeutronData/baseMgNeutron/baseMgNeutronDatabase_class.f90 b/NuclearData/mgNeutronData/baseMgNeutron/baseMgNeutronDatabase_class.f90 index 082783270..587a9ecbc 100644 --- a/NuclearData/mgNeutronData/baseMgNeutron/baseMgNeutronDatabase_class.f90 +++ b/NuclearData/mgNeutronData/baseMgNeutron/baseMgNeutronDatabase_class.f90 @@ -140,7 +140,15 @@ function getTrackMatXS(self, p, matIdx) result(xs) class(particle), intent(in) :: p integer(shortInt), intent(in) :: matIdx real(defReal) :: xs + character(100),parameter :: Here = 'getTrackMatXS (baseMgNeutronDatabase_class.f90)' + ! Check that matIdx exists + if (matIdx < 1 .or. matIdx > mm_nMat()) then + print *,'Particle location: ', p % rGlobal() + call fatalError(Here, 'Particle is in an undefined material with index: '& + //numToChar(matIdx)) + end if + xs = self % getTotalMatXS(p, matIdx) end function getTrackMatXS @@ -159,6 +167,14 @@ function getTotalMatXS(self, p, matIdx) result(xs) class(particle), intent(in) :: p integer(shortInt), intent(in) :: matIdx real(defReal) :: xs + character(100),parameter :: Here = 'getTotalMatXS (baseMgNeutronDatabase_class.f90)' + + ! Check that matIdx exists + if (matIdx < 1 .or. matIdx > mm_nMat()) then + print *,'Particle location: ', p % rGlobal() + call fatalError(Here, 'Particle is in an undefined material with index: '& + //numToChar(matIdx)) + end if associate (matCache => materialCache(matIdx)) diff --git a/TransportOperator/transportOperatorHT_class.f90 b/TransportOperator/transportOperatorHT_class.f90 index 8429cd9a9..9693d254d 100644 --- a/TransportOperator/transportOperatorHT_class.f90 +++ b/TransportOperator/transportOperatorHT_class.f90 @@ -115,10 +115,12 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle) ! Give error if the particle somehow ended in an undefined material case(UNDEF_MAT) - print *, p % rGlobal() + print *, "Particle location: ", p % rGlobal() call fatalError(Here, "Particle is in undefined material") + + ! Give error if the particle somehow ended in an overlap material case(OVERLAP_MAT) - print *, p % rGlobal() + print *, "Particle location: ", p % rGlobal() call fatalError(Here, "Particle is in overlapping cells") case default @@ -158,26 +160,17 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) STLoop: do ! Obtain the local cross-section, depending on the material - select case(p % matIdx()) - case(VOID_MAT) - dist = INFINITY - - case(UNDEF_MAT) - print *, p % rGlobal() - call fatalError(Here, "Particle is in undefined material") - - case(OVERLAP_MAT) - print *, p % rGlobal() - call fatalError(Here, "Particle is in overlapping cells") + if (p % matIdx() == VOID_MAT) then + dist = INFINITY - case default - sigmaT = self % xsData % getTrackingXS(p, p % matIdx(), MATERIAL_XS) - dist = -log( p % pRNG % get()) / sigmaT + else + sigmaT = self % xsData % getTrackingXS(p, p % matIdx(), MATERIAL_XS) + dist = -log( p % pRNG % get()) / sigmaT - ! Should never happen! Catches NaN distances - if (dist /= dist) call fatalError(Here, "Distance is NaN") + ! Should never happen! Catches NaN distances + if (dist /= dist) call fatalError(Here, "Distance is NaN") - end select + end if ! Save state before movement call p % savePrePath() @@ -199,6 +192,8 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) case(UNDEF_MAT) print *, p % rGlobal() call fatalError(Here, "Particle is in undefined material") + + ! Give error if the particle ended in an overlap material case(OVERLAP_MAT) print *, p % rGlobal() call fatalError(Here, "Particle is in overlapping cells") diff --git a/TransportOperator/transportOperatorST_class.f90 b/TransportOperator/transportOperatorST_class.f90 index 68cb3bf6d..fb7e1dbbb 100644 --- a/TransportOperator/transportOperatorST_class.f90 +++ b/TransportOperator/transportOperatorST_class.f90 @@ -59,26 +59,17 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) STLoop: do ! Obtain the local cross-section, depending on the material - select case(p % matIdx()) - case(VOID_MAT) - dist = INFINITY + if (p % matIdx() == VOID_MAT) then + dist = INFINITY - case(UNDEF_MAT) - print *, p % rGlobal() - call fatalError(Here, "Particle is in undefined material") - - case(OVERLAP_MAT) - print *, p % rGlobal() - call fatalError(Here, "Particle is in overlapping cells") - - case default - sigmaT = self % xsData % getTrackingXS(p, p % matIdx(), MATERIAL_XS) - dist = -log( p % pRNG % get()) / sigmaT + else + sigmaT = self % xsData % getTrackingXS(p, p % matIdx(), MATERIAL_XS) + dist = -log( p % pRNG % get()) / sigmaT - ! Should never happen! Catches NaN distances - if (dist /= dist) call fatalError(Here, "Distance is NaN") + ! Should never happen! Catches NaN distances + if (dist /= dist) call fatalError(Here, "Distance is NaN") - end select + end if ! Save state before movement call p % savePrePath() @@ -104,17 +95,20 @@ subroutine surfaceTracking(self, p, tally, thisCycle, nextCycle) ! Give error if the particle somehow ended in an undefined material case(UNDEF_MAT) - print *, p % rGlobal() + print *, "Particle location: ", p % rGlobal() call fatalError(Here, "Particle is in undefined material") + + ! Give error if the particle is in a region with overlapping cells case(OVERLAP_MAT) - print *, p % rGlobal() + print *, "Particle location: ", p % rGlobal() call fatalError(Here, "Particle is in overlapping cells") case default + ! All is well end select - ! Return if particle stoped at collision (not cell boundary) + ! Return if particle stopped at collision (not cell boundary) if (event == COLL_EV .or. p % isDead) exit STLoop end do STLoop From a0e5fef17b2fe90ccd0534993d6e86857b26bd46 Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Sat, 26 Jul 2025 18:50:03 +0100 Subject: [PATCH 17/20] Return nudge to original value --- SharedModules/universalVariables.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedModules/universalVariables.f90 b/SharedModules/universalVariables.f90 index 6565933c4..f80847173 100644 --- a/SharedModules/universalVariables.f90 +++ b/SharedModules/universalVariables.f90 @@ -22,7 +22,7 @@ module universalVariables surface_tol = 1.0e-12_defReal, & ! Tol. on closeness to surface SURF_TOL = 1.0E-12_defReal, & INF = 2.0_defReal**63, & - NUDGE = 1.0e-9_defReal ! Distance to poke neutrons across boundaries for surface tracking + NUDGE = 1.0e-8_defReal ! Distance to poke neutrons across boundaries for surface tracking ! Flags for different possible events in movement in geometry integer(shortINt), parameter, public :: COLL_EV = 1, & From b2469288b2a3a3a449d67635c474fc2704495551 Mon Sep 17 00:00:00 2001 From: ChasingNeutrons Date: Sat, 26 Jul 2025 18:51:42 +0100 Subject: [PATCH 18/20] Typo fix --- Geometry/geometryStd_class.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Geometry/geometryStd_class.f90 b/Geometry/geometryStd_class.f90 index cf7957f7f..49fb71230 100644 --- a/Geometry/geometryStd_class.f90 +++ b/Geometry/geometryStd_class.f90 @@ -296,7 +296,7 @@ subroutine move_withCache(self, coords, maxDist, event, cache) ! Place back in geometry call self % placeCoord(coords) - else ! Crosses to diffrent local cell + else ! Crosses to different local cell ! Move to boundary at hit level call coords % moveLocal(dist, level) event = CROSS_EV From 60c99f346f582b7830362cae89d1ca7555a41ec2 Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 18:52:57 +0100 Subject: [PATCH 19/20] Update Geometry/Universes/cellUniverse_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- Geometry/Universes/cellUniverse_class.f90 | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Geometry/Universes/cellUniverse_class.f90 b/Geometry/Universes/cellUniverse_class.f90 index 7c7559631..7c58dfd78 100644 --- a/Geometry/Universes/cellUniverse_class.f90 +++ b/Geometry/Universes/cellUniverse_class.f90 @@ -166,21 +166,21 @@ subroutine reorderCells(self) integer(longInt) :: keyVisit associate(cells => self % cells, idx => self % searchIdx) - N = size(cells) - do i = 2, n - keyIdx = idx(i) - keyVisit = cells(keyIdx) % visits - j = i - 1 - - ! Shift elements right until correct position found - do while (j >= 1 .and. cells(idx(j)) % visits < keyVisit) - idx(j + 1) = idx(j) - j = j - 1 - end do + N = size(cells) + do i = 2, n + keyIdx = idx(i) + keyVisit = cells(keyIdx) % visits + j = i - 1 + + ! Shift elements right until correct position found + do while (j >= 1 .and. cells(idx(j)) % visits < keyVisit) + idx(j + 1) = idx(j) + j = j - 1 + end do - ! Insert element in correct position - idx(j + 1) = keyIdx - end do + ! Insert element in correct position + idx(j + 1) = keyIdx + end do end associate end subroutine reorderCells From 804c0d5960ae181ae6729dd5463b858a8ff7b3b9 Mon Sep 17 00:00:00 2001 From: Paul Cosgrove Date: Sat, 26 Jul 2025 18:59:48 +0100 Subject: [PATCH 20/20] Update ParticleObjects/Source/fissionSource_class.f90 Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com> --- ParticleObjects/Source/fissionSource_class.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ParticleObjects/Source/fissionSource_class.f90 b/ParticleObjects/Source/fissionSource_class.f90 index 0efc8be8a..3c2da3ca3 100644 --- a/ParticleObjects/Source/fissionSource_class.f90 +++ b/ParticleObjects/Source/fissionSource_class.f90 @@ -190,10 +190,10 @@ function sampleParticle(self, rand) result(p) ! Terminate if there is an error in the geometry if (matIdx == UNDEF_MAT) then - print *, r + print *, 'Particle location: ', r call fatalError(Here, 'Particle position was sampled in an undefined material') elseif (matIdx == OVERLAP_MAT) then - print *, r + print *, 'Particle location: ', r call fatalError(Here, 'Particle position was sampled in an overlapping cell region') end if