Changeset 3083 for palm/trunk/SOURCE/timestep.f90
- Timestamp:
- Jun 19, 2018 2:03:12 PM (6 years ago)
- Location:
- palm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk
- Property svn:mergeinfo changed
/palm/branches/rans merged: 2919,2922,2928-2929,2960,2962,2966,2976,2982,2987-2988,2991,3008-3009,3023,3047,3050,3059,3062,3071-3082
- Property svn:mergeinfo changed
-
palm/trunk/SOURCE
- Property svn:mergeinfo changed
/palm/branches/rans/SOURCE merged: 2919,2922,2928-2929,2960,2962,2966,2976,2982,2987-2988,2991,3008-3009,3023,3047,3050,3059,3062,3071-3082
- Property svn:mergeinfo changed
-
palm/trunk/SOURCE/timestep.f90
r3049 r3083 25 25 ! ----------------- 26 26 ! $Id$ 27 ! limit dt_3d to be at maximum 2*old_dt; define old_dt at beginning of routine 28 ! Add km/kh_max 29 ! 30 ! 3049 2018-05-29 13:52:36Z Giersch 27 31 ! Error messages revised 28 32 ! … … 161 165 INTEGER(iwp) :: j !< 162 166 INTEGER(iwp) :: k !< 167 INTEGER(iwp) :: km_max_ijk(3) = -1 !< index values (i,j,k) of location where km_max occurs 168 INTEGER(iwp) :: kh_max_ijk(3) = -1 !< index values (i,j,k) of location where kh_max occurs 163 169 164 170 LOGICAL :: stop_dt_local !< local switch for controlling the time stepping … … 173 179 REAL(wp) :: dt_w !< 174 180 REAL(wp) :: dt_w_l !< 181 REAL(wp) :: km_max !< maximum of Km in entire domain 182 REAL(wp) :: kh_max !< maximum of Kh in entire domain 175 183 REAL(wp) :: u_gtrans_l !< 176 184 REAL(wp) :: u_max_l !< … … 190 198 191 199 192 193 200 CALL cpu_log( log_point(12), 'calculate_timestep', 'start' ) 201 ! 202 !-- Save former time step as reference 203 old_dt = dt_3d 194 204 195 205 ! … … 318 328 !-- The time step is the minimum of the 3-4 components and the diffusion time 319 329 !-- step minus a reduction (cfl_factor) to be on the safe side. 320 !-- The time step must not exceed the maximum allowed value. 330 !-- The time step must not exceed the maximum allowed value and must not 331 !-- increase by more than a factor of 10. 321 332 dt_3d = cfl_factor * MIN( dt_diff, dt_u, dt_v, dt_w, dt_precipitation ) 322 dt_3d = MIN( dt_3d, dt_max )333 dt_3d = MIN( dt_3d, dt_max, 2.0_wp * old_dt ) 323 334 324 335 ! … … 334 345 IF ( dt_3d < ( 0.00001_wp * dt_max ) ) THEN 335 346 stop_dt = .TRUE. 347 348 ! 349 !-- Determine the maxima of the diffusion coefficients, including their 350 !-- grid index positions. 351 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, km, 'abs', & 352 0.0_wp, km_max, km_max_ijk ) 353 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, kh, 'abs', & 354 0.0_wp, kh_max, kh_max_ijk ) 336 355 337 356 WRITE( message_string, * ) 'Time step has reached minimum limit.', & … … 342 361 '&dt_w = ', dt_w, ' s', & 343 362 '&dt_diff = ', dt_diff, ' s', & 344 '&u_max = ', u_max, ' m/s k=', u_max_ijk(1),&363 '&u_max = ', u_max, ' m/s k=', u_max_ijk(1), & 345 364 ' j=', u_max_ijk(2), ' i=', u_max_ijk(3), & 346 '&v_max = ', v_max, ' m/s k=', v_max_ijk(1),&365 '&v_max = ', v_max, ' m/s k=', v_max_ijk(1), & 347 366 ' j=', v_max_ijk(2), ' i=', v_max_ijk(3), & 348 '&w_max = ', w_max, ' m/s k=', w_max_ijk(1), & 349 ' j=', w_max_ijk(2), ' i=', w_max_ijk(3) 367 '&w_max = ', w_max, ' m/s k=', w_max_ijk(1), & 368 ' j=', w_max_ijk(2), ' i=', w_max_ijk(3), & 369 '&km_max = ', km_max, ' m2/s2 k=', km_max_ijk(1), & 370 ' j=', km_max_ijk(2), ' i=', km_max_ijk(3), & 371 '&kh_max = ', kh_max, ' m2/s2 k=', kh_max_ijk(1), & 372 ' j=', kh_max_ijk(2), ' i=', kh_max_ijk(3) 350 373 CALL message( 'timestep', 'PA0312', 0, 1, 0, 6, 0 ) 351 374 ! … … 388 411 dt_3d = NINT( dt_3d * 100.0_wp / div ) * div / 100.0_wp 389 412 390 !391 !-- Adjust the time step392 old_dt = dt_3d393 394 413 ENDIF 395 414
Note: See TracChangeset
for help on using the changeset viewer.