Ignore:
Timestamp:
Jun 2, 2017 2:37:10 PM (7 years ago)
Author:
schwenkel
Message:

Bugfix in Add_particles_to_gridcell

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/lpm_exchange_horiz.f90

    r2151 r2245  
    2020! Current revisions:
    2121! ------------------
    22 !
    23 ! Bugfix in lpm_move_particle that prevents
    24 ! false production of additional particles
     22!
    2523!
    2624! Former revisions:
    2725! -----------------
    2826! $Id$
     27! Bugfix in Add_particles_to_gridcell:
     28! Apply boundary conditions also in y-direction
     29!
     30! 2151 2017-02-15 10:42:16Z schwenkel
     31! Bugfix in lpm_move_particle that prevents
     32! false production of additional particles
    2933!
    3034! 2000 2016-08-20 18:09:15Z knoop
     
    880884
    881885             IF ( jp == -1 )  THEN
    882                 move_also_south(nr_move_south)%y =                             &
    883                    move_also_south(nr_move_south)%y + ( ny + 1 ) * dy
    884                 move_also_south(nr_move_south)%origin_y =                      &
    885                    move_also_south(nr_move_south)%origin_y + ( ny + 1 ) * dy
     886!
     887!--             Apply boundary condition along y
     888                IF ( ibc_par_ns == 0 )  THEN
     889                   move_also_south(nr_move_south)%y =                          &
     890                      move_also_south(nr_move_south)%y + ( ny + 1 ) * dy
     891                   move_also_south(nr_move_south)%origin_y =                   &
     892                      move_also_south(nr_move_south)%origin_y + ( ny + 1 ) * dy
     893                ELSEIF ( ibc_par_ns == 1 )  THEN
     894!
     895!--                Particle absorption
     896                   move_also_south(nr_move_south)%particle_mask = .FALSE.
     897                   deleted_particles = deleted_particles + 1
     898
     899                ELSEIF ( ibc_par_ns == 2 )  THEN
     900!
     901!--                Particle reflection
     902                   move_also_south(nr_move_south)%y       =                    &
     903                      -move_also_south(nr_move_south)%y
     904                   move_also_south(nr_move_south)%speed_y =                    &
     905                      -move_also_south(nr_move_south)%speed_y
     906
     907                ENDIF
    886908             ENDIF
    887909          ELSEIF ( jp >= nyn+1 )  THEN
     
    906928             move_also_north(nr_move_north) = particle_array(n)
    907929             IF ( jp == ny+1 )  THEN
    908                 move_also_north(nr_move_north)%y =                             &
    909                    move_also_north(nr_move_north)%y - ( ny + 1 ) * dy
    910                 move_also_north(nr_move_north)%origin_y =                      &
    911                    move_also_north(nr_move_north)%origin_y - ( ny + 1 ) * dy
     930!
     931!--             Apply boundary condition along y
     932                IF ( ibc_par_ns == 0 )  THEN
     933
     934                   move_also_north(nr_move_north)%y =                          &
     935                      move_also_north(nr_move_north)%y - ( ny + 1 ) * dy
     936                   move_also_north(nr_move_north)%origin_y =                   &
     937                      move_also_north(nr_move_north)%origin_y - ( ny + 1 ) * dy
     938                ELSEIF ( ibc_par_ns == 1 )  THEN
     939!
     940!--                Particle absorption
     941                   move_also_north(nr_move_north)%particle_mask = .FALSE.
     942                   deleted_particles = deleted_particles + 1
     943
     944                ELSEIF ( ibc_par_ns == 2 )  THEN
     945!
     946!--                Particle reflection
     947                   move_also_north(nr_move_north)%y       =                    &
     948                      -move_also_north(nr_move_north)%y
     949                   move_also_north(nr_move_north)%speed_y =                    &
     950                      -move_also_north(nr_move_north)%speed_y
     951
     952                ENDIF
    912953             ENDIF
    913954          ELSE
Note: See TracChangeset for help on using the changeset viewer.