Changeset 790


Ignore:
Timestamp:
Nov 29, 2011 3:11:20 AM (10 years ago)
Author:
raasch
Message:

Bugfix for output of mean particle radius + preliminary works for implementing the Wang collision kernel

Location:
palm/trunk/SOURCE
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r668 r790  
    44# Current revisions:
    55# ------------------
     6# +wang_kernel
    67#
    78# Former revisions:
     
    104105        user_particle_attributes.f90 user_read_restart_data.f90 \
    105106        user_spectra.f90 user_statistics.f90 wall_fluxes.f90 \
    106         write_3d_binary.f90 write_compressed.f90 write_var_list.f90
     107        wang_kernel.f90 write_3d_binary.f90 write_compressed.f90 \
     108        write_var_list.f90
    107109
    108110OBJS =  advec_particles.o advec_s_bc.o advec_s_pw.o advec_s_up.o \
     
    146148        user_module.o user_parin.o user_particle_attributes.o \
    147149        user_read_restart_data.o user_spectra.o user_statistics.o \
    148         wall_fluxes.o write_3d_binary.o write_compressed.o write_var_list.o
     150        wall_fluxes.o wang_kernel.o write_3d_binary.o write_compressed.o \
     151        write_var_list.o
    149152
    150153CC = cc
     
    175178
    176179
    177 advec_particles.o: modules.o random_function.o
     180advec_particles.o: modules.o random_function.o wang_kernel.o
    178181advec_s_bc.o: modules.o
    179182advec_s_pw.o: modules.o
     
    322325user_statistics.o: modules.o user_module.o
    323326wall_fluxes.o: modules.o
     327wang_kernel.o: modules.o user_module.o
    324328write_3d_binary.o: modules.o random_function.o
    325329write_compressed.o: modules.o
  • palm/trunk/SOURCE/data_output_2d.f90

    r772 r790  
    44! Current revisions:
    55! -----------------
     6! bugfix: calculation of 'pr' must depend on the particle weighting factor
    67!
    78! Former revisions:
     
    303304                               s_r4 = 0.0
    304305                               DO  n = psi, psi+prt_count(k,j,i)-1
    305                                   s_r3 = s_r3 + particles(n)%radius**3
    306                                   s_r4 = s_r4 + particles(n)%radius**4
     306                                  s_r3 = s_r3 + particles(n)%radius**3 * &
     307                                                particles(n)%weight_factor
     308                                  s_r4 = s_r4 + particles(n)%radius**4 * &
     309                                                particles(n)%weight_factor
    307310                               ENDDO
    308311                               IF ( s_r3 /= 0.0 )  THEN
  • palm/trunk/SOURCE/data_output_3d.f90

    r772 r790  
    44! Current revisions:
    55! -----------------
     6! bugfix: calculation of 'pr' must depend on the particle weighting factor,
     7! nzt+1 replaced by nz_do3d for 'pr'
    68!
    79! Former revisions:
     
    207209                DO  i = nxl, nxr
    208210                   DO  j = nys, nyn
    209                       DO  k = nzb, nzt+1
     211                      DO  k = nzb, nz_do3d
    210212                         psi = prt_start_index(k,j,i)
    211213                         s_r3 = 0.0
    212214                         s_r4 = 0.0
    213215                         DO  n = psi, psi+prt_count(k,j,i)-1
    214                             s_r3 = s_r3 + particles(n)%radius**3
    215                             s_r4 = s_r4 + particles(n)%radius**4
     216                         s_r3 = s_r3 + particles(n)%radius**3 * &
     217                                       particles(n)%weight_factor
     218                         s_r4 = s_r4 + particles(n)%radius**4 * &
     219                                       particles(n)%weight_factor
    216220                         ENDDO
    217221                         IF ( s_r3 /= 0.0 )  THEN
     
    227231                DO  i = nxlg, nxrg
    228232                   DO  j = nysg, nyng
    229                       DO  k = nzb, nzt+1
     233                      DO  k = nzb, nz_do3d
    230234                         local_pf(i,j,k) = tend(k,j,i)
    231235                      ENDDO
  • palm/trunk/SOURCE/diffusion_e.f90

    r668 r790  
    44! Current revisions:
    55! -----------------
     6! diss is also calculated in case that the Wang kernel is used
    67!
    78! Former revisions:
     
    160161!--          Store dissipation if needed for calculating the sgs particle
    161162!--          velocities
    162              IF ( use_sgs_for_particles )  THEN
     163             IF ( use_sgs_for_particles  .OR.  wang_collision_kernel )  THEN
    163164                DO  j = nys, nyn
    164165                   DO  k = nzb_s_inner(j,i)+1, nzt
     
    250251!--          Store dissipation if needed for calculating the sgs particle
    251252!--          velocities
    252              IF ( use_sgs_for_particles )  THEN
     253             IF ( use_sgs_for_particles  .OR.  wang_collision_kernel )  THEN
    253254                DO  j = nys, nyn
    254255                   DO  k = nzb_s_inner(j,i)+1, nzt
     
    264265!
    265266!--    Boundary condition for dissipation
    266        IF ( use_sgs_for_particles )  THEN
     267       IF ( use_sgs_for_particles  .OR.  wang_collision_kernel )  THEN
    267268          DO  i = nxl, nxr
    268269             DO  j = nys, nyn
     
    368369!
    369370!--    Store dissipation if needed for calculating the sgs particle velocities
    370        IF ( use_sgs_for_particles )  THEN
     371       IF ( use_sgs_for_particles  .OR.  wang_collision_kernel )  THEN
    371372          DO  k = nzb_s_inner(j,i)+1, nzt
    372373             diss(k,j,i) = dissipation(k)
  • palm/trunk/SOURCE/init_3d_model.f90

    r788 r790  
    77! Current revisions:
    88! ------------------
    9 !
     9! diss is also allocated in case that the Wang kernel is used
    1010!
    1111! Former revisions:
     
    331331!-- 3D-array for storing the dissipation, needed for calculating the sgs
    332332!-- particle velocities
    333     IF ( use_sgs_for_particles )  THEN
     333    IF ( use_sgs_for_particles  .OR.  wang_collision_kernel )  THEN
    334334       ALLOCATE ( diss(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    335335    ELSE
  • palm/trunk/SOURCE/modules.f90

    r786 r790  
    55! Current revisions:
    66! -----------------
    7 !
     7! +turbulence_effects_on_collision, wang_collision_kernel
    88!
    99! Former revisions:
     
    11701170    INTEGER, DIMENSION(:,:,:), ALLOCATABLE ::  prt_count, prt_start_index
    11711171
    1172     LOGICAL ::  particle_advection = .FALSE., random_start_position = .FALSE., &
     1172    LOGICAL ::  turbulence_effects_on_collision = .FALSE.,                     &
     1173                particle_advection = .FALSE., random_start_position = .FALSE., &
    11731174                read_particles_from_restartfile = .TRUE.,                      &
    11741175                uniform_particles = .TRUE., use_particle_tails = .FALSE.,      &
    11751176                use_sgs_for_particles = .FALSE.,                               &
     1177                wang_collision_kernel = .FALSE.,                               &
    11761178                write_particle_statistics = .FALSE.
    11771179
  • palm/trunk/SOURCE/package_parin.f90

    r484 r790  
    44! Current revisions:
    55! -----------------
    6 !
     6! +turbulence_effects_on_collision, wang_collision_kernel in particles_par
    77!
    88! Former revisions:
     
    8383                                  random_start_position,                       &
    8484                                  read_particles_from_restartfile,             &
    85                                   skip_particles_for_tail, use_particle_tails, &
    86                                   use_sgs_for_particles,                       &
     85                                  skip_particles_for_tail,                     &
     86                                  turbulence_effects_on_collision,             &
     87                                  use_particle_tails, use_sgs_for_particles,   &
    8788                                  vertical_particle_advection,                 &
     89                                  wang_collision_kernel,                       &
    8890                                  write_particle_statistics
    8991    NAMELIST /spectra_par/        averaging_interval_sp, comp_spectra_level,   &
  • palm/trunk/SOURCE/sum_up_3d_data.f90

    r772 r790  
    44! Current revisions:
    55! -----------------
     6! bugfix: calculation of 'pr' must depend on the particle weighting factor
    67!
    78! Former revisions:
     
    295296                      s_r4 = 0.0
    296297                      DO  n = psi, psi+prt_count(k,j,i)-1
    297                          s_r3 = s_r3 + particles(n)%radius**3
    298                          s_r4 = s_r4 + particles(n)%radius**4
     298                         s_r3 = s_r3 + particles(n)%radius**3 * &
     299                                       particles(n)%weight_factor
     300                         s_r4 = s_r4 + particles(n)%radius**4 * &
     301                                       particles(n)%weight_factor
    299302                      ENDDO
    300303                      IF ( s_r3 /= 0.0 )  THEN
  • palm/trunk/SOURCE/time_integration.f90

    r708 r790  
    44! Current revisions:
    55! -----------------
    6 !
     6! exchange of ghostpoints for array diss
    77!
    88! Former revisions:
     
    208208             CALL exchange_horiz( prho, nbgp )
    209209          ENDIF
    210           IF (humidity  .OR.  passive_scalar) CALL exchange_horiz( q_p, nbgp )
     210          IF (humidity  .OR.  passive_scalar)  CALL exchange_horiz( q_p, nbgp )
    211211          IF ( cloud_droplets )  THEN
    212212             CALL exchange_horiz( ql, nbgp )
     
    215215             CALL exchange_horiz( ql_vp, nbgp )
    216216          ENDIF
     217          IF ( wang_collision_kernel )  CALL exchange_horiz( diss, nbgp )
    217218
    218219          CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'stop' )
  • palm/trunk/SOURCE/write_3d_binary.f90

    r777 r790  
    44! Current revisions:
    55! -----------------
     6! bugfix: output of 'ql' also if cloud droplets are used
    67!
    78! Former revisions:
     
    141142       ENDIF
    142143       WRITE ( 14 )  'q_m                 ';  WRITE ( 14 ) q_m
    143        IF ( cloud_physics ) THEN
     144       IF ( cloud_physics  .OR.  cloud_droplets ) THEN
    144145          WRITE ( 14 )  'ql                  ';  WRITE ( 14 ) ql
    145146          IF ( ALLOCATED( ql_av ) )  THEN
Note: See TracChangeset for help on using the changeset viewer.