Changeset 316 for palm/trunk/SOURCE


Ignore:
Timestamp:
May 13, 2009 3:31:23 PM (16 years ago)
Author:
letzel
Message:
  • Additional timestep criterion in case of simulations with plant canopy (modules, timestep)
Location:
palm/trunk/SOURCE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r314 r316  
    11New:
    22---
     3Additional timestep criterion in case of simulations with plant canopy (modules, timestep)
     4
    35Check for illegal entries in section_xy|xz|yz that exceed nz+1|ny+1|nx+1
    46(check_parameters)
     
    3537write_var_list)
    3638
    37 check_for_restart, check_parameters, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_ptseries, data_output_spectra, data_output_tseries, init_coupling, init_dvrp, init_grid, init_3d_model, header, modules, mrun, package_parin, parin, prognostic_equations, read_var_list, surface_coupler, time_integration, user_check_parameters, user_data_output_dvrp, user_header, user_init_grid, write_var_list
     39check_for_restart, check_parameters, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_ptseries, data_output_spectra, data_output_tseries, init_coupling, init_dvrp, init_grid, init_3d_model, header, modules, mrun, package_parin, parin, prognostic_equations, read_var_list, surface_coupler, timestep, time_integration, user_check_parameters, user_data_output_dvrp, user_header, user_init_grid, write_var_list
    3840
    3941New: set_particle_attributes, set_slicer_attributes_dvrp
  • palm/trunk/SOURCE/modules.f90

    r305 r316  
    55! Actual revisions:
    66! -----------------
     7! +cdc_max, lad_u_max, lad_v_max, lad_w_max,
     8! cdc_max_ijk, lad_u_max_ijk, lad_v_max_ijk, lad_w_max_ijk
    79! typographical error in dots_unit fixed
    810! +clip_dvrp_*, cluster_size, color_interval, dvrpsize_interval, dvrp_overlap,
     
    12171219    CHARACTER (LEN=40) ::  region(0:9)
    12181220    INTEGER ::  pr_palm = 80, statistic_regions = 0, var_ts = 100
    1219     INTEGER ::  u_max_ijk(3), v_max_ijk(3), w_max_ijk(3)
     1221    INTEGER ::  cdc_max_ijk(3), lad_u_max_ijk(3), lad_v_max_ijk(3),  &
     1222                lad_w_max_ijk(3), u_max_ijk(3), v_max_ijk(3), w_max_ijk(3)
    12201223    LOGICAL ::  flow_statistics_called = .FALSE.
    1221     REAL ::     u_max, v_max, w_max
     1224    REAL ::     cdc_max, lad_u_max, lad_v_max, lad_w_max, u_max, v_max, w_max
    12221225    REAL, DIMENSION(:), ALLOCATABLE       ::  sums_divnew_l, sums_divold_l
    12231226    REAL, DIMENSION(:,:), ALLOCATABLE     ::  sums, sums_wsts_bc_l, ts_value
  • palm/trunk/SOURCE/timestep.f90

    r274 r316  
    44! Current revisions:
    55! -----------------
     6! Additional timestep criterion in case of simulations with plant canopy
     7!
    68! Output of messages replaced by message handling routine.
    79!
     
    4547    INTEGER ::  i, j, k
    4648
    47     REAL ::  div, dt_diff, dt_diff_l, dt_u, dt_v, dt_w, percent_change, &
    48              u_gtrans_l, value, v_gtrans_l
     49    REAL ::  div, dt_diff, dt_diff_l, dt_plant_canopy,  &
     50             dt_u, dt_v, dt_w, lad_max, percent_change, &
     51             u_gtrans_l, vabs_max, value, v_gtrans_l
    4952
    5053    REAL, DIMENSION(2)         ::  uv_gtrans, uv_gtrans_l
     
    176179
    177180!
    178 !--    The time step is the minimum of the 3 components and the diffusion time
     181!--    Additional timestep criterion with plant canopies:
     182!--    it is not allowed to extract more than the available momentum
     183       IF ( plant_canopy ) THEN
     184!
     185!--       Determine the maxima of the leaf drag coefficient and the leaf
     186!--       area density.
     187          CALL global_min_max( nzb, nzt+1, nys-1, nyn+1, nxl-1, nxr+1, cdc, &
     188                               'max', cdc_max, cdc_max_ijk )
     189          CALL global_min_max( nzb, nzt+1, nys-1, nyn+1, nxl-1, nxr+1, lad_u, &
     190                               'max', lad_u_max, lad_u_max_ijk )
     191          CALL global_min_max( nzb, nzt+1, nys-1, nyn+1, nxl-1, nxr+1, lad_v, &
     192                               'max', lad_v_max, lad_v_max_ijk )
     193          CALL global_min_max( nzb, nzt+1, nys-1, nyn+1, nxl-1, nxr+1, lad_w, &
     194                               'max', lad_w_max, lad_w_max_ijk )
     195!
     196!--       Determine the potential maximum of the absolute value of the velocity
     197          vabs_max = SQRT( u_max**2 + v_max**2 + w_max**2 )
     198          lad_max  = MAX( lad_u_max, lad_v_max, lad_w_max )
     199
     200          dt_plant_canopy = 1.0 / ( cdc_max * lad_max * vabs_max )
     201
     202       ELSE
     203!
     204!--       Use dt_diff as dummy value to avoid extra IF branches further below
     205          dt_plant_canopy = dt_diff
     206
     207       ENDIF
     208
     209!
     210!--    The time step is the minimum of the 3-4 components and the diffusion time
    179211!--    step minus a reduction to be on the safe side. Factor 0.5 is necessary
    180212!--    since the leap-frog scheme always progresses by 2 * delta t.
     
    183215!--    The time step must not exceed the maximum allowed value.
    184216       IF ( timestep_scheme(1:5) == 'runge' )  THEN
    185           dt_3d = cfl_factor * MIN( dt_diff, dt_u, dt_v, dt_w )
    186        ELSE
    187           dt_3d = cfl_factor * 0.5 * MIN( dt_diff, dt_u, dt_v, dt_w )
     217          dt_3d = cfl_factor * MIN( dt_diff, dt_plant_canopy, dt_u, dt_v, dt_w )
     218       ELSE
     219          dt_3d = cfl_factor * 0.5 *  &
     220                  MIN( dt_diff, dt_plant_canopy, dt_u, dt_v, dt_w )
    188221       ENDIF
    189222       dt_3d = MIN( dt_3d, dt_max )
     
    191224!
    192225!--    Remember the restricting time step criterion for later output.
    193        IF ( dt_diff > MIN( dt_u, dt_v, dt_w ) )  THEN
     226       IF ( MIN( dt_u, dt_v, dt_w ) < MIN( dt_diff, dt_plant_canopy ) )  THEN
    194227          timestep_reason = 'A'
     228       ELSEIF ( dt_plant_canopy < dt_diff )  THEN
     229          timestep_reason = 'C'
    195230       ELSE
    196231          timestep_reason = 'D'
Note: See TracChangeset for help on using the changeset viewer.