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

Implement turbulent outflow condition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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. )
Note: See TracChangeset for help on using the changeset viewer.