Skip to content

Commit

Permalink
Corrected the calcuiation of Pi, the source term for k_sgs for the ca…
Browse files Browse the repository at this point in the history
…se of the mixed model for tau_ij.
  • Loading branch information
schumakov committed Mar 18, 2010
1 parent eb87ad2 commit f01e298
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
24 changes: 13 additions & 11 deletions m_les.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
! The behaviour of the module is governed by the variable "les_mode" from the
! module m_parameters.f90
!
! Time-stamp: <2009-08-26 09:56:46 (chumakov)>
! Time-stamp: <2010-03-18 13:52:33 (chumakov)>
!================================================================================
module m_les

Expand Down Expand Up @@ -322,16 +322,17 @@ subroutine m_les_init
!<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> DEBUG+
inquire(file = 'c_mixed.in', exist = there)
if (.not.there) then
write(out,*) "Cannot find the file 'c_mixed.in', exiting"
call my_exit(-1)
end if
if (iammaster) then
open(900,file='c_mixed.in')
read(900,*) C_mixed
close(900)
write(out,*) "Cannot find the file 'c_mixed.in', making default 0.5"
c_mixed = 0.5d0
else
if (iammaster) then
open(900,file='c_mixed.in')
read(900,*) C_mixed
close(900)
end if
count = 1
call MPI_BCAST(C_mixed,count,MPI_REAL8,0,MPI_COMM_TASK,mpi_err)
end if
count = 1
call MPI_BCAST(C_mixed,count,MPI_REAL8,0,MPI_COMM_TASK,mpi_err)
write(out,*) "MIXED MODEL WITH C_MIXED = ",C_mixed
call flush(out)
!<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> DEBUG-
Expand Down Expand Up @@ -1029,6 +1030,7 @@ subroutine m_les_rhss_turb_visc
integer :: i
do i = 4, 3+n_scalars+n_les
call m_les_rhss_turb_visc1(i)

end do
return
end subroutine m_les_rhss_turb_visc
Expand Down Expand Up @@ -2164,7 +2166,7 @@ subroutine m_les_get_tauij_dstm_source_BT
wrk(:,:,:,n5) = wrk(:,:,:,n5) * wrk(:,:,:,n4)

! adding the part of Pi that comes from the viscous part of the model for tau_ij
wrk(1:nx,:,:,n5) = wrk(1:nx,:,:,n5) + turb_visc(1:nx,:,:)**3 / (c_smag*les_delta)**4
wrk(1:nx,:,:,n5) = wrk(1:nx,:,:,n5) + C_mixed * turb_visc(1:nx,:,:)**3 / (c_smag*les_delta)**4

! converting the energy transfer to F-space and adding to the RHS for (BT)
call xFFT3d(1,n5)
Expand Down
4 changes: 2 additions & 2 deletions m_openmpi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module m_openmpi
! Uncomment this for the systems that do not have OpenMPI
! In OpenMPI, the parameter MPI_INTEGER_KIND is defined in 'mpif.h'
! With other MPI implementations, this parameter has to be defined manually.
integer MPI_INTEGER_KIND
parameter (MPI_INTEGER_KIND = 4)
! integer MPI_INTEGER_KIND
! parameter (MPI_INTEGER_KIND = 4)

! --- MPI variables
logical :: iammaster
Expand Down
2 changes: 1 addition & 1 deletion main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ program x_code


!********************************************************************************
call benchmark
! call benchmark
!********************************************************************************

!================================================================================
Expand Down
3 changes: 1 addition & 2 deletions restart_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,11 @@ subroutine restart_read_parallel

! checking if the number of LES quantities is the same in .in and restart files
if (n_les .ne. nles1) then
write(out,*) '*** error: Different values of n_les:'
write(out,*) '*** WARNING : Different values of n_les:'
write(out,*) '*** .in file: ',n_les
write(out,*) '*** restart file: ',nles1
write(out,*) '*** Make sure you are running the same simulation.'
call flush(out)
call my_exit(-1)
end if

!-----------------------------------------------------------------------
Expand Down

0 comments on commit f01e298

Please sign in to comment.