source: palm/trunk/SOURCE/mod_particle_attributes.f90

Last change on this file was 4828, checked in by Giersch, 3 years ago

Copyright updated to year 2021, interface pmc_sort removed to accelarate the nesting code

  • Property svn:keywords set to Id
File size: 7.8 KB
RevLine 
[1682]1!> @file mod_particle_attributes.f90
[4677]2!--------------------------------------------------------------------------------------------------!
[2696]3! This file is part of the PALM model system.
[1359]4!
[4677]5! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
6! Public License as published by the Free Software Foundation, either version 3 of the License, or
7! (at your option) any later version.
[1359]8!
[4677]9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11! Public License for more details.
[1359]12!
[4677]13! You should have received a copy of the GNU General Public License along with PALM. If not, see
14! <http://www.gnu.org/licenses/>.
[1359]15!
[4828]16! Copyright 1997-2021 Leibniz Universitaet Hannover
[4677]17!--------------------------------------------------------------------------------------------------!
[1359]18!
19! Current revisions:
20! ------------------
[4628]21!
22!
[1360]23! Former revisions:
24! -----------------
25! $Id: mod_particle_attributes.f90 4828 2021-01-05 11:21:41Z banzhafs $
[4778]26! variables for particle output renamed, id counter removed from particle type
27!
28! 4677 2020-09-14 07:55:28Z raasch
[4677]29! file re-formatted to follow the PALM coding standard
30!
31! 4628 2020-07-29 07:23:03Z raasch
[4628]32! extensions required for MPI-I/O of particle data to restart files
[4677]33!
[4628]34! 4360 2020-01-07 11:25:50Z suehring
[4182]35! Corrected "Former revisions" section
[4677]36!
[4182]37! 4043 2019-06-18 16:59:00Z schwenkel
[4043]38! Remove min_nr_particle
[4677]39!
[4043]40! 4017 2019-06-06 12:16:46Z schwenkel
[3786]41! interoperable C datatypes introduced in particle type to avoid compiler warnings
[4677]42!
[3786]43! 3720 2019-02-06 13:19:55Z knoop
[3560]44! time_prel replaced by last_particle_release_time
[4677]45!
[4182]46! 1359 2014-04-11 17:15:14Z hoffmann
47! new module containing all particle related variables
48! -dt_sort_particles
[2716]49!
[1359]50! Description:
51! ------------
[1682]52!> Definition of variables used to compute particle transport
[4677]53!--------------------------------------------------------------------------------------------------!
54 MODULE particle_attributes
[1359]55
[3405]56    USE, INTRINSIC ::  ISO_C_BINDING
[2312]57
[4628]58    USE control_parameters,                                                                        &
59        ONLY: varnamelength
60
[1359]61    USE kinds
62
[4677]63    INTEGER(iwp), PARAMETER ::  max_number_of_particle_groups = 10 !< maximum allowed number of particle groups
64
[4778]65    CHARACTER(LEN=64)                           ::  pts_id_file = ''  !< namelist parameter
66    CHARACTER(LEN=varnamelength), DIMENSION(50) ::  data_output_pts = ''    !< namelist parameter
[4628]67
[2265]68    INTEGER(iwp) ::  dissipation_classes = 10                     !< namelist parameter (see documentation)
[2263]69    INTEGER(iwp) ::  ibc_par_b                                    !< particle bottom boundary condition dummy
70    INTEGER(iwp) ::  ibc_par_lr                                   !< particle left/right boundary condition dummy
71    INTEGER(iwp) ::  ibc_par_ns                                   !< particle north/south boundary condition dummy
72    INTEGER(iwp) ::  ibc_par_t                                    !< particle top boundary condition dummy
[4628]73    INTEGER(iwp) ::  number_of_output_particles = 0               !< number of output particles
[4677]74    INTEGER(iwp) ::  number_of_particles = 0                      !< number of particles for each grid box (3d array is saved on
75                                                                  !< prt_count)
[2312]76    INTEGER(iwp) ::  number_of_particle_groups = 1                !< namelist parameter (see documentation)
[4778]77    INTEGER(iwp) ::  pts_increment = 1                            !< increment of particles in output file
[1359]78
[4677]79    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  prt_count  !< 3d array of number of particles of every grid box
[1359]80
[2263]81    LOGICAL ::  particle_advection = .FALSE.              !< parameter to steer the advection of particles
[4628]82    LOGICAL ::  unlimited_dimension = .TRUE.              !< umlimited dimension for particle output
[4677]83    LOGICAL ::  use_sgs_for_particles = .FALSE.           !< namelist parameter (see documentation)
[2263]84    LOGICAL ::  wang_kernel = .FALSE.                     !< flag for collision kernel
[2312]85
[4628]86    REAL(wp) ::  alloc_factor = 20.0_wp                   !< namelist parameter (see documentation)
[4677]87    REAL(wp) ::  oversize = 100.0_wp                      !< reserve spare particles in output file (in % relative to initial
88                                                          !< number)
[4628]89    REAL(wp) ::  particle_advection_start = 0.0_wp        !< namelist parameter (see documentation)
[4778]90    REAL(wp) ::  pts_percentage = 100.0_wp                !< percentage of particles in output file
[1359]91
[4628]92    TYPE, PUBLIC ::  particle_type
[4677]93        REAL(wp)     ::  aux1             !< auxiliary multi-purpose feature
94        REAL(wp)     ::  aux2             !< auxiliary multi-purpose feature
95        REAL(wp)     ::  radius           !< radius of particle
96        REAL(wp)     ::  age              !< age of particle
97        REAL(wp)     ::  age_m            !<
98        REAL(wp)     ::  dt_sum           !<
99        REAL(wp)     ::  e_m              !< interpolated sgs tke
100        REAL(wp)     ::  origin_x         !< origin x-position of particle (changed cyclic bc)
101        REAL(wp)     ::  origin_y         !< origin y-position of particle (changed cyclic bc)
102        REAL(wp)     ::  origin_z         !< origin z-position of particle (changed cyclic bc)
103        REAL(wp)     ::  rvar1            !<
104        REAL(wp)     ::  rvar2            !<
105        REAL(wp)     ::  rvar3            !<
106        REAL(wp)     ::  speed_x          !< speed of particle in x
107        REAL(wp)     ::  speed_y          !< speed of particle in y
108        REAL(wp)     ::  speed_z          !< speed of particle in z
109        REAL(wp)     ::  weight_factor    !< weighting factor
110        REAL(wp)     ::  x                !< x-position
111        REAL(wp)     ::  y                !< y-position
112        REAL(wp)     ::  z                !< z-position
113        INTEGER(iwp) ::  class            !< radius class needed for collision
114        INTEGER(iwp) ::  group            !< number of particle group
115        INTEGER(idp) ::  id               !< particle ID (64 bit integer)
116        LOGICAL      ::  particle_mask    !< if this parameter is set to false the particle will be deleted
117        INTEGER(iwp) ::  block_nr         !< number for sorting (removable?)
[4628]118        INTEGER(iwp) ::  particle_nr=-1   !< particle number for particle IO (increment one
[1359]119    END TYPE particle_type
120
[4778]121    TYPE(particle_type), DIMENSION(:), POINTER ::  particles      !< Particle array for this grid cell
122    TYPE(particle_type)                        ::  zero_particle  !< zero particle to avoid weird things
[1359]123
124    TYPE particle_groups_type
125        SEQUENCE
[2265]126        REAL(wp) ::  density_ratio  !< density ratio of the fluid and the particles
127        REAL(wp) ::  radius         !< radius of particle
128        REAL(wp) ::  exp_arg        !< exponential term of particle inertia
129        REAL(wp) ::  exp_term       !< exponential term of particle inertia
[1359]130    END TYPE particle_groups_type
131
[4677]132    TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) ::  particle_groups
[1359]133
134    TYPE  grid_particle_def
[4778]135        INTEGER(iwp), DIMENSION(0:7)               ::  start_index     !< start particle index for current block
136        INTEGER(iwp), DIMENSION(0:7)               ::  end_index       !< end particle index for current block
137        LOGICAL                                    ::  time_loop_done  !< timestep loop for particle advection
138        TYPE(particle_type), POINTER, DIMENSION(:) ::  particles       !< Particle array for this grid cell
[1359]139    END TYPE grid_particle_def
140
141    TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  grid_particles
142
[2265]143    TYPE block_offset_def          !<
144        INTEGER(iwp) ::  i_off     !<
145        INTEGER(iwp) ::  j_off     !<
146        INTEGER(iwp) ::  k_off     !<
[1359]147    END TYPE block_offset_def
148
149    TYPE(block_offset_def), DIMENSION(0:7)         ::  block_offset
150
151    SAVE
152
153
[4677]154 END MODULE particle_attributes
Note: See TracBrowser for help on using the repository browser.