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