mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Small formatting changes. Changed n_coll to n_collision in Particle type.
This commit is contained in:
parent
d6ea515562
commit
3d79daebef
3 changed files with 45 additions and 30 deletions
|
|
@ -5,6 +5,8 @@ module fission
|
|||
use error, only: fatal_error
|
||||
use search, only: binary_search
|
||||
|
||||
implicit none
|
||||
|
||||
contains
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
|
|
@ -8,25 +8,35 @@ module particle_header
|
|||
!===============================================================================
|
||||
|
||||
type Particle
|
||||
integer(8) :: uid ! Unique ID
|
||||
integer :: type ! Particle type (n, p, e, etc)
|
||||
real(8) :: xyz(3) ! location
|
||||
real(8) :: xyz_local(3) ! local location (after transformations)
|
||||
real(8) :: uvw(3) ! directional cosines
|
||||
real(8) :: wgt ! particle weight
|
||||
real(8) :: E ! energy
|
||||
integer :: IE ! index on energy grid
|
||||
real(8) :: interp ! interpolation factor for energy grid
|
||||
integer :: cell ! current cell
|
||||
integer :: universe ! current universe
|
||||
integer :: lattice ! current lattice
|
||||
integer :: surface ! current surface
|
||||
integer :: material ! current material
|
||||
integer :: last_material ! last material
|
||||
integer :: index_x ! lattice index for x direction
|
||||
integer :: index_y ! lattice index for y direction
|
||||
logical :: alive ! is particle alive?
|
||||
integer :: n_coll ! # of collisions
|
||||
! Basic data
|
||||
integer(8) :: uid ! Unique ID
|
||||
integer :: type ! Particle type (n, p, e, etc)
|
||||
|
||||
! Physical data
|
||||
real(8) :: xyz(3) ! location
|
||||
real(8) :: xyz_local(3) ! local location (after transformations)
|
||||
real(8) :: uvw(3) ! directional cosines
|
||||
real(8) :: wgt ! particle weight
|
||||
real(8) :: E ! energy
|
||||
logical :: alive ! is particle alive?
|
||||
|
||||
! Energy grid data
|
||||
integer :: IE ! index on energy grid
|
||||
real(8) :: interp ! interpolation factor for energy grid
|
||||
|
||||
! Indices for various arrays
|
||||
integer :: cell ! index for current cell
|
||||
integer :: universe ! index for current universe
|
||||
integer :: lattice ! index for current lattice
|
||||
integer :: surface ! index for current surface
|
||||
integer :: material ! index for current material
|
||||
integer :: last_material ! index for last material
|
||||
integer :: index_x ! lattice index for x direction
|
||||
integer :: index_y ! lattice index for y direction
|
||||
|
||||
! Statistical data
|
||||
integer :: n_collision ! # of collisions
|
||||
|
||||
end type Particle
|
||||
|
||||
end module particle_header
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@ contains
|
|||
! initialize random number seed
|
||||
call RN_init_particle(int(j,8))
|
||||
|
||||
! position
|
||||
! sample position
|
||||
r = (/ (rang(), k = 1,3) /)
|
||||
p % uid = j
|
||||
p % xyz = p_min + r*(p_max - p_min)
|
||||
p % xyz_local = p % xyz
|
||||
|
||||
! angle
|
||||
! sample angle
|
||||
phi = TWO*PI*rang()
|
||||
mu = TWO*rang() - ONE
|
||||
p % uvw(1) = mu
|
||||
|
|
@ -80,15 +80,18 @@ contains
|
|||
p % uvw(3) = sqrt(ONE - mu*mu) * sin(phi)
|
||||
|
||||
! set defaults
|
||||
p % type = NEUTRON
|
||||
p % cell = 0
|
||||
p % surface = 0
|
||||
p % universe = 0
|
||||
p % lattice = 0
|
||||
p % wgt = ONE
|
||||
p % alive = .true.
|
||||
p % index_x = 0
|
||||
p % index_y = 0
|
||||
p % type = NEUTRON
|
||||
p % wgt = ONE
|
||||
p % alive = .true.
|
||||
p % cell = 0
|
||||
p % universe = 0
|
||||
p % lattice = 0
|
||||
p % surface = 0
|
||||
p % material = 0
|
||||
p % last_material = 0
|
||||
p % index_x = 0
|
||||
p % index_y = 0
|
||||
p % n_collision = 0
|
||||
|
||||
! sample energy from Watt fission energy spectrum for U-235
|
||||
do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue