Changeset 4734 for palm/trunk/SOURCE


Ignore:
Timestamp:
Oct 9, 2020 1:21:06 PM (4 years ago)
Author:
suehring
Message:

Bugfix for RANS-RANS nesting and minor revision in the TKE treatment (only logical control)

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r4665 r4734  
    2525! -----------------
    2626! $Id$
     27! Bugfix for RANS-RANS nesting and minor revision in the TKE treatment (only logical control)
     28!
     29! 4665 2020-09-03 14:04:24Z hellstea
    2730! Interpolation and anterpolation subroutines renamed and all missing subroutine description
    2831! comments added.
     
    13221325!--    Set data array name for TKE. Please note, nesting of TKE is actually only done if both parent
    13231326!--    and child are in LES or in RANS mode. Due to design of model coupler, however, data array
    1324 !--    names must be already available at this point.
    1325        IF ( ( rans_mode_parent  .AND.  rans_mode )  .OR.                              &
    1326             ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.  .NOT. constant_diffusion ) )&
    1327             THEN
    1328           CALL pmc_set_dataarray_name( 'parent', 'e', 'child', 'e', ierr )
    1329        ENDIF
     1327!--    names must be already available at this point, though the control flag whether data shall
     1328!--    be interpolated / anterpolated is not available yet.
     1329       CALL pmc_set_dataarray_name( 'parent', 'e', 'child', 'e', ierr )
    13301330!
    13311331!--    Nesting of dissipation rate only if both parent and child are in RANS mode and TKE-epsilon
    13321332!--    closure is applied. Please see also comment for TKE above.
    1333        IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
    1334           CALL pmc_set_dataarray_name( 'parent', 'diss', 'child', 'diss', ierr )
    1335        ENDIF
     1333       CALL pmc_set_dataarray_name( 'parent', 'diss', 'child', 'diss', ierr )
    13361334
    13371335       IF ( .NOT. neutral )  THEN
     
    25802578    IF ( TRIM(name) == "nr_part"    )  i_2d => nr_part
    25812579    IF ( TRIM(name) == "part_adr"   )  i_2d => part_adr
    2582     IF ( INDEX( TRIM(name), "chem_" ) /= 0      )  p_3d => chem_species(n)%conc
    2583     IF ( INDEX( TRIM(name), "an_" ) /= 0  )  p_3d => aerosol_number(n)%conc
     2580    IF ( INDEX( TRIM(name), "chem_" ) /= 0 )  p_3d => chem_species(n)%conc
     2581    IF ( INDEX( TRIM(name), "an_" ) /= 0 )  p_3d => aerosol_number(n)%conc
    25842582    IF ( INDEX( TRIM(name), "am_" ) /= 0 )  p_3d => aerosol_mass(n)%conc
    25852583    IF ( INDEX( TRIM(name), "sg_" ) /= 0  .AND.  .NOT. salsa_gases_from_chem )                     &
     
    35963594          CALL pmci_interp_lr( v, vc, kcto, jflv, jfuv, kflo, kfuo, 'l', 'v' )
    35973595          CALL pmci_interp_lr( w, wc, kctw, jflo, jfuo, kflw, kfuw, 'l', 'w' )
    3598 
    3599           IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                          &
    3600                ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                           &
    3601                  .NOT.  constant_diffusion ) )  THEN
    3602 !             CALL pmci_interp_lr( e, ec, kcto, jflo, jfuo, kflo, kfuo, 'l', 'e' )
    3603 !
    3604 !--          Interpolation of e is replaced by the Neumann condition.
     3596!
     3597!--       Treatment of TKE. Interpolation is only required if parent and child operate in RANS mode,
     3598!--       else, interpolation is replaced by a Neumann condition.
     3599          IF ( rans_mode_parent  .AND.  rans_mode )  THEN
     3600              CALL pmci_interp_lr( e, ec, kcto, jflo, jfuo, kflo, kfuo, 'l', 'e' )
     3601          ELSE
    36053602             DO  ibgp = -nbgp, -1
    36063603                e(nzb:nzt,nys:nyn,ibgp) = e(nzb:nzt,nys:nyn,0)
    36073604             ENDDO
    3608 
    36093605          ENDIF
    36103606
     
    36693665          CALL pmci_interp_lr( v, vc, kcto, jflv, jfuv, kflo, kfuo, 'r', 'v' )
    36703666          CALL pmci_interp_lr( w, wc, kctw, jflo, jfuo, kflw, kfuw, 'r', 'w' )
    3671 
    3672           IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                          &
    3673                ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                           &
    3674                  .NOT.  constant_diffusion ) )  THEN
    3675 !             CALL pmci_interp_lr( e, ec, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 'r', 'e' )
    3676 !
    3677 !--          Interpolation of e is replaced by the Neumann condition.
     3667!
     3668!--       Treatment of TKE. Interpolation is only required if parent and child operate in RANS mode,
     3669!--       else, interpolation is replaced by a Neumann condition.
     3670          IF ( rans_mode_parent  .AND.  rans_mode )  THEN
     3671             CALL pmci_interp_lr( e, ec, kcto, jflo, jfuo, kflo, kfuo, 'r', 'e' )
     3672          ELSE
    36783673             DO  ibgp = nx+1, nx+nbgp
    36793674                e(nzb:nzt,nys:nyn,ibgp) = e(nzb:nzt,nys:nyn,nx)
     
    37403735          CALL pmci_interp_sn( w, wc, kctw, iflo, ifuo, kflw, kfuw, 's', 'w' )
    37413736          CALL pmci_interp_sn( u, uc, kcto, iflu, ifuu, kflo, kfuo, 's', 'u' )
    3742 
    3743           IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                          &
    3744                ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                           &
    3745                  .NOT.  constant_diffusion ) )  THEN
    3746 !             CALL pmci_interp_sn( e, ec, kcto, iflo, ifuo, kflo, kfuo, 's', 'e' )
    3747 !
    3748 !--          Interpolation of e is replaced by the Neumann condition.
     3737!
     3738!--       Treatment of TKE. Interpolation is only required if parent and child operate in RANS mode,
     3739!--       else, interpolation is replaced by a Neumann condition.
     3740          IF ( rans_mode_parent  .AND.  rans_mode )  THEN
     3741             CALL pmci_interp_sn( e, ec, kcto, iflo, ifuo, kflo, kfuo, 's', 'e' )
     3742          ELSE
    37493743             DO  jbgp = -nbgp, -1
    37503744                e(nzb:nzt,jbgp,nxl:nxr) = e(nzb:nzt,0,nxl:nxr)
     
    38113805          CALL pmci_interp_sn( w, wc, kctw, iflo, ifuo, kflw, kfuw, 'n', 'w' )
    38123806          CALL pmci_interp_sn( u, uc, kcto, iflu, ifuu, kflo, kfuo, 'n', 'u' )
    3813 
    3814           IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                          &
    3815                ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                           &
    3816                  .NOT.  constant_diffusion ) )  THEN
    3817 !             CALL pmci_interp_sn( e, ec, kcto, iflo, ifuo, kflo, kfuo, 'n', 'e' )
    3818 !
    3819 !--          Interpolation of e is replaced by the Neumann condition.
     3807!
     3808!--       Treatment of TKE. Interpolation is only required if parent and child operate in RANS mode,
     3809!--       else, interpolation is replaced by a Neumann condition.
     3810          IF ( rans_mode_parent  .AND.  rans_mode )  THEN
     3811             CALL pmci_interp_sn( e, ec, kcto, iflo, ifuo, kflo, kfuo, 'n', 'e' )
     3812          ELSE
    38203813             DO  jbgp = ny+1, ny+nbgp
    38213814                e(nzb:nzt,jbgp,nxl:nxr) = e(nzb:nzt,ny,nxl:nxr)
     
    38823875    CALL pmci_interp_t( u, uc, kcto, iflu, ifuu, jflo, jfuo, 'u' )
    38833876    CALL pmci_interp_t( v, vc, kcto, iflo, ifuo, jflv, jfuv, 'v' )
    3884 
    3885     IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                                &
    3886          ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                                 &
    3887            .NOT.  constant_diffusion ) )  THEN
    3888 !       CALL pmci_interp_t( e, ec, kcto, iflo, ifuo, jflo, jfuo, 'e' )
    3889 !
    3890 !--    Interpolation of e is replaced by the Neumann condition.
     3877!
     3878!-- Treatment of TKE. Interpolation is only required if parent and child operate in RANS mode,
     3879!-- else, interpolation is replaced by a Neumann condition.
     3880    IF ( rans_mode_parent  .AND.  rans_mode )  THEN
     3881       CALL pmci_interp_t( e, ec, kcto, iflo, ifuo, jflo, jfuo, 'e' )
     3882    ELSE
    38913883       e(nzt+1,nys:nyn,nxl:nxr) = e(nzt,nys:nyn,nxl:nxr)
    38923884    ENDIF
  • palm/trunk/SOURCE/urban_surface_mod.f90

    r4733 r4734  
    2222! Current revisions:
    2323! -----------------
    24 ! Bugfix in calculation of absored radiation by windows (reflected radiation was not taken into
    25 ! account)
     24!
    2625!
    2726! Former revisions:
    2827! -----------------
    2928! $Id$
     29! Bugfix in calculation of absored radiation by windows (reflected radiation was not taken into
     30! account)
     31!
     32! 4733 2020-10-09 12:24:16Z maronga
    3033! Remove unused variables from USE statement
    3134!
Note: See TracChangeset for help on using the changeset viewer.