Changeset 60


Ignore:
Timestamp:
Mar 11, 2007 11:50:04 AM (15 years ago)
Author:
raasch
Message:

preliminary update of further changes, running

Location:
palm/trunk/SOURCE
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r57 r60  
    2929+age_m in particle_type
    3030
     31Particles-package is now part of the default code ("-p particles" is not needed any more).
     32
    3133Move call of user_actions( 'after_integration' ) below increment of times
    3234and counters. user_actions is now called for each statistic region and has as an argument the number of the respective region (sr)
     
    3840__vtk directives removed from main program.
    3941
    40 check_parameters, data_output_ts, flow_statistics, init_particles, init_3d_model, modules, palm, parin, time_integration
     42check_parameters, data_output_dvrp, data_output_ptseries, data_output_ts, flow_statistics, header, init_particles, init_3d_model, modules, palm, package_parin, parin, time_integration
    4143
    4244
  • palm/trunk/SOURCE/advec_particles.f90

    r59 r60  
    77! particle_boundary_conds,
    88! vertical walls are regarded in the SGS model,
    9 ! + user_advec_particles
     9! + user_advec_particles, particles-package is now part of the defaut code
    1010! TEST: PRINT statements on unit 9 (commented out)
    1111!
     
    5050! Particle advection
    5151!------------------------------------------------------------------------------!
    52 #if defined( __particles )
    5352
    5453    USE arrays_3d
     
    6867    IMPLICIT NONE
    6968
    70     INTEGER ::  deleted_particles, deleted_tails, i, ie, ii, inc, is, j, jj,   &
    71                 js, k, kk, kw, m, n, nc, nn, psi, tlength, trlp_count,         &
    72                 trlp_count_sum, trlp_count_recv, trlp_count_recv_sum,          &
    73                 trlpt_count, trlpt_count_recv, trnp_count, trnp_count_sum,     &
    74                 trnp_count_recv, trnp_count_recv_sum, trnpt_count,             &
    75                 trnpt_count_recv, trrp_count, trrp_count_sum, trrp_count_recv, &
     69    INTEGER ::  agp, deleted_particles, deleted_tails, i, ie, ii, inc, is, j,  &
     70                jj, js, k, kk, kw, m, n, nc, nn, num_gp, psi, tlength,         &
     71                trlp_count, trlp_count_sum, trlp_count_recv,                   &
     72                trlp_count_recv_sum, trlpt_count, trlpt_count_recv,            &
     73                trnp_count, trnp_count_sum, trnp_count_recv,                   &
     74                trnp_count_recv_sum, trnpt_count, trnpt_count_recv,            &
     75                trrp_count, trrp_count_sum, trrp_count_recv,                   &
    7676                trrp_count_recv_sum, trrpt_count, trrpt_count_recv,            &
    7777                trsp_count, trsp_count_sum, trsp_count_recv,                   &
    7878                trsp_count_recv_sum, trspt_count, trspt_count_recv, nd
    7979
     80    INTEGER ::  gp_outside_of_building(1:8)
     81
    8082    LOGICAL ::  dt_3d_reached, dt_3d_reached_l, prt_position
    8183
    82     REAL    ::  aa, arg, bb, cc, dd, delta_r, dens_ratio, de_dx_int,           &
    83                 de_dx_int_l, de_dx_int_u, de_dy_int, de_dy_int_l, de_dy_int_u, &
    84                 de_dz_int, de_dz_int_l, de_dz_int_u, diss_int, diss_int_l,     &
    85                 diss_int_u, distance, dt_gap, dt_particle, d_radius, e_a,      &
    86                 e_int, e_int_l, e_int_u, e_mean_int, e_s, exp_arg, exp_term,   &
    87                 fs_int, gg, lagr_timescale, mean_r, new_r, p_int, pt_int,      &
    88                 pt_int_l, pt_int_u, q_int, q_int_l, q_int_u, ql_int, ql_int_l, &
    89                 ql_int_u, random_gauss, sl_r3, sl_r4, s_r3, s_r4, t_int,       &
    90                 u_int, u_int_l, u_int_u, vv_int, v_int, v_int_l, v_int_u,      &
    91                 w_int, w_int_l, w_int_u, x, y
     84    REAL    ::  aa, arg, bb, cc, dd, delta_r, dens_ratio, de_dt, de_dt_min,    &
     85                de_dx_int, de_dx_int_l, de_dx_int_u, de_dy_int, de_dy_int_l,   &
     86                de_dy_int_u, de_dz_int, de_dz_int_l, de_dz_int_u, diss_int,    &
     87                diss_int_l, diss_int_u, distance, dt_gap, dt_particle,         &
     88                dt_particle_m, d_radius, d_sum, e_a, e_int, e_int_l, e_int_u,  &
     89                e_mean_int, e_s, exp_arg, exp_term, fs_int, gg,                &
     90                lagr_timescale, mean_r, new_r, p_int, pt_int, pt_int_l,        &
     91                pt_int_u, q_int, q_int_l, q_int_u, ql_int, ql_int_l, ql_int_u, &
     92                random_gauss, sl_r3, sl_r4, s_r3, s_r4, t_int, u_int, u_int_l, &
     93                u_int_u, vv_int, v_int, v_int_l, v_int_u, w_int, w_int_l,      &
     94                w_int_u, x, y
     95
     96    REAL, DIMENSION(1:30) ::  de_dxi, de_dyi, de_dzi, dissi, d_gp_pl, ei
     97
     98    REAL    ::  location(1:30,1:3)
    9299
    93100    REAL, DIMENSION(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ::  de_dx, de_dy, de_dz
     
    16871694!--             previous timestep the increase must not exceed 200%
    16881695
    1689                 dt_particle_old = particles(n)%age - particles(n)%age_m
    1690                 IF ( dt_particle > 2.0 * dt_particle_old )  THEN
    1691                    dt_particle = 2.0 * dt_particle_old
     1696                dt_particle_m = particles(n)%age - particles(n)%age_m
     1697                IF ( dt_particle > 2.0 * dt_particle_m )  THEN
     1698                   dt_particle = 2.0 * dt_particle_m
    16921699                ENDIF
    16931700
     
    17031710                de_dt_min = - e_int / dt_particle
    17041711
    1705                 de_dt = ( e_int - particles(n)%e_m ) / dt_particle_old
     1712                de_dt = ( e_int - particles(n)%e_m ) / dt_particle_m
    17061713
    17071714                IF ( de_dt < de_dt_min )  THEN
     
    343634438000 FORMAT (I6,1X,F7.2,4X,I6,5X,4(I3,1X,I4,'/',I4,2X),6X,I6)
    34373444
    3438 #endif
    34393445 END SUBROUTINE advec_particles
    34403446
     
    34473453! Extend particle memory
    34483454!------------------------------------------------------------------------------!
    3449 #if defined( __particles )
    34503455
    34513456    USE particle_attributes
     
    34863491    DEALLOCATE( tmp_particles, tmp_particle_mask )
    34873492
    3488 #endif
    34893493 END SUBROUTINE allocate_prt_memory
    34903494
     
    34973501! Extend tail memory
    34983502!------------------------------------------------------------------------------!
    3499 #if defined( __particles )
    35003503
    35013504    USE particle_attributes
     
    35403543    tail_mask(number_of_tails+1:maximum_number_of_tails) = .TRUE.
    35413544
    3542 #endif
    35433545 END SUBROUTINE allocate_tail_memory
    35443546
     
    36693671! Write particle data on restart file
    36703672!------------------------------------------------------------------------------!
    3671 #if defined( __particles )
    36723673
    36733674    USE control_parameters
     
    37263727    CLOSE ( 90 )
    37273728
    3728 #endif
    37293729 END SUBROUTINE write_particles
    37303730
     
    37363736! Interpolate collision efficiency from table
    37373737!------------------------------------------------------------------------------!
    3738 #if defined( __particles )
    37393738
    37403739    IMPLICIT NONE
     
    38143813    ENDIF
    38153814
    3816 #endif
    38173815 END SUBROUTINE collision_efficiency
    38183816
     
    38263824! Sort particles in the sequence the grid boxes are stored in memory
    38273825!------------------------------------------------------------------------------!
    3828 #if defined( __particles )
    38293826
    38303827    USE arrays_3d
     
    39113908    CALL cpu_log( log_point_s(47), 'sort_particles', 'stop' )
    39123909
    3913 #endif
    39143910 END SUBROUTINE sort_particles
  • palm/trunk/SOURCE/data_output_dvrp.f90

    r13 r60  
    3232! Actual revisions:
    3333! -----------------
     34! Particles-package is now part of the default code.
    3435! TEST: write statements
    3536!
     
    142143!--    Select the plot mode (in case of isosurface or slicer only if user has
    143144!--    defined a variable which shall be plotted; otherwise do nothing)
    144        IF ( mode_dvrp(m)(1:9) == 'particles' )  THEN
    145 
    146 #if defined( __particles )
     145       IF ( mode_dvrp(m)(1:9) == 'particles'  .AND.  particle_advection )  THEN
     146
    147147    WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang particles'
    148148#if defined( __ibm )
     
    279279                                     psize, p_c, p_t )
    280280                WRITE (9,*) '--- after DVRP_PARTICLES'
     281                WRITE (9,*) 'm-1 = ',m-1
     282                WRITE (9,*) 'number_of_tails=', number_of_tails
     283                WRITE (9,*) 'p_x =', p_x
     284                WRITE (9,*) 'p_y =', p_y
     285                WRITE (9,*) 'p_z =', p_z
     286                WRITE (9,*) 'psize =', psize
     287                WRITE (9,*) 'p_c =', p_c
     288                WRITE (9,*) 'p_t =', p_t
     289
    281290#if defined( __ibm )
    282291    CALL FLUSH_( 9 )
     
    298307
    299308          CALL cpu_log( log_point_s(28), 'dvrp_particles', 'stop' )
    300 #endif
    301309
    302310
  • palm/trunk/SOURCE/data_output_ptseries.f90

    r4 r60  
    44! Actual revisions:
    55! -----------------
    6 !
     6! Particles-package is now part of the default code.
    77!
    88! Former revisions:
     
    2222! Output of particle data timeseries in NetCDF format.
    2323!------------------------------------------------------------------------------!
    24 #if defined( __particles )
    2524
    2625    USE control_parameters
     
    274273    CALL cpu_log( log_point(36), 'data_output_ptseries','stop', 'nobarrier' )
    275274
    276 #endif
    277275 END SUBROUTINE data_output_ptseries
  • palm/trunk/SOURCE/header.f90

    r57 r60  
    44! Actual revisions:
    55! -----------------
    6 ! Output of netcdf_64bit_3d
     6! Output of netcdf_64bit_3d, particles-package is now part of the default code.
    77!
    88! Former revisions:
     
    10281028    ENDIF
    10291029
    1030 #if defined( __particles )
    1031 !
    1032 !-- Particle attributes
    1033     WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
    1034                        bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
    1035                        end_time_prel
    1036     IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
    1037     IF ( random_start_position )  WRITE ( io, 481 )
    1038     IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
    1039     WRITE ( io, 495 )  total_number_of_particles
    1040     IF ( .NOT. vertical_particle_advection )  WRITE ( io, 482 )
    1041     IF ( maximum_number_of_tailpoints /= 0 )  THEN
    1042        WRITE ( io, 483 )  maximum_number_of_tailpoints
    1043        IF ( minimum_tailpoint_distance /= 0 )  THEN
    1044           WRITE ( io, 484 )  total_number_of_tails, minimum_tailpoint_distance,&
    1045                              maximum_tailpoint_age
    1046        ENDIF
    1047     ENDIF
    1048     IF ( dt_write_particle_data /= 9999999.9 )  THEN
    1049        WRITE ( io, 485 )  dt_write_particle_data
    1050        output_format = ''
    1051        IF ( netcdf_output )  THEN
    1052           IF ( netcdf_64bit )  THEN
    1053              output_format = 'netcdf (64 bit offset) and binary'
    1054           ELSE
    1055              output_format = 'netcdf and binary'
    1056           ENDIF
    1057        ELSE
    1058           output_format = 'binary'
    1059        ENDIF
    1060        WRITE ( io, 345 )  output_format
    1061     ENDIF
    1062     IF ( dt_dopts /= 9999999.9 )  WRITE ( io, 494 )  dt_dopts
    1063     IF ( write_particle_statistics )  WRITE ( io, 486 )
    1064 
    1065     WRITE ( io, 487 )  number_of_particle_groups
    1066 
    1067     DO  i = 1, number_of_particle_groups
    1068        IF ( i == 1  .AND.  density_ratio(i) == 9999999.9 )  THEN
    1069           WRITE ( io, 490 )  i, 0.0
    1070           WRITE ( io, 492 )
    1071        ELSE
    1072           WRITE ( io, 490 )  i, radius(i)
    1073           IF ( density_ratio(i) /= 0.0 )  THEN
    1074              WRITE ( io, 491 )  density_ratio(i)
    1075           ELSE
     1030    IF ( particle_advection )  THEN
     1031!
     1032!--    Particle attributes
     1033       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
     1034                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
     1035                          end_time_prel
     1036       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
     1037       IF ( random_start_position )  WRITE ( io, 481 )
     1038       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
     1039       WRITE ( io, 495 )  total_number_of_particles
     1040       IF ( .NOT. vertical_particle_advection )  WRITE ( io, 482 )
     1041       IF ( maximum_number_of_tailpoints /= 0 )  THEN
     1042          WRITE ( io, 483 )  maximum_number_of_tailpoints
     1043          IF ( minimum_tailpoint_distance /= 0 )  THEN
     1044             WRITE ( io, 484 )  total_number_of_tails,      &
     1045                                minimum_tailpoint_distance, &
     1046                                maximum_tailpoint_age
     1047          ENDIF
     1048       ENDIF
     1049       IF ( dt_write_particle_data /= 9999999.9 )  THEN
     1050          WRITE ( io, 485 )  dt_write_particle_data
     1051          output_format = ''
     1052          IF ( netcdf_output )  THEN
     1053             IF ( netcdf_64bit )  THEN
     1054                output_format = 'netcdf (64 bit offset) and binary'
     1055             ELSE
     1056                output_format = 'netcdf and binary'
     1057             ENDIF
     1058          ELSE
     1059             output_format = 'binary'
     1060          ENDIF
     1061          WRITE ( io, 345 )  output_format
     1062       ENDIF
     1063       IF ( dt_dopts /= 9999999.9 )  WRITE ( io, 494 )  dt_dopts
     1064       IF ( write_particle_statistics )  WRITE ( io, 486 )
     1065
     1066       WRITE ( io, 487 )  number_of_particle_groups
     1067
     1068       DO  i = 1, number_of_particle_groups
     1069          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9 )  THEN
     1070             WRITE ( io, 490 )  i, 0.0
    10761071             WRITE ( io, 492 )
    1077           ENDIF
    1078        ENDIF
    1079        WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
    1080                           pdx(i), pdy(i), pdz(i)
    1081     ENDDO
    1082 
    1083 #endif
     1072          ELSE
     1073             WRITE ( io, 490 )  i, radius(i)
     1074             IF ( density_ratio(i) /= 0.0 )  THEN
     1075                WRITE ( io, 491 )  density_ratio(i)
     1076             ELSE
     1077                WRITE ( io, 492 )
     1078             ENDIF
     1079          ENDIF
     1080          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
     1081                             pdx(i), pdy(i), pdz(i)
     1082       ENDDO
     1083
     1084    ENDIF
     1085
    10841086
    10851087!
     
    13901392            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
    13911393                 ' the 3D-simulation'/)
    1392 #if defined( __particles )
    13931394480 FORMAT ('    Particles:'/ &
    13941395            '    ---------'// &
     
    14261427                    F8.2,' s'/)
    14271428495 FORMAT ('       Number of particles in total domain: ',I10/)
    1428 #endif
    14291429500 FORMAT (//' 1D-Model parameters:'/                           &
    14301430              ' -------------------'//                           &
  • palm/trunk/SOURCE/init_particles.f90

    r57 r60  
    44! Actual revisions:
    55! -----------------
    6 ! displacements for mpi_particle_type changed, age_m initialized
     6! displacements for mpi_particle_type changed, age_m initialized,
     7! particles-package is now part of the default code
    78!
    89! Former revisions:
     
    3031! plotting is done in data_output_dvrp.
    3132!------------------------------------------------------------------------------!
    32 #if defined( __particles )
    3333
    3434    USE arrays_3d
     
    5605608000 FORMAT (I6,1X,F7.2,4X,I6,71X,I6)
    561561
    562 #endif
    563562 END SUBROUTINE init_particles
  • palm/trunk/SOURCE/package_parin.f90

    r4 r60  
    44! Actual revisions:
    55! -----------------
    6 !
     6! Particles-paclage is now part of the default code
    77!
    88! Former revisions:
     
    8484#endif
    8585
    86 #if defined( __particles )
     86!
     87!-- Try to find particles package
    8788    REWIND ( 11 )
    8889    zeile = ' '
     
    101102
    102103 20 CONTINUE
    103 #endif
     104
    104105
    105106#if defined( __spectra )
  • palm/trunk/SOURCE/particle_boundary_conds.f90

    r58 r60  
    1616! Routine developed by Jin Zhang (2006-2007)
    1717!------------------------------------------------------------------------------!
    18 #if defined( __particles )
    1918
    2019    USE control_parameters
     
    2827    IMPLICIT NONE
    2928
    30     INTEGER ::  n
    31 
     29    INTEGER ::  i, inc, ir, i1, i2, i3, i5, j, jr, j1, j2, j3, j5, k, k1, k2, &
     30                k3, k5, n, t_index, t_index_number
     31
     32    REAL ::  dt_particle, pos_x, pos_x_old, pos_y, pos_y_old, pos_z, &
     33             pos_z_old, prt_x, prt_y, prt_z, tmp_t, xline, yline, zline
     34
     35    REAL ::  t(1:200)
    3236
    3337    CALL cpu_log( log_point_s(48), 'advec_part_refle', 'start' )
     
    3640
    3741    DO  n = 1, number_of_particles
     42
     43       dt_particle = particles(n)%age - particles(n)%age_m
    3844
    3945       i2 = ( particles(n)%x + 0.5 * dx ) * ddx
  • palm/trunk/SOURCE/user_interface.f90

    r57 r60  
    55! -----------------
    66! New routine user_init_3d_model which allows the initial setting of all 3d
    7 ! arrays under control of the user,
     7! arrays under control of the user, new routine user_advec_particles,
    88! routine user_statistics now has one argument (sr),
    99! sample for generating time series quantities added
     
    521521
    522522 END SUBROUTINE user_init_particles
     523
     524
     525
     526 SUBROUTINE user_advec_particles
     527
     528!------------------------------------------------------------------------------!
     529!
     530! Description:
     531! ------------
     532! Modification of initial particles by the user.
     533!------------------------------------------------------------------------------!
     534
     535    USE particle_attributes
     536    USE user
     537
     538    IMPLICIT NONE
     539
     540    INTEGER ::  n
     541
     542!
     543!-- Here the user-defined actions follow
     544!    DO  n = 1, number_of_initial_particles
     545!    ENDDO
     546
     547 END SUBROUTINE user_advec_particles
    523548
    524549
  • palm/trunk/SOURCE/wall_fluxes.f90

    r56 r60  
    4545       USE indices
    4646       USE statistics
    47        USE user
    4847
    4948       IMPLICIT NONE
     
    210209       USE indices
    211210       USE statistics
    212        USE user
    213211
    214212       IMPLICIT NONE
     
    369367       USE indices
    370368       USE statistics
    371        USE user
    372369
    373370       IMPLICIT NONE
     
    475472       USE indices
    476473       USE statistics
    477        USE user
    478474
    479475       IMPLICIT NONE
Note: See TracChangeset for help on using the changeset viewer.