Changeset 60 for palm/trunk/SOURCE
- Timestamp:
- Mar 11, 2007 11:50:04 AM (18 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r57 r60 29 29 +age_m in particle_type 30 30 31 Particles-package is now part of the default code ("-p particles" is not needed any more). 32 31 33 Move call of user_actions( 'after_integration' ) below increment of times 32 34 and counters. user_actions is now called for each statistic region and has as an argument the number of the respective region (sr) … … 38 40 __vtk directives removed from main program. 39 41 40 check_parameters, data_output_ ts, flow_statistics, init_particles, init_3d_model, modules, palm, parin, time_integration42 check_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 41 43 42 44 -
palm/trunk/SOURCE/advec_particles.f90
r59 r60 7 7 ! particle_boundary_conds, 8 8 ! 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 10 10 ! TEST: PRINT statements on unit 9 (commented out) 11 11 ! … … 50 50 ! Particle advection 51 51 !------------------------------------------------------------------------------! 52 #if defined( __particles )53 52 54 53 USE arrays_3d … … 68 67 IMPLICIT NONE 69 68 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, & 76 76 trrp_count_recv_sum, trrpt_count, trrpt_count_recv, & 77 77 trsp_count, trsp_count_sum, trsp_count_recv, & 78 78 trsp_count_recv_sum, trspt_count, trspt_count_recv, nd 79 79 80 INTEGER :: gp_outside_of_building(1:8) 81 80 82 LOGICAL :: dt_3d_reached, dt_3d_reached_l, prt_position 81 83 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) 92 99 93 100 REAL, DIMENSION(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) :: de_dx, de_dy, de_dz … … 1687 1694 !-- previous timestep the increase must not exceed 200% 1688 1695 1689 dt_particle_ old= particles(n)%age - particles(n)%age_m1690 IF ( dt_particle > 2.0 * dt_particle_ old) THEN1691 dt_particle = 2.0 * dt_particle_ old1696 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 1692 1699 ENDIF 1693 1700 … … 1703 1710 de_dt_min = - e_int / dt_particle 1704 1711 1705 de_dt = ( e_int - particles(n)%e_m ) / dt_particle_ old1712 de_dt = ( e_int - particles(n)%e_m ) / dt_particle_m 1706 1713 1707 1714 IF ( de_dt < de_dt_min ) THEN … … 3436 3443 8000 FORMAT (I6,1X,F7.2,4X,I6,5X,4(I3,1X,I4,'/',I4,2X),6X,I6) 3437 3444 3438 #endif3439 3445 END SUBROUTINE advec_particles 3440 3446 … … 3447 3453 ! Extend particle memory 3448 3454 !------------------------------------------------------------------------------! 3449 #if defined( __particles )3450 3455 3451 3456 USE particle_attributes … … 3486 3491 DEALLOCATE( tmp_particles, tmp_particle_mask ) 3487 3492 3488 #endif3489 3493 END SUBROUTINE allocate_prt_memory 3490 3494 … … 3497 3501 ! Extend tail memory 3498 3502 !------------------------------------------------------------------------------! 3499 #if defined( __particles )3500 3503 3501 3504 USE particle_attributes … … 3540 3543 tail_mask(number_of_tails+1:maximum_number_of_tails) = .TRUE. 3541 3544 3542 #endif3543 3545 END SUBROUTINE allocate_tail_memory 3544 3546 … … 3669 3671 ! Write particle data on restart file 3670 3672 !------------------------------------------------------------------------------! 3671 #if defined( __particles )3672 3673 3673 3674 USE control_parameters … … 3726 3727 CLOSE ( 90 ) 3727 3728 3728 #endif3729 3729 END SUBROUTINE write_particles 3730 3730 … … 3736 3736 ! Interpolate collision efficiency from table 3737 3737 !------------------------------------------------------------------------------! 3738 #if defined( __particles )3739 3738 3740 3739 IMPLICIT NONE … … 3814 3813 ENDIF 3815 3814 3816 #endif3817 3815 END SUBROUTINE collision_efficiency 3818 3816 … … 3826 3824 ! Sort particles in the sequence the grid boxes are stored in memory 3827 3825 !------------------------------------------------------------------------------! 3828 #if defined( __particles )3829 3826 3830 3827 USE arrays_3d … … 3911 3908 CALL cpu_log( log_point_s(47), 'sort_particles', 'stop' ) 3912 3909 3913 #endif3914 3910 END SUBROUTINE sort_particles -
palm/trunk/SOURCE/data_output_dvrp.f90
r13 r60 32 32 ! Actual revisions: 33 33 ! ----------------- 34 ! Particles-package is now part of the default code. 34 35 ! TEST: write statements 35 36 ! … … 142 143 !-- Select the plot mode (in case of isosurface or slicer only if user has 143 144 !-- 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 147 147 WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: anfang particles' 148 148 #if defined( __ibm ) … … 279 279 psize, p_c, p_t ) 280 280 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 281 290 #if defined( __ibm ) 282 291 CALL FLUSH_( 9 ) … … 298 307 299 308 CALL cpu_log( log_point_s(28), 'dvrp_particles', 'stop' ) 300 #endif301 309 302 310 -
palm/trunk/SOURCE/data_output_ptseries.f90
r4 r60 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Particles-package is now part of the default code. 7 7 ! 8 8 ! Former revisions: … … 22 22 ! Output of particle data timeseries in NetCDF format. 23 23 !------------------------------------------------------------------------------! 24 #if defined( __particles )25 24 26 25 USE control_parameters … … 274 273 CALL cpu_log( log_point(36), 'data_output_ptseries','stop', 'nobarrier' ) 275 274 276 #endif277 275 END SUBROUTINE data_output_ptseries -
palm/trunk/SOURCE/header.f90
r57 r60 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! Output of netcdf_64bit_3d 6 ! Output of netcdf_64bit_3d, particles-package is now part of the default code. 7 7 ! 8 8 ! Former revisions: … … 1028 1028 ENDIF 1029 1029 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 1076 1071 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 1084 1086 1085 1087 ! … … 1390 1392 ' value is negative) by ',E8.1,' kg/m**3 at the beginning of', & 1391 1393 ' the 3D-simulation'/) 1392 #if defined( __particles )1393 1394 480 FORMAT (' Particles:'/ & 1394 1395 ' ---------'// & … … 1426 1427 F8.2,' s'/) 1427 1428 495 FORMAT (' Number of particles in total domain: ',I10/) 1428 #endif1429 1429 500 FORMAT (//' 1D-Model parameters:'/ & 1430 1430 ' -------------------'// & -
palm/trunk/SOURCE/init_particles.f90
r57 r60 4 4 ! Actual revisions: 5 5 ! ----------------- 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 7 8 ! 8 9 ! Former revisions: … … 30 31 ! plotting is done in data_output_dvrp. 31 32 !------------------------------------------------------------------------------! 32 #if defined( __particles )33 33 34 34 USE arrays_3d … … 560 560 8000 FORMAT (I6,1X,F7.2,4X,I6,71X,I6) 561 561 562 #endif563 562 END SUBROUTINE init_particles -
palm/trunk/SOURCE/package_parin.f90
r4 r60 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Particles-paclage is now part of the default code 7 7 ! 8 8 ! Former revisions: … … 84 84 #endif 85 85 86 #if defined( __particles ) 86 ! 87 !-- Try to find particles package 87 88 REWIND ( 11 ) 88 89 zeile = ' ' … … 101 102 102 103 20 CONTINUE 103 #endif 104 104 105 105 106 #if defined( __spectra ) -
palm/trunk/SOURCE/particle_boundary_conds.f90
r58 r60 16 16 ! Routine developed by Jin Zhang (2006-2007) 17 17 !------------------------------------------------------------------------------! 18 #if defined( __particles )19 18 20 19 USE control_parameters … … 28 27 IMPLICIT NONE 29 28 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) 32 36 33 37 CALL cpu_log( log_point_s(48), 'advec_part_refle', 'start' ) … … 36 40 37 41 DO n = 1, number_of_particles 42 43 dt_particle = particles(n)%age - particles(n)%age_m 38 44 39 45 i2 = ( particles(n)%x + 0.5 * dx ) * ddx -
palm/trunk/SOURCE/user_interface.f90
r57 r60 5 5 ! ----------------- 6 6 ! 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, 8 8 ! routine user_statistics now has one argument (sr), 9 9 ! sample for generating time series quantities added … … 521 521 522 522 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 523 548 524 549 -
palm/trunk/SOURCE/wall_fluxes.f90
r56 r60 45 45 USE indices 46 46 USE statistics 47 USE user48 47 49 48 IMPLICIT NONE … … 210 209 USE indices 211 210 USE statistics 212 USE user213 211 214 212 IMPLICIT NONE … … 369 367 USE indices 370 368 USE statistics 371 USE user372 369 373 370 IMPLICIT NONE … … 475 472 USE indices 476 473 USE statistics 477 USE user478 474 479 475 IMPLICIT NONE
Note: See TracChangeset
for help on using the changeset viewer.