Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit MC #9

Open
wants to merge 253 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
6cc6407
Allowed baseMgIMCDatabase to be accepted into input file
AlexBland343 Dec 16, 2021
6683f34
Fixed error in end function
AlexBland343 Dec 17, 2021
d96dd27
Added missing USE statement
AlexBland343 Dec 17, 2021
eb25594
Created IMCMaterial_inter to attempt to use IMC nuclear database
AlexBland343 Dec 17, 2021
04ff651
Changed file paths for selected input files
AlexBland343 Dec 17, 2021
6460576
Created new CollisionProcessors class for IMC - not yet working
AlexBland343 Dec 17, 2021
8d0c6af
Added temperature as a property to baseMgIMCMaterial_class
AlexBland343 Dec 17, 2021
677b4ff
Cleaned up and added file for compilation
AlexBland343 Dec 17, 2021
f37dcaf
Defined new particle type P_IMC_MG - currently does nothing
AlexBland343 Dec 17, 2021
0bead6d
Created new input file for running changes
AlexBland343 Dec 17, 2021
2d025aa
Updated to use IMCXsPackages_class
AlexBland343 Dec 20, 2021
16fef04
Temporarily redirected P_NEUTRON_MG to use IMC database to use in inp…
AlexBland343 Dec 20, 2021
260123a
Changed test input file to use IMCMGstd collision operator
AlexBland343 Dec 20, 2021
fdccb6b
Commented out fission attributes and procedures from relevant modules
AlexBland343 Dec 20, 2021
a883b4d
Added support for P_PHOTON_MG
AlexBland343 Dec 20, 2021
36cf449
Changed references of P_IMC_MG to P_PHOTON_MG
AlexBland343 Dec 20, 2021
68d8488
Changed IMCTest input file to fixed source calculation and using corr…
AlexBland343 Dec 20, 2021
f5abd64
Removed fission comments, cleaned up code to make more aesthetic
AlexBland343 Dec 20, 2021
2234b72
Moved IMCTest input file to main directory for ease while testing
AlexBland343 Dec 20, 2021
6433cb9
Created new physics package for IMC - slight modification of fixed so…
AlexBland343 Dec 21, 2021
dd21105
Hijacked particle class to change default particle to photon - Will l…
AlexBland343 Dec 21, 2021
af772db
Undone temporary bypass of particle type so now recognises photons co…
AlexBland343 Dec 21, 2021
d97490c
Changed input file to IMCPhysicsPackage calculation
AlexBland343 Dec 21, 2021
73bc6d7
Created subroutine 'updateTemp', to allow material temperature to be …
AlexBland343 Dec 23, 2021
641841c
Call updateTemp subroutine in each cycle (will later be timesteps) to…
AlexBland343 Dec 23, 2021
086f636
Removed fission from IMCXsPackages_class
AlexBland343 Dec 23, 2021
dfc2ca5
Prints updated temperature in nicer way
AlexBland343 Dec 23, 2021
d2dbca2
Fixed temporary changes to particle_class so can now be used for both…
AlexBland343 Dec 24, 2021
94ebe67
Created new transport operator for IMC, currently unchanged so functi…
AlexBland343 Dec 24, 2021
6623e5b
Removed unnecessary print statement
AlexBland343 Dec 24, 2021
fd1f13e
Added time step size and time step number, and function to calculate …
AlexBland343 Dec 24, 2021
8720568
Added dTime, dGeom and dColl variables to particle tracking - need to…
AlexBland343 Dec 24, 2021
c009e04
Added timeStepSize to input file
AlexBland343 Dec 24, 2021
9bf4816
Used particle dungeon class to store time instead of function call fr…
AlexBland343 Dec 24, 2021
a6b0b2c
Sample distance to next collision
AlexBland343 Dec 26, 2021
44d8a83
Find distance to geometry boundary (potentially better function that …
AlexBland343 Dec 26, 2021
4fc38f6
Changed approach in transport operator to use delta tracking instead …
AlexBland343 Dec 27, 2021
0107a63
Fixed error
AlexBland343 Dec 27, 2021
745b3e5
Detain particles that reach end of time step and use temp dungeon to …
AlexBland343 Dec 30, 2021
7873f97
Added note to look into pointer vs allocatable in more detail, in thi…
AlexBland343 Dec 30, 2021
3a476e2
Added function to return the equilibrium radiation energy density U_r
AlexBland343 Jan 8, 2022
5b92976
Changed timeStepSize to be in universalVariables instead of tied to p…
AlexBland343 Jan 8, 2022
5c26027
Created new source type for radiation emitted from material
AlexBland343 Jan 8, 2022
19f0c42
Now calculate energy to be emitted in each time step within material …
AlexBland343 Jan 8, 2022
2fd865b
Sources new particles emitted from material. Needs modification to wo…
AlexBland343 Jan 8, 2022
7432349
Particles now emitted from material. Actual numbers not yet correct. …
AlexBland343 Jan 8, 2022
220223f
Removed unused variable
AlexBland343 Jan 8, 2022
71a0cef
*IMPORTANT CHANGE* Changed particle time to be time within timestep r…
AlexBland343 Jan 8, 2022
e813806
Temporarily fixed error caused by a few missing lines in source class…
AlexBland343 Jan 9, 2022
04c23bc
Fixed source to update p % wgt instead of p % E, and now takes number…
AlexBland343 Jan 9, 2022
b4c3670
Reset particle fate
AlexBland343 Jan 15, 2022
956d553
Added way to append sources to make dungeons less complicated
AlexBland343 Jan 28, 2022
c760489
Wrote subroutine to print dungeon's particle properties to screen for…
AlexBland343 Jan 30, 2022
876c2a1
Added subroutine description
AlexBland343 Jan 30, 2022
e0f855b
Was accidentally using wrong variable, fixed
AlexBland343 Jan 30, 2022
ed6c2b5
Removed use of universal variable timeStepSize in physics package, so…
AlexBland343 Jan 30, 2022
3881e61
Changed material classes and functions to use time step differently, …
AlexBland343 Jan 30, 2022
d47d992
Fixed some temporary changes that shouldn't have stayed
AlexBland343 Jan 30, 2022
95276e1
Added if statement, currently does nothing
AlexBland343 Jan 31, 2022
cb82405
Created new tally, done lots of fiddling, not yet working
AlexBland343 Jan 31, 2022
efd4337
Added new tally clerk
AlexBland343 Jan 31, 2022
ac3f13d
Recording something but who knows what...
AlexBland343 Jan 31, 2022
af7cd46
Created subroutine to reset tally score, but for some reason still be…
AlexBland343 Jan 31, 2022
c72fd3b
Removed print statements
AlexBland343 Feb 4, 2022
19a241a
Wrote function to return Fleck factor
AlexBland343 Feb 4, 2022
92a6b49
Started modifying collision processor to give call required collisions
AlexBland343 Feb 4, 2022
89e4394
Allow planck opacity to be read fom data file. Later need to allow fo…
AlexBland343 Feb 9, 2022
e88ec46
Added material internal energy
AlexBland343 Feb 10, 2022
eaae1f6
Temporarily multiplying by i for normalisation
AlexBland343 Feb 10, 2022
1250e57
Created module for polynomial functions, wrote integrate and NR solve…
AlexBland343 Feb 10, 2022
9e9bd23
Read heat capacity equation from XS input file. Integrate and solve t…
AlexBland343 Feb 10, 2022
77cd995
Changed convergence check to be within tol
AlexBland343 Feb 10, 2022
04f934e
Wrote poly_eval to evaluate a function value at a point
AlexBland343 Feb 10, 2022
24cdbe5
Wrote initProps to store timestep in mat class and to calculate initi…
AlexBland343 Feb 10, 2022
c79a6d0
Fixed material update equation, had been ignoring integration constan…
AlexBland343 Feb 11, 2022
696167a
Removed normalisation of tallies by resetting batch number
AlexBland343 Feb 11, 2022
2dd6937
Fixed error which would fail convergence check for negative solutions
AlexBland343 Feb 13, 2022
81498a2
Made source in input file optional - can now just use material photon…
AlexBland343 Feb 13, 2022
67b4369
Improved printToScreen subroutine
AlexBland343 Feb 22, 2022
dd4920b
Stopped energy being tallied when particles leak outside geometry
AlexBland343 Feb 22, 2022
bbc82b1
Started creating benchmark test cases, still in progress
AlexBland343 Feb 25, 2022
0ea3a1b
Allowed printToScreen to print cumulative sum of dungeon particle pro…
AlexBland343 Feb 27, 2022
96470c9
Changing files for testing
AlexBland343 Mar 3, 2022
d421f36
Changed scattering to be isotropic, code/comments needs tidying up
AlexBland343 Mar 3, 2022
c28dd62
Wrote test for poly_func module
AlexBland343 Mar 8, 2022
79d5df8
Added support for multiple regions to IMC source, still needs a bit o…
AlexBland343 Mar 8, 2022
3d2460f
Fixed issue with source
AlexBland343 Mar 10, 2022
c781a6a
Updated printToScreen to also be able to print matIdx
AlexBland343 Mar 10, 2022
96fc0d9
Various changes to make material particle emmision work correctly wit…
AlexBland343 Mar 12, 2022
3af1eb2
Made output more readable
AlexBland343 Mar 12, 2022
419fb25
Moved material update printouts below source batch title
AlexBland343 Mar 12, 2022
107e598
Also prints out T_old
AlexBland343 Mar 12, 2022
1331525
Changed energy tallies to work with multiple materials, all code shou…
AlexBland343 Mar 16, 2022
9c3617a
Now initialises with temperatures from input file
AlexBland343 Mar 16, 2022
899e19e
Now put volume of material zone in input file so that volumes are cor…
AlexBland343 Mar 16, 2022
51c18a4
Updated error description when too many particles are sampled
AlexBland343 Mar 17, 2022
6ab822f
Tidied up some test files
AlexBland343 Mar 17, 2022
c86cf99
Changed data file to use sigmaP instead of capture for consistency
AlexBland343 May 13, 2022
86376c8
Created surface source class for black body - very simple and low fun…
AlexBland343 May 25, 2022
8987cc2
Cleaned up some code, changed a few bits to make more sense
AlexBland343 Jul 8, 2022
bec7b2c
Cleaned up Input File folder
AlexBland343 Jul 8, 2022
1fc376f
Changed subroutine description
AlexBland343 Jul 17, 2022
71a49e1
Added line to imrpove convergence chances, changed some comments
AlexBland343 Jul 17, 2022
0e386d8
Added function to return size of particle dungeon
AlexBland343 Jul 17, 2022
9d0f44b
Cleaned up folders
AlexBland343 Jul 17, 2022
6028b02
Made changes to not sample particles in areas of 0 temperature
AlexBland343 Jul 17, 2022
436413a
Added some function descriptions
AlexBland343 Jul 24, 2022
343b9cd
Added more function descriptions and comments
AlexBland343 Jul 24, 2022
d3b9214
A few small changes
AlexBland343 Jul 24, 2022
da51f86
Fixed incorrect comment line
AlexBland343 Jul 24, 2022
03eae23
Slight changes to comments
AlexBland343 Jul 24, 2022
4d2503c
Created sample input file to explain certain settings
AlexBland343 Jul 24, 2022
578d876
Test commit for github
AlexBland343 Sep 2, 2022
3e76371
Split updateMat subroutine into IMC and ISMC
AlexBland343 Sep 2, 2022
4ac1300
Simplified code for IMC calculation, and began code for ISMC
AlexBland343 Sep 2, 2022
5882498
Removed changes to existing input files
AlexBland343 Sep 3, 2022
3539bd1
Fixed tab, added error calls
AlexBland343 Sep 5, 2022
bcc2b90
Deleted unnecessary lines for pull request
AlexBland343 Sep 5, 2022
ff37a75
Changes for pull request
AlexBland343 Sep 17, 2022
5f19626
Changes to input files as suggested in pull request
AlexBland343 Sep 17, 2022
5437eb3
Fixed a few inconsistencies
AlexBland343 Sep 17, 2022
6296c18
Various changes to materialMenu_mod
AlexBland343 Sep 17, 2022
204e439
Fixed spelling
AlexBland343 Sep 17, 2022
301e9f7
Deleted unnecessary comments
AlexBland343 Sep 17, 2022
70482fe
No longer require IMCSource in input file. Can specify 'limit' to siz…
AlexBland343 Sep 17, 2022
ba4c526
Removed old lines
AlexBland343 Sep 17, 2022
9f876b9
Changed comment
AlexBland343 Sep 17, 2022
d7662e9
Changed input files to no longer have imcSource
AlexBland343 Sep 18, 2022
607004d
A few minor changes to comments
AlexBland343 Sep 20, 2022
0e2eea1
Deleted unnecessary input file lines
AlexBland343 Sep 25, 2022
e31b4da
Added planck opacity
AlexBland343 Sep 26, 2022
5426896
Removed unnecessary lines
AlexBland343 Sep 26, 2022
4714120
Various changes to cross-section data handling, still a few issues to…
AlexBland343 Sep 26, 2022
22cc3a7
Fixed typo
AlexBland343 Sep 27, 2022
a4498a4
Stripped away a lot of unnecessary scattering elements
AlexBland343 Sep 27, 2022
df4cc47
Lots of changes to get rid of annoying initProps subroutine. T and V …
AlexBland343 Sep 27, 2022
dd3f222
Changed input files to new opacity inputs and removing some scatterin…
AlexBland343 Sep 28, 2022
6552e34
Added option to change alpha setting
AlexBland343 Sep 28, 2022
9284f33
Moved effective scattering into elastic instead of inelastic, as curr…
AlexBland343 Sep 28, 2022
66e9087
Deleted print line
AlexBland343 Sep 28, 2022
bd5b81c
Trying out a way to limit particle numbers
AlexBland343 Sep 29, 2022
5aabe37
Small change with source numbers, not finished
AlexBland343 Sep 30, 2022
f87d747
Removed appendIMC subroutine, instead put in IMCSource_class by overr…
AlexBland343 Oct 4, 2022
3a60611
Temporary change to avoid compiler error
AlexBland343 Oct 4, 2022
2953676
Fixed comment
AlexBland343 Oct 5, 2022
66121a0
Changed surfaceSource to correctly read N
AlexBland343 Oct 5, 2022
4aa2c93
Fixed incorrect position assignment
AlexBland343 Oct 5, 2022
ab6db49
Changed material to get time step from physics package call
AlexBland343 Oct 5, 2022
2865cdf
Fixed typo
AlexBland343 Oct 10, 2022
86cc1a3
Fixed another typo
AlexBland343 Oct 10, 2022
508fa48
Changed inputs to capture and scatter instead of sigmaA and sigmaS
AlexBland343 Oct 28, 2022
5f9e3bf
A few minor fixes
AlexBland343 Oct 28, 2022
d89d3e3
Deleted duplicated function
AlexBland343 Oct 28, 2022
8358b09
Deleted option of printing sum of quantity, rarely useful except tota…
AlexBland343 Oct 28, 2022
6df7142
Reverted old change
AlexBland343 Oct 28, 2022
b8456e9
Changed particle type check function to be more robust
AlexBland343 Oct 28, 2022
af11c36
Deleted tab
AlexBland343 Oct 28, 2022
202d108
Changed particle time to absolute time rather than time within timestep
AlexBland343 Oct 31, 2022
2717925
Deleted unneccessary property
AlexBland343 Oct 31, 2022
53c7b97
Added option for turning on and off printing of material updates, and…
AlexBland343 Oct 31, 2022
1d6f1ca
Changed a lot of IMC physics package to say 'steps' instead of 'cycles'
AlexBland343 Oct 31, 2022
7f4298d
Deleted some unneccessary lines and moved files in line
AlexBland343 Oct 31, 2022
d496d24
Changed TIME_FATE to AGED_FATE
AlexBland343 Oct 31, 2022
81bc8bf
Updated some comments
AlexBland343 Oct 31, 2022
505c619
Changed dungeons in physics package from allocatable to pointer
AlexBland343 Oct 31, 2022
6ecc45b
Lots of changes to transport operator to make it more general. Also n…
AlexBland343 Nov 2, 2022
07c6aac
Changed cutoff to be consistent with transportOperatorHT_class, and d…
AlexBland343 Nov 2, 2022
4ccf587
Deleted test file which was never meant to exist
AlexBland343 Nov 2, 2022
48d3ec5
A few changes to the way that particle time is sampled and some new e…
AlexBland343 Nov 3, 2022
8788546
Temporary fix to a very weird issue, not yet sure of the cause
AlexBland343 Nov 13, 2022
e8e6f2d
Removed duplicated line that was increasing particle time too much an…
AlexBland343 Nov 14, 2022
dad5b42
Same changes as in ISMC branch. Fixed a few things and then moved loo…
AlexBland343 Nov 15, 2022
17433b9
Moved some variables to be in line
AlexBland343 Nov 15, 2022
132ed4b
Renamed surfaceSource_class to bbSurfaceSource_class
AlexBland343 Nov 17, 2022
310bad5
Source no longer requires timestep in the input dictionary, instead i…
AlexBland343 Nov 17, 2022
90c18a4
Changed input files to reflect new settings
AlexBland343 Nov 17, 2022
91cfe07
Big simplification to IMC material source, now samples particles only…
AlexBland343 Nov 17, 2022
8801682
Changed marshak input files to use new name for bbSurfaceSource
AlexBland343 Nov 17, 2022
ffc4871
N particles from material and N particles from source are now given i…
AlexBland343 Nov 17, 2022
12f5d08
Changed temperatures for MW64
AlexBland343 Nov 20, 2022
5c23209
Fixed typo
AlexBland343 Nov 23, 2022
21ba922
Changed weightResponse_class to also work with IMCMaterial
AlexBland343 Nov 23, 2022
ae08872
Deleted imcWeightClerk and made new clerk to tally absorptions, quite…
AlexBland343 Nov 23, 2022
a646467
Simplified reset subroutine
AlexBland343 Nov 23, 2022
3a957f6
Changed physics package to automatically work with new clerk
AlexBland343 Nov 23, 2022
b714486
Fixed a few typos
AlexBland343 Nov 23, 2022
2d4907c
Deleted reference to material menu mod
AlexBland343 Nov 23, 2022
eb707d9
Fixed error where dColl was being used instead of dTime in DT. Silly me.
AlexBland343 Nov 24, 2022
9dac7cf
Fix to input file
AlexBland343 Nov 29, 2022
9ca9438
Changed particle generation to be proportional to energy, and open a …
AlexBland343 Nov 29, 2022
88a30c9
Added new term to fleck factor, think it may have been wrong before w…
AlexBland343 Nov 29, 2022
0d57c89
Changes to input files
AlexBland343 Nov 29, 2022
1dfd41c
Moved a couple of lines to get rid of duplicated line and fixed incor…
AlexBland343 Dec 1, 2022
64da15a
Added comment
AlexBland343 Dec 1, 2022
8b2ce72
Changed comments and errors, moved things in line, and added sampleWe…
AlexBland343 Dec 23, 2022
83624c6
Changed a few lines of comments
AlexBland343 Dec 23, 2022
35ef100
Changed temperatures to be correct
AlexBland343 Dec 23, 2022
d9d2216
Fixed incorrect exponent
AlexBland343 Dec 23, 2022
3cfaaba
Fixed equation
AlexBland343 Dec 26, 2022
c985e41
Temporary changes to input file numbers
AlexBland343 Dec 26, 2022
06bfeab
Fixed particle direction sampling, had an older version committed
AlexBland343 Dec 27, 2022
82613c6
Merge with main branch to include parallel functionality on this branch
AlexBland343 Jan 3, 2023
0777e7f
Made PP mostly parallel, and changed to only output temps at end of s…
AlexBland343 Jan 5, 2023
88a83cc
Made IMC material source parallel
AlexBland343 Jan 5, 2023
1c1e583
Tried to add parallel for bbSurfaceSource but for some reason can't g…
AlexBland343 Jan 6, 2023
c78a3aa
Changed to only print temperature, most of the other things printed w…
AlexBland343 Jan 7, 2023
a2cf72b
Experimenting with an overlaid geometry grid for hybrid tracking
AlexBland343 Jan 7, 2023
21e71d8
Working on new class for a simple grid overlaid on geometry for hybri…
AlexBland343 Jan 11, 2023
400c7b4
Various fixes
AlexBland343 Jan 11, 2023
d5cb429
Changed some names and fixed a few oversights
AlexBland343 Jan 11, 2023
69a4827
Changes to transport operator to use new grid
AlexBland343 Jan 11, 2023
0ec9e8c
Added isPresent check to dynamicArray class and some changes to PP
AlexBland343 Jan 11, 2023
09f2ae7
Fixes to some issues on grid cell boundaries
AlexBland343 Jan 12, 2023
f0e2d84
Changed the way some things are calculated, took inspiration from lat…
AlexBland343 Jan 15, 2023
22ae4c0
Deleted reference to older prototype file
AlexBland343 Jan 15, 2023
b876a4a
Added parallel loop to subroutine
AlexBland343 Jan 16, 2023
a781c7f
Deleted old file and changed trans op to be able to switch form delta…
AlexBland343 Jan 16, 2023
36f424b
Temporary changes to input files while testing
AlexBland343 Jan 16, 2023
9048a0e
Avoid reobtaining sigmaT unnecessarily
AlexBland343 Jan 16, 2023
988e257
Renamed variables to be consistent with latUniverse
AlexBland343 Jan 16, 2023
ae4ebad
Changed an oversight that prevented from working in parallel
AlexBland343 Jan 17, 2023
182b37e
Redid a lot of bbSurfaceSource
AlexBland343 Jan 17, 2023
7600fc2
Fixed issue causing incorrect dGrid after cycle DTLoop, and added not…
AlexBland343 Jan 23, 2023
73f33fc
Fixed grammar
AlexBland343 Jan 25, 2023
c73bf36
Fixed issue causing isPresent to be incorrect due to checking element…
AlexBland343 Jan 27, 2023
08f0b1e
Increases distance by surface tolerance, not sure yet if this is actu…
AlexBland343 Jan 28, 2023
08fa1f3
Removed calulcation type from universal variables and put into materi…
AlexBland343 Feb 2, 2023
c2fdd55
Merge branch 'parallel' into ImplicitMC
AlexBland343 Feb 2, 2023
e5efe0b
Changed input files to work with changes to source class
AlexBland343 Feb 2, 2023
23d486b
New module for splitting geometry into a uniform grid to avoid having…
AlexBland343 Feb 7, 2023
b4a1301
Changed PP to work with new module, can be cleaned up a lot by removi…
AlexBland343 Feb 7, 2023
b220942
Allowed IMCSource to sample particles using dimensions of lattice whe…
AlexBland343 Feb 8, 2023
6007c93
Removed unused variables and a few other small changes
AlexBland343 Feb 9, 2023
559dce9
Lots of changes to make file a bit nicer looking and easier to follow
AlexBland343 Feb 10, 2023
3750e4a
Moved around input files
AlexBland343 Feb 10, 2023
f3bfa31
A couple of changes for when void is present in geometry
AlexBland343 Mar 14, 2023
64cba5e
Changes to how material bounds are calculated in source to (hopefully…
AlexBland343 Mar 14, 2023
3d2c6f4
Input file for hohlraum benchmark, not yet using correct units
AlexBland343 Mar 14, 2023
9d04f44
Lots of changes to make transop more readable. Also moved grid into t…
AlexBland343 Mar 21, 2023
cbfed02
Correctly return 0 when searching for void mat xs
AlexBland343 Mar 23, 2023
942eecb
Moved grid into TO_inter to allow PP to access it to update it, fixes…
AlexBland343 Mar 23, 2023
06016ef
Updated bbSurfaceSource to be on track with main implicitMC branch. F…
AlexBland343 Mar 24, 2023
354d517
A few minor changes
AlexBland343 Mar 25, 2023
03aeaad
Moved around some lines to make more logical, added some comments
AlexBland343 May 15, 2023
2f6b5ff
Renamed simpleGrid to trackingGrid and put it into transport operator…
AlexBland343 May 15, 2023
c97cf53
Reorganised some input files
AlexBland343 May 17, 2023
4fbb608
Cleaned up a lot of PP by moving some material-related things into mg…
AlexBland343 May 21, 2023
a066e46
Redid most of IMCSource_class, including removing some sourcing calcu…
AlexBland343 May 22, 2023
022d7a1
Fixed a few oversights relating to void regions in lattice and also l…
AlexBland343 May 23, 2023
58ff981
Merge with hybridTransport branch
AlexBland343 May 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ list(APPEND CMAKE_PREFIX_PATH $ENV{LAPACK_INSTALL})
find_package(LAPACK REQUIRED )
message(STATUS ${LAPACK_LIBRARIES})

set(BLAS_LIBS /home/ajb343/BLAS/BLAS-3.10.0/Build)
find_package(BLAS REQUIRED)

# Dependencies for BUILD_TESTS
if (BUILD_TESTS)
# FIND PYTHON INTERPRETER
Expand Down
5 changes: 3 additions & 2 deletions CollisionOperator/CollisionProcessors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
add_sources( ./collisionProcessor_inter.f90
./collisionProcessorFactory_func.f90
./neutronCEstd_class.f90
./neutronCEimp_class.f90
./neutronMGstd_class.f90)
./neutronCEimp_class.f90
./neutronMGstd_class.f90
./IMCMGstd_class.f90)
220 changes: 220 additions & 0 deletions CollisionOperator/CollisionProcessors/IMCMGstd_class.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
module IMCMGstd_class

use numPrecision
use endfConstants
use genericProcedures, only : fatalError, rotateVector, numToChar
use dictionary_class, only : dictionary
use RNG_class, only : RNG

! Particle types
use particle_class, only : particle, particleState, printType, P_PHOTON
use particleDungeon_class, only : particleDungeon

! Abstract interface
use collisionProcessor_inter, only : collisionProcessor, collisionData ,init_super => init

! Nuclear Data Interface
use nuclearDataReg_mod, only : ndReg_getIMCMG => getIMCMG
use nuclearDatabase_inter, only : nuclearDatabase
use mgIMCDatabase_inter, only : mgIMCDatabase
use mgIMCMaterial_inter, only : mgIMCMaterial, mgIMCMaterial_CptrCast
use reactionHandle_inter, only : reactionHandle

implicit none
private

!!
!! Standard (default) scalar collision processor for MG IMC
!! Determines type of collision as either absorption or effective scattering
!!
!! Settings:
!! NONE
!!
!! Sample dictionary input:
!! collProcName {
!! type IMCMGstd;
!! }
!!
type, public, extends(collisionProcessor) :: IMCMGstd
private
class(mgIMCDatabase), pointer, public :: xsData => null()
class(mgIMCMaterial), pointer, public :: mat => null()
contains
! Initialisation procedure
procedure :: init

! Implementation of customisable procedures
procedure :: sampleCollision
procedure :: implicit
procedure :: elastic
procedure :: inelastic
procedure :: capture
procedure :: fission
procedure :: cutoffs
end type IMCMGstd

contains

!!
!! Initialise from dictionary
!!
subroutine init(self, dict)
class(IMCMGstd), intent(inout) :: self
class(dictionary), intent(in) :: dict
character(100), parameter :: Here = 'init (IMCMGstd_class.f90)'

! Call superclass
call init_super(self, dict)

end subroutine init

!!
!! Samples collision
!!
!! Absorption with probability equal to fleck factor, otherwise
!! effective scattering
!!
!! Physical scattering is omitted as in reference paper "Four Decades of Implicit Monte Carlo"
!! (Allan B Wollaber) but may be included later if desired
!!
subroutine sampleCollision(self, p, collDat, thisCycle, nextCycle)
class(IMCMGstd), intent(inout) :: self
class(particle), intent(inout) :: p
type(collisionData), intent(inout) :: collDat
class(particleDungeon),intent(inout) :: thisCycle
class(particleDungeon),intent(inout) :: nextCycle
real(defReal) :: r, fleck
character(100),parameter :: Here =' sampleCollision (IMCMGstd_class.f90)'

! Verify that particle is MG PHOTON
if( .not. p % isMG .or. p % type /= P_PHOTON) then
call fatalError(Here, 'Supports only MG PHOTON. Was given NEUTRON and/or CE '//printType(p % type))
end if

! Verify and load nuclear data pointer
self % xsData => ndReg_getIMCMG()
if(.not.associated(self % xsData)) call fatalError(Here, "Failed to get active database for MG IMC")

! Get and verify material pointer
self % mat => mgIMCMaterial_CptrCast( self % xsData % getMaterial( p % matIdx()))
if(.not.associated(self % mat)) call fatalError(Here, "Failed to get MG IMC Material")

r = p % pRNG % get()

fleck = self % mat % getFleck()

if( r < fleck ) then
! Effective absoprtion
collDat % MT = macroCapture
else
! Effective scattering
collDat % MT = macroAllScatter
end if

end subroutine sampleCollision

!!
!! Perform implicit treatment
!!
subroutine implicit(self, p, collDat, thisCycle, nextCycle)
class(IMCMGstd), intent(inout) :: self
class(particle), intent(inout) :: p
type(collisionData), intent(inout) :: collDat
class(particleDungeon),intent(inout) :: thisCycle
class(particleDungeon),intent(inout) :: nextCycle

! Do nothing.

end subroutine implicit

!!
!! Effective scattering - currently only elastic (constant energy-weight)
!!
subroutine elastic(self, p , collDat, thisCycle, nextCycle)
class(IMCMGstd), intent(inout) :: self
class(particle), intent(inout) :: p
type(collisionData), intent(inout) :: collDat
class(particleDungeon),intent(inout) :: thisCycle
class(particleDungeon),intent(inout) :: nextCycle
real(defReal) :: phi, mu
real(defReal), dimension(3) :: dir
character(100), parameter :: Here = 'elastic (IMCMGstd_class.f90)'

! Assign MT number
collDat % MT = macroAllScatter

! Sample Direction - chosen uniformly inside unit sphere
mu = 2 * p % pRNG % get() - 1
phi = p % pRNG % get() * 2*pi
dir(1) = mu
dir(2) = sqrt(1-mu**2) * cos(phi)
dir(3) = sqrt(1-mu**2) * sin(phi)

!p % coords % dir = dir
call p % rotate(mu, phi)

end subroutine elastic

!!
!! Inelastic scattering - Not currently supported
!!
subroutine inelastic(self, p, collDat, thisCycle, nextCycle)
class(IMCMGstd), intent(inout) :: self
class(particle), intent(inout) :: p
type(collisionData), intent(inout) :: collDat
class(particleDungeon),intent(inout) :: thisCycle
class(particleDungeon),intent(inout) :: nextCycle
character(100),parameter :: Here = "inelastic (IMCMGstd_class.f90)"

! Do nothing. Should not be called

call fatalError(Here, "Inelastic subroutine should not be called")

AlexBland343 marked this conversation as resolved.
Show resolved Hide resolved
end subroutine inelastic

!!
!! Perform capture
!!
subroutine capture(self, p, collDat, thisCycle, nextCycle)
class(IMCMGstd), intent(inout) :: self
class(particle), intent(inout) :: p
type(collisionData), intent(inout) :: collDat
class(particleDungeon),intent(inout) :: thisCycle
class(particleDungeon),intent(inout) :: nextCycle

p % isDead = .true.

end subroutine capture

!!
!! Perform fission
!!
subroutine fission(self, p, collDat, thisCycle, nextCycle)
class(IMCMGstd), intent(inout) :: self
class(particle), intent(inout) :: p
type(collisionData), intent(inout) :: collDat
class(particleDungeon),intent(inout) :: thisCycle
class(particleDungeon),intent(inout) :: nextCycle
character(100), parameter :: Here = 'fission (IMCMGstd_class.f90)'

! Do nothing. Should not be called

call fatalError(Here, "Fission subroutine should not be called")

end subroutine fission

!!
!! Apply cutoffs or post-collision implicit treatment
!!
subroutine cutoffs(self, p, collDat, thisCycle, nextCycle)
class(IMCMGstd), intent(inout) :: self
class(particle), intent(inout) :: p
type(collisionData), intent(inout) :: collDat
class(particleDungeon),intent(inout) :: thisCycle
class(particleDungeon),intent(inout) :: nextCycle

! Do nothing

end subroutine cutoffs

end module IMCMGstd_class
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module collisionProcessorFactory_func
use neutronCEstd_class, only : neutronCEstd
use neutronCEimp_class, only : neutronCEimp
use neutronMGstd_class, only : neutronMGstd
use IMCMGstd_class, only : IMCMGstd

implicit none
private
Expand All @@ -24,7 +25,8 @@ module collisionProcessorFactory_func
! For now it is necessary to adjust trailing blanks so all enteries have the same length
character(nameLen),dimension(*),parameter :: AVALIBLE_collisionProcessors = [ 'neutronCEstd',&
'neutronCEimp',&
'neutronMGstd']
'neutronMGstd',&
'IMCMGstd ']

contains

Expand Down Expand Up @@ -59,6 +61,10 @@ subroutine new_collisionProcessor(new,dict)
allocate(neutronMGstd :: new)
call new % init(dict)

case('IMCMGstd')
allocate(IMCMGstd :: new)
call new % init(dict)

!*** NEW COLLISION PROCESSOR TEMPLATE ***!
!case('<newcollisionProcessorName>')
! allocate(<newcollisionProcessorName> :: new)
Expand Down
5 changes: 5 additions & 0 deletions CollisionOperator/collisionOperator_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ subroutine init(self, dict)
self % lookupTable(P_MG, P_NEUTRON) = 2
end if

if(dict % isPresent('photonMG')) then
call new_collisionProcessor(self % physicsTable(3) % proc, dict % getDictPtr('photonMG'))
self % lookupTable(P_MG, P_PHOTON) = 3
end if

end subroutine init

!!
Expand Down
18 changes: 18 additions & 0 deletions DataStructures/dynArray_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module dynArray_class
procedure :: pop => pop_shortInt
procedure :: empty => empty_shortInt
procedure :: kill => kill_shortInt
procedure :: isPresent => isPresent_shortInt

! Private procedures

Expand Down Expand Up @@ -248,4 +249,21 @@ pure subroutine kill_shortInt(self)

end subroutine kill_shortInt

!!
!! Checks if item is present in array
!!
pure function isPresent_shortInt(self, item) result(isPresent)
class(dynIntArray), intent(in) :: self
integer(shortInt), intent(in) :: item
logical(defBool) :: isPresent

isPresent = .false.

! Return false if array is empty
if (self % mySize == 0) return

if (any(self % array(1:self % mySize) == item)) isPresent = .true.

end function isPresent_shortInt

end module dynArray_class
1 change: 1 addition & 0 deletions Geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ add_sources( ./csg_class.f90
./geometry_inter.f90
./geometryStd_class.f90
./geometryReg_mod.f90
./discretiseGeom_class.f90
)

add_unit_tests( ./Tests/geomGraph_test.f90
Expand Down
4 changes: 2 additions & 2 deletions Geometry/Cells/cellShelf_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ module cellShelf_class
!! Interface:
!! init -> Initialise from a dictionary & surfaceShelf
!! getPtr -> Get pointer to a cell given by its index
!! getIdx -> Return index of a cell fivent its ID
!! getIdx -> Return index of a cell given its ID
!! getID -> Return cell ID given its index
!! getFill -> Return content of the cell. If -ve it is universe ID. If +ve it is matIdx.
!! getSize -> Return the number of cells (max cellIdx)
!! kill -> Return to uninitialised state
!!
!! NOTE: Becouse cells are stored as pointers, calling `kill` is crucial to prevent
!! NOTE: Because cells are stored as pointers, calling `kill` is crucial to prevent
!! memory leaks. TODO: Add `final` procedure here ?
!!
type, public :: cellShelf
Expand Down
12 changes: 12 additions & 0 deletions Geometry/Universes/latUniverse_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ module latUniverse_class
procedure :: distance
procedure :: cross
procedure :: cellOffset
procedure :: getSizeN
end type latUniverse

contains
Expand Down Expand Up @@ -364,6 +365,17 @@ function cellOffset(self, coords) result (offset)

end function cellOffset

!!
!! Return dimensions of lattice
!!
function getSizeN(self) result(sizeN)
class(latUniverse), intent(in) :: self
integer(shortInt), dimension(3) :: sizeN

sizeN = self % sizeN

end function getSizeN

!!
!! Return to uninitialised state
!!
Expand Down
Loading