Changeset 4297 for palm


Ignore:
Timestamp:
Nov 21, 2019 10:37:50 AM (4 years ago)
Author:
oliver.maas
Message:

In case of turbulent inflow: Adjusted recycling_yshift, so that y-shift can be given as multiples of PE (as in y_shift for cyclic BCs).

Location:
palm/trunk/SOURCE
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/check_parameters.f90

    r4286 r4297  
    2525! -----------------
    2626! 4172 2019-08-20 11:55:33Z oliver.maas
     27! adjust message to the modified parameter recycling_yshift
     28!
     29! 11:55:33Z oliver.maas
    2730! Check if a cross section is specified if any output cross-section quantity
    2831! is given
     
    29712974       recycling_plane = recycling_width / dx
    29722975!
    2973 !--    Because the y-shift is done with a distance of INT( npey / 2 ) no shift
     2976!--    recycling_yshift will have no effect with only one pe in y-direction
    29742977!--    is possible if there is only one PE in y direction.
    2975        IF ( recycling_yshift .AND. pdims(2) < 2 )  THEN
    2976           WRITE( message_string, * )  'recycling_yshift = .T. requires more',  &
    2977                                       ' than one processor in y direction'
    2978           CALL message( 'check_parameters', 'PA0421', 1, 2, 0, 6, 0 )
     2978       IF ( ( recycling_yshift /= 0 ) .AND. pdims(2) < 2 )  THEN
     2979          WRITE( message_string, * )  'recycling_yshift will have no '  //     &
     2980                                      'effect with only one pe in y-direction.'
     2981          CALL message( 'check_parameters', 'PA0421', 0, 0, 0, 6, 0 )
    29792982       ENDIF
    29802983
  • palm/trunk/SOURCE/header.f90

    r4227 r4297  
    2525! -----------------
    2626! $Id$
     27! adjusted message to the changed parameter recycling_yshift
     28!
     29! 4227 2019-09-10 18:04:34Z gronemeier
    2730! implement new palm_date_time_mod
    2831!
     
    920923       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
    921924       IF ( turbulent_inflow )  THEN
    922           IF ( .NOT. recycling_yshift ) THEN
     925          IF ( recycling_yshift == 0 ) THEN
    923926             WRITE ( io, 319 )  recycling_width, recycling_plane, &
    924927                                inflow_damping_height, inflow_damping_width
    925928          ELSE
    926              WRITE ( io, 322 )  recycling_width, recycling_plane, &
     929             WRITE ( io, 322 )  recycling_yshift, recycling_width, recycling_plane, &
    927930                                inflow_damping_height, inflow_damping_width
    928931          END IF
     
    17371740              ' ----------------')
    17381741322 FORMAT ('       turbulence recycling at inflow switched on'/ &
    1739             '       y shift of the recycled inflow turbulence switched on'/ &
     1742            '       y shift of the recycled inflow turbulence is',I3,' PE'/ &
    17401743            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
    17411744            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
  • palm/trunk/SOURCE/inflow_turbulence.f90

    r4183 r4297  
    2525! -----------------
    2626! $Id$
     27! changed recycling_yshift so that the y-shift can be a multiple of PE
     28! instead of y-shift of a half domain width
     29!
     30! 4183 2019-08-23 07:33:16Z oliver.maas
    2731! simplified steering of recycling of absolute values by initialization
    2832! parameter recycling_method_for_thermodynamic_quantities
     
    240244!
    241245!-- y-shift for inflow_dist
    242 !-- Shift inflow_dist in positive y direction by a distance of INT( npey / 2 )
    243     IF ( recycling_yshift .AND. myidx == id_inflow ) THEN
     246!-- Shift inflow_dist in positive y direction by a number of
     247!-- PEs equal to recycling_yshift
     248    IF ( ( recycling_yshift /= 0 ) .AND. myidx == id_inflow ) THEN
     249
    244250!
    245251!--    Calculate the ID of the PE which sends data to this PE (prev) and of the
    246252!--    PE which receives data from this PE (next).
    247        IF ( myidy >= INT( pdims(2) / 2 ) ) THEN
    248           prev = myidy - INT( pdims(2) / 2 )
    249        ELSE
    250           prev = pdims(2) - ( INT( pdims(2) / 2 ) - myidy )
    251        ENDIF
    252      
    253        IF ( myidy < pdims(2) - INT( pdims(2) / 2 ) ) THEN
    254           next = myidy + INT( pdims(2) / 2 )
    255        ELSE
    256           next = INT( pdims(2) / 2 ) - ( pdims(2) - myidy )
    257        ENDIF
    258 
     253       prev = MODULO(myidy - recycling_yshift , pdims(2))
     254       next = MODULO(myidy + recycling_yshift , pdims(2))
     255       
    259256       local_inflow_dist = 0.0_wp
    260257
  • palm/trunk/SOURCE/modules.f90

    r4293 r4297  
    2525! -----------------
    2626! $Id$
     27! changed variable type of recycling_yshift from LOGICAL to INTEGER
     28!
     29! 4293 2019-11-12 14:44:01Z Giersch
    2730! Add origin_date_time
    2831!
     
    642645    INTEGER(iwp) ::  vg_vertical_gradient_level_ind(10) = -9999  !< grid index values of vg_vertical_gradient_level(s)
    643646    INTEGER(iwp) ::  subs_vertical_gradient_level_i(10) = -9999  !< grid index values of subs_vertical_gradient_level(s)
    644 
     647    INTEGER(iwp) ::  recycling_yshift = 0                        !< namelist parameter
    645648    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_xy  !< number of output intervals for 2d data (xy)
    646649    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_xz  !< number of output intervals for 2d data (xz)
     
    735738    LOGICAL ::  rans_tke_l = .FALSE.                             !< use TKE-l turbulence closure for RANS mode
    736739    LOGICAL ::  read_svf = .FALSE.                               !< ENVPAR namelist parameter to steer input of svf (ENVPAR is provided by palmrun)
    737     LOGICAL ::  recycling_yshift = .FALSE.                       !< namelist parameter
    738740    LOGICAL ::  run_control_header = .FALSE.                     !< onetime output of RUN_CONTROL header
    739741    LOGICAL ::  run_coupled = .TRUE.                             !< internal switch telling PALM to run in coupled mode (i.e. to exchange surface data) in case of atmosphere-ocean coupling
Note: See TracChangeset for help on using the changeset viewer.