source: palm/trunk/SOURCE/mod_particle_attributes.f90 @ 1359

Last change on this file since 1359 was 1359, checked in by hoffmann, 10 years ago

new Lagrangian particle structure integrated

File size: 7.3 KB
Line 
1MODULE particle_attributes
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2014  Leibniz Universitaet Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! ------------------
22! new module containing all particle related variables
23! -dt_sort_particles
24!
25! Former revisions:
26! -----------------
27! $Id: $
28!
29! Description:
30! ------------
31! Definition of variables used to compute particle transport
32!------------------------------------------------------------------------------!
33
34    USE kinds
35
36    CHARACTER(LEN=15) ::  bc_par_lr = 'cyclic',  bc_par_ns = 'cyclic',         &
37                          bc_par_b  = 'reflect', bc_par_t  = 'absorb',         &
38                          collision_kernel = 'none'
39
40    INTEGER(iwp) ::  deleted_particles = 0, deleted_tails = 0,                 &
41                     dissipation_classes = 10, ibc_par_lr,                     &
42                     ibc_par_ns, ibc_par_b, ibc_par_t, iran_part = -1234567,   &
43                     maximum_number_of_particles = 0,                          &
44                     maximum_number_of_tailpoints = 100,                       &
45                     maximum_number_of_tails = 0,                              &
46                     min_nr_particle = 50,                                     &
47                     mpi_particle_type,                                        &
48                     number_of_particles = 0,                                  &
49                     number_of_particle_groups = 1, number_of_tails = 0,       &
50                     number_of_initial_tails = 0, number_of_sublayers = 20,    &
51                     offset_ocean_nzt = 0,                                     &
52                     offset_ocean_nzt_m1 = 0, particles_per_point = 1,         &
53                     particle_file_count = 0, radius_classes = 20,             &
54                     skip_particles_for_tail = 100, sort_count = 0,            &
55                     total_number_of_particles, total_number_of_tails = 0,     &
56                     trlp_count_sum, trlp_count_recv_sum, trrp_count_sum,      &
57                     trrp_count_recv_sum, trsp_count_sum, trsp_count_recv_sum, &
58                     trnp_count_sum, trnp_count_recv_sum
59
60    INTEGER(iwp), PARAMETER ::  max_number_of_particle_groups = 10
61
62    INTEGER(iwp), DIMENSION(:), ALLOCATABLE     ::  new_tail_id
63    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  prt_count
64
65    LOGICAL ::  hall_kernel = .FALSE., palm_kernel = .FALSE.,                  &
66                particle_advection = .FALSE., random_start_position = .FALSE., &
67                read_particles_from_restartfile = .TRUE.,                      &
68                uniform_particles = .TRUE., use_kernel_tables = .FALSE.,       &
69                use_particle_tails = .FALSE., use_sgs_for_particles = .FALSE., &
70                wang_kernel = .FALSE., write_particle_statistics = .FALSE.
71
72    LOGICAL, DIMENSION(max_number_of_particle_groups) ::                       &
73                vertical_particle_advection = .TRUE.
74
75    LOGICAL, DIMENSION(:), ALLOCATABLE ::  tail_mask
76
77    REAL(wp) ::  alloc_factor = 20.0_wp, c_0 = 3.0_wp,                         &
78                 dt_min_part = 0.0002_wp, dt_prel = 9999999.9_wp,              &
79                 dt_write_particle_data = 9999999.9_wp,                        &
80                 dvrp_psize = 9999999.9_wp, end_time_prel = 9999999.9_wp,      &
81                 initial_weighting_factor = 1.0_wp,                            &
82                 maximum_tailpoint_age = 100000.0_wp,                          &
83                 minimum_tailpoint_distance = 0.0_wp,                          &
84                 particle_advection_start = 0.0_wp,                            &
85                 sgs_wfu_part = 0.3333333_wp, sgs_wfv_part = 0.3333333_wp,     &
86                 sgs_wfw_part = 0.3333333_wp, time_prel = 0.0_wp,              &
87                 time_sort_particles = 0.0_wp,                                 &
88                 time_write_particle_data = 0.0_wp, z0_av_global
89
90    REAL(wp), DIMENSION(max_number_of_particle_groups) ::                      &
91                 density_ratio = 9999999.9_wp, pdx = 9999999.9_wp,             &
92                 pdy = 9999999.9_wp, pdz = 9999999.9_wp, psb = 9999999.9_wp,   &
93                 psl = 9999999.9_wp, psn = 9999999.9_wp, psr = 9999999.9_wp,   &
94                 pss = 9999999.9_wp, pst = 9999999.9_wp, radius = 9999999.9_wp
95
96    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  particle_tail_coordinates
97
98    REAL(wp), DIMENSION(:), ALLOCATABLE     ::  log_z_z0
99
100    TYPE particle_type
101        SEQUENCE
102#if defined( __twocachelines )
103        REAL(wp)     ::  radius
104        REAL(sp)     ::  x, y, z, speed_x, speed_y, speed_z
105        REAL(wp)     ::  weight_factor, rvar1, dt_sum
106        INTEGER(iwp) ::  class
107        LOGICAL      ::  particle_mask
108
109        REAL(wp)     ::  dvrp_psize, rvar2, rvar3
110        REAL(sp)     ::  age, origin_x, origin_y, origin_z, e_m, age_m
111        INTEGER(iwp) ::  group, tailpoints, tail_id, block_nr
112#else
113        REAL(wp)     ::  radius, age, age_m, dt_sum, dvrp_psize, e_m,          &
114                         origin_x, origin_y, origin_z, rvar1, rvar2, rvar3,    &
115                         speed_x, speed_y, speed_z, weight_factor, x, y, z
116        INTEGER(iwp) ::  class, group, tailpoints, tail_id
117        LOGICAL      ::  particle_mask
118        INTEGER(iwp) ::  block_nr
119#endif                                                      !One 32 Bit word for 64 Bit alignment in Type declaration
120    END TYPE particle_type
121
122    TYPE(particle_type), DIMENSION(:), POINTER             ::  particles
123    TYPE(particle_type)                                    ::  zero_particle
124
125    TYPE particle_groups_type
126        SEQUENCE
127        REAL(wp) ::  density_ratio, radius, exp_arg, exp_term
128    END TYPE particle_groups_type
129
130    TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) ::    &
131       particle_groups
132
133    TYPE  grid_particle_def
134        INTEGER(iwp), DIMENSION(0:7)               ::  start_index
135        INTEGER(iwp), DIMENSION(0:7)               ::  end_index
136        LOGICAL                                    ::  time_loop_done
137        TYPE(particle_type), POINTER, DIMENSION(:) ::  particles                !Particle array for this grid cell
138    END TYPE grid_particle_def
139
140    TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  grid_particles
141
142    TYPE block_offset_def
143        INTEGER(iwp) ::  i_off
144        INTEGER(iwp) ::  j_off
145        INTEGER(iwp) ::  k_off
146    END TYPE block_offset_def
147
148    TYPE(block_offset_def), DIMENSION(0:7)         ::  block_offset
149
150    SAVE
151
152
153END MODULE particle_attributes
154
Note: See TracBrowser for help on using the repository browser.