MODULE particle_attributes !--------------------------------------------------------------------------------! ! This file is part of PALM. ! ! PALM is free software: you can redistribute it and/or modify it under the terms ! of the GNU General Public License as published by the Free Software Foundation, ! either version 3 of the License, or (at your option) any later version. ! ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License along with ! PALM. If not, see . ! ! Copyright 1997-2014 Leibniz Universitaet Hannover !--------------------------------------------------------------------------------! ! ! Current revisions: ! ------------------ ! ! ! Former revisions: ! ----------------- ! $Id: mod_particle_attributes.f90 1360 2014-04-11 17:20:32Z letzel $ ! ! 1359 2014-04-11 17:15:14Z hoffmann ! new module containing all particle related variables ! -dt_sort_particles ! ! Description: ! ------------ ! Definition of variables used to compute particle transport !------------------------------------------------------------------------------! USE kinds CHARACTER(LEN=15) :: bc_par_lr = 'cyclic', bc_par_ns = 'cyclic', & bc_par_b = 'reflect', bc_par_t = 'absorb', & collision_kernel = 'none' INTEGER(iwp) :: deleted_particles = 0, deleted_tails = 0, & dissipation_classes = 10, ibc_par_lr, & ibc_par_ns, ibc_par_b, ibc_par_t, iran_part = -1234567, & maximum_number_of_particles = 0, & maximum_number_of_tailpoints = 100, & maximum_number_of_tails = 0, & min_nr_particle = 50, & mpi_particle_type, & number_of_particles = 0, & number_of_particle_groups = 1, number_of_tails = 0, & number_of_initial_tails = 0, number_of_sublayers = 20, & offset_ocean_nzt = 0, & offset_ocean_nzt_m1 = 0, particles_per_point = 1, & particle_file_count = 0, radius_classes = 20, & skip_particles_for_tail = 100, sort_count = 0, & total_number_of_particles, total_number_of_tails = 0, & trlp_count_sum, trlp_count_recv_sum, trrp_count_sum, & trrp_count_recv_sum, trsp_count_sum, trsp_count_recv_sum, & trnp_count_sum, trnp_count_recv_sum INTEGER(iwp), PARAMETER :: max_number_of_particle_groups = 10 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: new_tail_id INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE :: prt_count LOGICAL :: hall_kernel = .FALSE., palm_kernel = .FALSE., & particle_advection = .FALSE., random_start_position = .FALSE., & read_particles_from_restartfile = .TRUE., & uniform_particles = .TRUE., use_kernel_tables = .FALSE., & use_particle_tails = .FALSE., use_sgs_for_particles = .FALSE., & wang_kernel = .FALSE., write_particle_statistics = .FALSE. LOGICAL, DIMENSION(max_number_of_particle_groups) :: & vertical_particle_advection = .TRUE. LOGICAL, DIMENSION(:), ALLOCATABLE :: tail_mask REAL(wp) :: alloc_factor = 20.0_wp, c_0 = 3.0_wp, & dt_min_part = 0.0002_wp, dt_prel = 9999999.9_wp, & dt_write_particle_data = 9999999.9_wp, & dvrp_psize = 9999999.9_wp, end_time_prel = 9999999.9_wp, & initial_weighting_factor = 1.0_wp, & maximum_tailpoint_age = 100000.0_wp, & minimum_tailpoint_distance = 0.0_wp, & particle_advection_start = 0.0_wp, & sgs_wfu_part = 0.3333333_wp, sgs_wfv_part = 0.3333333_wp, & sgs_wfw_part = 0.3333333_wp, time_prel = 0.0_wp, & time_sort_particles = 0.0_wp, & time_write_particle_data = 0.0_wp, z0_av_global REAL(wp), DIMENSION(max_number_of_particle_groups) :: & density_ratio = 9999999.9_wp, pdx = 9999999.9_wp, & pdy = 9999999.9_wp, pdz = 9999999.9_wp, psb = 9999999.9_wp, & psl = 9999999.9_wp, psn = 9999999.9_wp, psr = 9999999.9_wp, & pss = 9999999.9_wp, pst = 9999999.9_wp, radius = 9999999.9_wp REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: particle_tail_coordinates REAL(wp), DIMENSION(:), ALLOCATABLE :: log_z_z0 TYPE particle_type SEQUENCE #if defined( __twocachelines ) REAL(wp) :: radius REAL(sp) :: x, y, z, speed_x, speed_y, speed_z REAL(wp) :: weight_factor, rvar1, dt_sum INTEGER(iwp) :: class LOGICAL :: particle_mask REAL(wp) :: dvrp_psize, rvar2, rvar3 REAL(sp) :: age, origin_x, origin_y, origin_z, e_m, age_m INTEGER(iwp) :: group, tailpoints, tail_id, block_nr #else REAL(wp) :: radius, age, age_m, dt_sum, dvrp_psize, e_m, & origin_x, origin_y, origin_z, rvar1, rvar2, rvar3, & speed_x, speed_y, speed_z, weight_factor, x, y, z INTEGER(iwp) :: class, group, tailpoints, tail_id LOGICAL :: particle_mask INTEGER(iwp) :: block_nr #endif !One 32 Bit word for 64 Bit alignment in Type declaration END TYPE particle_type TYPE(particle_type), DIMENSION(:), POINTER :: particles TYPE(particle_type) :: zero_particle TYPE particle_groups_type SEQUENCE REAL(wp) :: density_ratio, radius, exp_arg, exp_term END TYPE particle_groups_type TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) :: & particle_groups TYPE grid_particle_def INTEGER(iwp), DIMENSION(0:7) :: start_index INTEGER(iwp), DIMENSION(0:7) :: end_index LOGICAL :: time_loop_done TYPE(particle_type), POINTER, DIMENSION(:) :: particles !Particle array for this grid cell END TYPE grid_particle_def TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: grid_particles TYPE block_offset_def INTEGER(iwp) :: i_off INTEGER(iwp) :: j_off INTEGER(iwp) :: k_off END TYPE block_offset_def TYPE(block_offset_def), DIMENSION(0:7) :: block_offset SAVE END MODULE particle_attributes