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

Last change on this file since 1929 was 1929, checked in by suehring, 8 years ago

several bugfixes in particle model and serial mode

  • Property svn:keywords set to Id
File size: 8.2 KB
Line 
1!> @file mod_particle_attributes.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2014  Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! ------------------
21! -sgs_wfu_par, sgs_wfv_par, sgs_wfw_par
22! + sgs_wf_par
23!
24! Former revisions:
25! -----------------
26! $Id: mod_particle_attributes.f90 1929 2016-06-09 16:25:25Z suehring $
27!
28! 1871 2016-04-15 11:46:09Z hoffmann
29! Initialization of aerosols added.
30!
31! 1849 2016-04-08 11:33:18Z hoffmann
32! bfactor, mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water,
33! vanthoff added from modules
34!
35! 1831 2016-04-07 13:15:51Z hoffmann
36! palm_kernel removed, curvature_solution_effects added
37!
38! 1822 2016-04-07 07:49:42Z hoffmann
39! +collision_algorithm, all_or_nothing, average_impact
40! Tails removed.
41!
42! 1727 2015-11-20 07:22:02Z knoop
43! Bugfix: Cause of syntax warning gfortran preprocessor removed
44!
45! 1682 2015-10-07 23:56:08Z knoop
46! Code annotations made doxygen readable
47!
48! 1575 2015-03-27 09:56:27Z raasch
49! +seed_follows_topography
50!
51! 1359 2014-04-11 17:15:14Z hoffmann
52! new module containing all particle related variables
53! -dt_sort_particles
54!
55! Description:
56! ------------
57!> Definition of variables used to compute particle transport
58!------------------------------------------------------------------------------!
59MODULE particle_attributes
60 
61
62    USE kinds
63
64    CHARACTER(LEN=15) ::  bc_par_lr = 'cyclic'                    !< left/right boundary condition
65    CHARACTER(LEN=15) ::  bc_par_ns = 'cyclic'                    !< north/south boundary condition
66    CHARACTER(LEN=15) ::  bc_par_b  = 'reflect'                   !< bottom boundary condition
67    CHARACTER(LEN=15) ::  bc_par_t  = 'absorb'                    !< top boundary condition
68    CHARACTER(LEN=15) ::  collision_algorithm = 'all_or_nothing'  !< collision algorithm
69    CHARACTER(LEN=15) ::  collision_kernel = 'none'               !< collision kernel
70
71    INTEGER(iwp) ::  deleted_particles = 0,                                    &
72                     dissipation_classes = 10, ibc_par_lr,                     &
73                     ibc_par_ns, ibc_par_b, ibc_par_t, iran_part = -1234567,   &
74                     maximum_number_of_particles = 0,                          &
75                     min_nr_particle = 50,                                     &
76                     mpi_particle_type,                                        &
77                     number_of_particles = 0,                                  &
78                     number_of_particle_groups = 1,                            &
79                     number_of_sublayers = 20,                                 &
80                     offset_ocean_nzt = 0,                                     &
81                     offset_ocean_nzt_m1 = 0, particles_per_point = 1,         &
82                     particle_file_count = 0, radius_classes = 20,             &
83                     sort_count = 0,                                           &
84                     total_number_of_particles,                                &
85                     trlp_count_sum, trlp_count_recv_sum, trrp_count_sum,      &
86                     trrp_count_recv_sum, trsp_count_sum, trsp_count_recv_sum, &
87                     trnp_count_sum, trnp_count_recv_sum
88
89    INTEGER(iwp), PARAMETER ::  max_number_of_particle_groups = 10
90
91    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  prt_count
92
93    LOGICAL ::  all_or_nothing = .FALSE., average_impact = .FALSE.,            &
94                curvature_solution_effects = .FALSE.,                          &
95                hall_kernel = .FALSE., particle_advection = .FALSE.,           &
96                random_start_position = .FALSE.,                               &
97                read_particles_from_restartfile = .TRUE.,                      &
98                seed_follows_topography = .FALSE.,                             &
99                uniform_particles = .TRUE., use_kernel_tables = .FALSE.,       &
100                use_sgs_for_particles = .FALSE., wang_kernel = .FALSE.,        &
101                write_particle_statistics = .FALSE.
102
103    LOGICAL, DIMENSION(max_number_of_particle_groups) ::                       &
104                vertical_particle_advection = .TRUE.
105
106    REAL(wp) ::  alloc_factor = 20.0_wp, c_0 = 3.0_wp,                         &
107                 dt_min_part = 0.0002_wp, dt_prel = 9999999.9_wp,              &
108                 dt_write_particle_data = 9999999.9_wp,                        &
109                 end_time_prel = 9999999.9_wp,                                 &
110                 initial_weighting_factor = 1.0_wp,                            &
111                 particle_advection_start = 0.0_wp,                            &
112                 sgs_wf_part, time_prel = 0.0_wp, time_sort_particles = 0.0_wp,&
113                 time_write_particle_data = 0.0_wp, z0_av_global
114
115    REAL(wp), DIMENSION(max_number_of_particle_groups) ::                      &
116                 density_ratio = 9999999.9_wp, pdx = 9999999.9_wp,             &
117                 pdy = 9999999.9_wp, pdz = 9999999.9_wp, psb = 9999999.9_wp,   &
118                 psl = 9999999.9_wp, psn = 9999999.9_wp, psr = 9999999.9_wp,   &
119                 pss = 9999999.9_wp, pst = 9999999.9_wp, radius = 9999999.9_wp
120
121    REAL(wp), DIMENSION(:), ALLOCATABLE     ::  log_z_z0
122
123    TYPE particle_type
124        SEQUENCE
125        REAL(wp)     ::  radius, age, age_m, dt_sum, dvrp_psize, e_m,          &
126                         origin_x, origin_y, origin_z, rvar1, rvar2, rvar3,    &
127                         speed_x, speed_y, speed_z, weight_factor, x, y, z
128        INTEGER(iwp) ::  class, group, tailpoints, tail_id
129        LOGICAL      ::  particle_mask
130        INTEGER(iwp) ::  block_nr
131    END TYPE particle_type
132
133    TYPE(particle_type), DIMENSION(:), POINTER ::  particles
134    TYPE(particle_type)                        ::  zero_particle
135
136    TYPE particle_groups_type
137        SEQUENCE
138        REAL(wp) ::  density_ratio, radius, exp_arg, exp_term
139    END TYPE particle_groups_type
140
141    TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) ::    &
142       particle_groups
143
144    TYPE  grid_particle_def
145        INTEGER(iwp), DIMENSION(0:7)               ::  start_index
146        INTEGER(iwp), DIMENSION(0:7)               ::  end_index
147        LOGICAL                                    ::  time_loop_done
148        TYPE(particle_type), POINTER, DIMENSION(:) ::  particles                !Particle array for this grid cell
149    END TYPE grid_particle_def
150
151    TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  grid_particles
152
153    TYPE block_offset_def
154        INTEGER(iwp) ::  i_off
155        INTEGER(iwp) ::  j_off
156        INTEGER(iwp) ::  k_off
157    END TYPE block_offset_def
158
159    TYPE(block_offset_def), DIMENSION(0:7)         ::  block_offset
160
161!
162!-- Lagrangian cloud model constants (especially for steering aerosols)
163    REAL(wp) ::  molecular_weight_of_solute = 0.05844_wp    !< mol. m. NaCl (kg mol-1)
164    REAL(wp) ::  molecular_weight_of_water = 0.01801528_wp  !< mol. m. H2O (kg mol-1)
165    REAL(wp) ::  rho_s = 2165.0_wp                          !< density of NaCl (kg m-3)
166    REAL(wp) ::  vanthoff = 2.0_wp                          !< van't Hoff factor for NaCl
167
168    REAL(wp) ::  n1 = 100.0_wp, s1 = 2.0_wp, rm1 = 0.05E-6_wp, &
169                 n2 =   0.0_wp, s2 = 2.0_wp, rm2 = 0.05E-6_wp, &
170                 n3 =   0.0_wp, s3 = 2.0_wp, rm3 = 0.05E-6_wp
171
172    LOGICAL  ::  monodisperse_aerosols      = .FALSE.       !< initialize monodisperse aerosols
173    LOGICAL  ::  init_aerosol_probabilistic = .FALSE.       !< how to initialize aerosol spectra
174
175    SAVE
176
177
178END MODULE particle_attributes
179
Note: See TracBrowser for help on using the repository browser.