Changeset 2050 for palm/trunk/SOURCE


Ignore:
Timestamp:
Nov 8, 2016 3:00:55 PM (7 years ago)
Author:
gronemeier
Message:

Implement turbulent outflow condition

Location:
palm/trunk/SOURCE
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r2008 r2050  
    2020# Current revisions:
    2121# ------------------
    22 #
     22# Implement turbulent outflow method
    2323#
    2424# Former revisions:
     
    334334        ls_forcing_mod.f90 message.f90 microphysics_mod.f90 modules.f90 mod_kinds.f90 \
    335335        mod_particle_attributes.f90 netcdf_interface_mod.f90 nudging_mod.f90 \
    336         package_parin.f90 palm.f90 parin.f90 plant_canopy_model_mod.f90 pmc_interface_mod.f90 \
    337         pmc_child_mod.f90 pmc_general_mod.f90 pmc_handle_communicator_mod.f90 \
     336        outflow_turbulence.f90 package_parin.f90 palm.f90 parin.f90 plant_canopy_model_mod.f90 \
     337        pmc_interface_mod.f90 pmc_child_mod.f90 pmc_general_mod.f90 pmc_handle_communicator_mod.f90 \
    338338        pmc_mpi_wrapper_mod.f90 pmc_parent_mod.f90 poisfft_mod.f90 poismg_mod.f90 \
    339339        poismg_noopt.f90 posix_calls_from_fortran.f90 pres.f90 print_1d.f90 production_e.f90 \
     
    518518   land_surface_model_mod.o radiation_model_mod.o spectra_mod.o urban_surface_mod.o
    519519nudging_mod.o: modules.o cpulog_mod.o mod_kinds.o
     520outflow_turbulence.o: modules.o cpulog_mod.o mod_kinds.o
    520521package_parin.o: modules.o mod_kinds.o mod_particle_attributes.o
    521522palm.o: modules.o cpulog_mod.o land_surface_model_mod.o ls_forcing_mod.o mod_kinds.o nudging_mod.o\
  • palm/trunk/SOURCE/check_parameters.f90

    r2045 r2050  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Implement turbulent outflow condition
    2323!
    2424! Former revisions:
     
    37033703    ENDIF
    37043704
     3705
     3706    IF ( turbulent_outflow )  THEN
     3707!
     3708!--    Turbulent outflow requires Dirichlet conditions at the respective inflow
     3709!--    boundary (so far, a turbulent outflow is realized at the right side only)
     3710       IF ( bc_lr /= 'dirichlet/radiation' )  THEN
     3711          message_string = 'turbulent_outflow = .T. requires ' //              &
     3712                           'bc_lr = "dirichlet/radiation"'
     3713          CALL message( 'check_parameters', 'PA0038', 1, 2, 0, 6, 0 )
     3714       ENDIF
     3715!
     3716!--    The ouflow-source plane must lay inside the model domain
     3717       IF ( outflow_source_plane < dx  .OR.  &
     3718            outflow_source_plane > nx * dx )  THEN
     3719          WRITE( message_string, * )  'illegal value for outflow_source'//     &
     3720                                      '_plane: ', outflow_source_plane
     3721          CALL message( 'check_parameters', 'PA0145', 1, 2, 0, 6, 0 )
     3722       ENDIF
     3723    ENDIF
     3724
    37053725!
    37063726!-- Determine damping level index for 1D model
  • palm/trunk/SOURCE/header.f90

    r2038 r2050  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Implement turbulent outflow condition
    2323!
    2424! Former revisions:
     
    11211121                                inflow_damping_height, inflow_damping_width
    11221122          END IF
     1123       ENDIF
     1124       IF ( turbulent_outflow )  THEN
     1125          WRITE ( io, 323 )  outflow_source_plane, INT(outflow_source_plane/dx)
    11231126       ENDIF
    11241127    ENDIF
     
    20682071            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
    20692072            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
     2073323 FORMAT ('       turbulent outflow conditon switched on'/ &
     2074            '       position of outflow source plane: ',F7.1,' m   ', &
     2075                    'grid index: ', I4)
    20702076325 FORMAT (//' List output:'/ &
    20712077             ' -----------'//  &
  • palm/trunk/SOURCE/init_pegrid.f90

    r2001 r2050  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Implement turbulent outflow condition
    2323!
    2424! Former revisions:
     
    169169               nest_bound_n, nest_bound_r, nest_bound_s, nest_domain, neutral, &
    170170               psolver, outflow_l, outflow_n, outflow_r, outflow_s,            &
    171                recycling_width, scalar_advec, subdomain_size
     171               outflow_source_plane, recycling_width, scalar_advec,            &
     172               subdomain_size, turbulent_outflow
    172173
    173174    USE grid_variables,                                                        &
     
    199200    INTEGER(iwp) ::  i                        !<
    200201    INTEGER(iwp) ::  id_inflow_l              !<
     202    INTEGER(iwp) ::  id_outflow_l             !< local value of id_outflow
     203    INTEGER(iwp) ::  id_outflow_source_l      !< local value of id_outflow_source
    201204    INTEGER(iwp) ::  id_recycling_l           !<
    202205    INTEGER(iwp) ::  ind(5)                   !<
     
    11701173    ENDIF
    11711174
    1172        
    11731175!
    11741176!-- Broadcast the id of the inflow PE
     
    11941196    CALL MPI_ALLREDUCE( id_recycling_l, id_recycling, 1, MPI_INTEGER, MPI_SUM, &
    11951197                        comm1dx, ierr )
     1198
     1199!
     1200!-- Broadcast the id of the outflow PE and outflow-source plane
     1201    IF ( turbulent_outflow )  THEN
     1202
     1203       IF ( outflow_r )  THEN
     1204          id_outflow_l = myidx
     1205       ELSE
     1206          id_outflow_l = 0
     1207       ENDIF
     1208       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
     1209       CALL MPI_ALLREDUCE( id_outflow_l, id_outflow, 1, MPI_INTEGER, MPI_SUM, &
     1210                           comm1dx, ierr )
     1211
     1212       IF ( NINT( outflow_source_plane / dx ) >= nxl  .AND. &
     1213            NINT( outflow_source_plane / dx ) <= nxr )  THEN
     1214          id_outflow_source_l = myidx
     1215       ELSE
     1216          id_outflow_source_l = 0
     1217       ENDIF
     1218       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
     1219       CALL MPI_ALLREDUCE( id_outflow_source_l, id_outflow_source, 1, &
     1220                           MPI_INTEGER, MPI_SUM, comm1dx, ierr )
     1221
     1222    ENDIF
    11961223
    11971224    CALL location_message( 'finished', .TRUE. )
  • palm/trunk/SOURCE/modules.f90

    r2038 r2050  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Implement turbulent outflow condition
    2323!
    2424! Former revisions:
     
    783783                terminate_run = .FALSE., transpose_compute_overlap = .FALSE., &
    784784                turbulent_inflow = .FALSE.
     785    LOGICAL ::  turbulent_outflow = .FALSE. !< flag for turbulent outflow condition
    785786    LOGICAL ::  urban_surface = .FALSE.  !< flag for urban surface model
    786787    LOGICAL ::  use_cmax = .TRUE., use_initial_profile_as_reference = .FALSE., &
     
    832833                 molecular_viscosity = 1.461E-5_wp, &
    833834                 old_dt = 1.0E-10_wp, omega = 7.29212E-5_wp, omega_sor = 1.8_wp, &
     835                 outflow_source_plane = -9999999.9_wp, & !< x-position of outflow-source plane (turbulent outflow method)
    834836                 particle_maximum_age = 9999999.9_wp, &
    835837                 phi = 55.0_wp, prandtl_number = 1.0_wp, &
     
    11951197    CHARACTER(LEN=2) ::  send_receive = 'al'
    11961198    CHARACTER(LEN=7) ::  myid_char = ''
    1197     INTEGER(iwp)          ::  acc_rank, comm1dx, comm1dy, comm2d, comm_inter,       &
    1198                               comm_palm, id_inflow = 0, id_recycling = 0, ierr,     &
    1199                               myid = 0, myidx = 0, myidy = 0, ndim = 2, ngp_a,      &
    1200                               ngp_o, ngp_xy, ngp_y, npex = -1, npey = -1,           &
    1201                               numprocs = 1, numprocs_previous_run = -1,             &
    1202                               num_acc_per_node = 0, pleft, pnorth, pright, psouth,  &
    1203                               req_count = 0, sendrecvcount_xy, sendrecvcount_yz,    &
    1204                               sendrecvcount_zx, sendrecvcount_zyd,                  &
    1205                               sendrecvcount_yxd, target_id, tasks_per_node = -9999, &
    1206                               threads_per_task = 1, type_x, type_xy,    &
    1207                               type_y
     1199    INTEGER(iwp)     ::  acc_rank, comm1dx, comm1dy, comm2d, comm_inter,       &
     1200                         comm_palm, id_inflow = 0,                             &
     1201                         id_outflow = 0,        & !< myidx of procs at outflow (turbulent outflow method)
     1202                         id_outflow_source = 0, & !< myidx of procs including ouflow source plane (turbulent outflow method)
     1203                         id_recycling = 0, ierr,                               &
     1204                         myid = 0, myidx = 0, myidy = 0, ndim = 2, ngp_a,      &
     1205                         ngp_o, ngp_xy, ngp_y, npex = -1, npey = -1,           &
     1206                         numprocs = 1, numprocs_previous_run = -1,             &
     1207                         num_acc_per_node = 0, pleft, pnorth, pright, psouth,  &
     1208                         req_count = 0, sendrecvcount_xy, sendrecvcount_yz,    &
     1209                         sendrecvcount_zx, sendrecvcount_zyd,                  &
     1210                         sendrecvcount_yxd, target_id, tasks_per_node = -9999, &
     1211                         threads_per_task = 1, type_x, type_xy,    &
     1212                         type_y
    12081213
    12091214    INTEGER(iwp)          ::  pdims(2) = 1, req(100)
  • palm/trunk/SOURCE/parin.f90

    r2038 r2050  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Implement turbulent outflow condition
    2323!
    2424! Former revisions:
     
    348348             most_method, nc_const, netcdf_precision, neutral, ngsrb,          &
    349349             nsor, nsor_ini, nudging, nx, ny, nz, ocean, omega, omega_sor,     &
    350              passive_scalar, phi,                                              &
     350             outflow_source_plane, passive_scalar, phi,                        &
    351351             prandtl_number, precipitation, psolver, pt_damping_factor,        &
    352352             pt_damping_width, pt_reference, pt_surface,                       &
     
    369369             top_momentumflux_u, top_momentumflux_v, top_salinityflux,         &
    370370             top_scalarflux, transpose_compute_overlap, turbulent_inflow,      &
     371             turbulent_outflow,                                                &
    371372             use_subsidence_tendencies, ug_surface, ug_vertical_gradient,      &
    372373             ug_vertical_gradient_level, use_surface_fluxes, use_cmax,         &
  • palm/trunk/SOURCE/time_integration.f90

    r2032 r2050  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Implement turbulent outflow condition
    2323!
    2424! Former revisions:
     
    282282               time_dots, time_do_av, time_do_sla, time_disturb, time_dvrp,    &
    283283               time_run_control, time_since_reference_point,                   &
    284                turbulent_inflow, urban_surface,                                &
     284               turbulent_inflow, turbulent_outflow, urban_surface,             &
    285285               use_initial_profile_as_reference,                               &
    286286               use_single_reference_value, u_gtrans, v_gtrans, virtual_flight, &
     
    803803!--       Impose a turbulent inflow using the recycling method
    804804          IF ( turbulent_inflow )  CALL  inflow_turbulence
     805
     806!
     807!--       Set values at outflow boundary using the special outflow condition
     808          IF ( turbulent_outflow )  CALL  outflow_turbulence
    805809
    806810!
Note: See TracChangeset for help on using the changeset viewer.