subroutine fixuinf2 use modglobal, only : ib,ie,jb,je,kb,ke,kh,dxf,xh,dt,& Uinf,ifixuinf,tscale,timee,rk3step,inletav,& freestreamav,freestrtmpav,ltempeq use modsurfdata,only: thl_top use modfields, only : u0,thl0,dpdxl,dgdt,dpdx,thlsrcdt use modmpi, only : myid,comm3d,mpierr,mpi_sum,my_real,nprocs implicit none real utop,freestream,freestrtmp,rk3coef integer i,j utop = 0. if ((ifixuinf==2) .and. (rk3step==3)) then call detfreestream(freestream) freestreamav= freestream*dt/inletav + (1.-dt/inletav)*freestreamav ! Write some statistics to monitoring file ! if (myid==0) then ! open(unit=11,file='freestr.txt',position='append') ! write(11,3002) timee,freestream,freestreamav ! 3002 format (13(6e14.6)) ! close(11) ! endif ! dgdt = (1./tscale) * (freestream - Uinf) ! dgdt = (1./dt) * (freestreamav - Uinf) dgdt = (1./tscale) * (freestreamav - Uinf) ! plus sign because dpdx is SUBTRACTED from Navier-Stokes eqs ! dgdt = (1./inletav) * (freestreamav - Uinf) ! if (ltempeq) then !tg3315 commented ! call detfreestrtmp(freestrtmp) ! freestrtmpav= freestrtmp*dt/inletav + (1.-dt/inletav)*freestrtmpav ! thlsrcdt = -(1./tscale) * (freestrtmpav - thl_top) ! minus sign because thlsr is ADDED to Navier-Stokes eqs. ! if (myid==0) then ! open(unit=11,file='theta_top.txt',position='append') ! write(11,3009) timee,freestrtmp,freestrtmpav !3009 format (13(6e20.12)) ! close(11) ! endif ! end if end if end subroutine fixuinf2