Changeset 2417 for palm/trunk/SOURCE/lpm.f90
- Timestamp:
- Sep 6, 2017 3:22:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/lpm.f90
r2263 r2417 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Major bugfixes in modeling SGS particle speeds (since revision 1359). 28 ! Particle sorting added to distinguish between already completed and 29 ! non-completed particles. 30 ! 31 ! 2263 2017-06-08 14:59:01Z schwenkel 27 32 ! Implemented splitting and merging algorithm 28 33 ! … … 140 145 141 146 USE lpm_pack_arrays_mod, & 142 ONLY: lpm_pack_all_arrays 147 ONLY: lpm_pack_all_arrays, lpm_sort 143 148 144 149 USE particle_attributes, & … … 259 264 CALL cpu_log( log_point_s(44), 'lpm_advec', 'pause' ) 260 265 261 grid_particles(:,:,:)%time_loop_done = .TRUE.262 266 ! 263 267 !-- If particle advection includes SGS velocity components, calculate the … … 265 269 !-- horizontally averaged profiles of the SGS TKE and the resolved-scale 266 270 !-- velocity variances) 267 268 271 IF ( use_sgs_for_particles .AND. .NOT. cloud_droplets ) THEN 269 272 CALL lpm_init_sgs_tke 270 273 ENDIF 274 275 ! 276 !-- In case SGS-particle speed is considered, particles may carry out 277 !-- several particle timesteps. In order to prevent unnecessary 278 !-- treatment of particles that already reached the final time level, 279 !-- particles are sorted into contiguous blocks of finished and 280 !-- not-finished particles, in addition to their already sorting 281 !-- according to their sub-boxes. 282 IF ( .NOT. first_loop_stride .AND. use_sgs_for_particles ) & 283 CALL lpm_sort 271 284 272 285 DO i = nxl, nxr … … 323 336 !-- optimization is still possible.) 324 337 IF ( topography /= 'flat' .AND. k < nzb_max + 2 ) THEN 325 CALL lpm_boundary_conds( 'walls' ) 338 CALL lpm_boundary_conds( 'walls' )!, i, j, k ) 326 339 ENDIF 327 340 ! … … 333 346 !-- the top or bottom boundary and delete those particles, which are 334 347 !-- older than allowed 335 CALL lpm_boundary_conds( 'bottom/top' ) 348 CALL lpm_boundary_conds( 'bottom/top' ) !, i, j, k ) 336 349 ! 337 350 !--- If not all particles of the actual grid cell have reached the 338 !-- LES timestep, this cell has to to another loop iteration. Due to 339 !-- the fact that particles can move into neighboring grid cell, 340 !-- these neighbor cells also have to perform another loop iteration 351 !-- LES timestep, this cell has to do another loop iteration. Due to 352 !-- the fact that particles can move into neighboring grid cells, 353 !-- these neighbor cells also have to perform another loop iteration. 354 !-- Please note, this realization does not work properly if 355 !-- particles move into another subdomain. 341 356 IF ( .NOT. dt_3d_reached_l ) THEN 342 ks = MAX(nzb+1,k )343 ke = MIN(nzt,k )344 js = MAX(nys,j )345 je = MIN(nyn,j )346 is = MAX(nxl,i )347 ie = MIN(nxr,i )357 ks = MAX(nzb+1,k-1) 358 ke = MIN(nzt,k+1) 359 js = MAX(nys,j-1) 360 je = MIN(nyn,j+1) 361 is = MAX(nxl,i-1) 362 ie = MIN(nxr,i+1) 348 363 grid_particles(ks:ke,js:je,is:ie)%time_loop_done = .FALSE. 364 ELSE 365 grid_particles(k,j,i)%time_loop_done = .TRUE. 349 366 ENDIF 350 367 … … 392 409 !-- determine new number of particles 393 410 CALL lpm_pack_all_arrays 394 395 411 ! 396 412 !-- Initialize variables for the next (sub-) timestep, i.e., for marking
Note: See TracChangeset
for help on using the changeset viewer.