calcreyn Subroutine

private subroutine calcreyn()

Uses

  • proc~~calcreyn~~UsesGraph proc~calcreyn calcreyn module~modfields modfields proc~calcreyn->module~modfields module~modglobal modglobal proc~calcreyn->module~modglobal module~modmpi modmpi proc~calcreyn->module~modmpi module~modsubgriddata modsubgriddata proc~calcreyn->module~modsubgriddata decomp_2d decomp_2d module~modfields->decomp_2d mpi mpi module~modmpi->mpi

Arguments

None

Calls

proc~~calcreyn~~CallsGraph proc~calcreyn calcreyn mpi_allreduce mpi_allreduce proc~calcreyn->mpi_allreduce

Source Code

  subroutine calcreyn

    use modglobal, only : ib,ie,jb,je,ke,kb,dy,dxh,dzh
    use modfields, only : u0,v0,w0
    use modmpi,    only : myid,comm3d,mpi_sum,mpi_max,my_real,mpierr
    use modsubgriddata, only : ekm,ekh
    implicit none

    real reyntotl,reyntot
    integer       :: i,j,k

    reyntotl = 0.
    reyntot  = 0.
    do k=kb,ke
      do j=jb,je
        do i=ib,ie
      reyntotl = max(reyntotl,  u0(i,j,k) * dxh(i) / ekm(i,j,k), v0(i,j,k) * dy / ekm(i,j,k),  &
                                    w0(i,j,k) * dzh(k) / ekm(i,j,k))  ! or should I interpolate ekm to the correct position?
        end do
      end do
    end do

    call MPI_ALLREDUCE(reyntotl,reyntot,1,MY_REAL,MPI_MAX,comm3d,mpierr)
    if (myid==0) then
      write(6,'(A,ES10.2)') 'Cell Reynolds number:',reyntot
    end if

  end subroutine calcreyn