Skip to content

Commit

Permalink
Merge branch 'ww3_gse2' of https://github.com/erdc/WW3 into ww3_gse2
Browse files Browse the repository at this point in the history
  • Loading branch information
aronroland committed Aug 9, 2024
2 parents d28cbc3 + 27ef149 commit 99957a5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions model/src/w3profsmd_pdlib.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7847,7 +7847,7 @@ SUBROUTINE BLOCK_SOLVER_DIFFUSION(DTG)
IP = INE(IDX,IE)
eDiffNorm = HYPOT(DIFFVEC(1,IP), DIFFVEC(2,IP))
if (eDiffNorm .gt. tiny(1.)) then
eDeltaT = min(DTG, PDLIB_SI(IP) / (eDiffNorm * dfac * eNorm /(4. * eDet))) ! modified for diffusion vector
eDeltaT = min(DTG, 0.8 * PDLIB_SI(IP) / (eDiffNorm * dfac * eNorm /(4. * eDet))) ! modified for diffusion vector
else
eDeltaT = DTG
endif
Expand All @@ -7868,7 +7868,7 @@ SUBROUTINE BLOCK_SOLVER_DIFFUSION(DTG)
PHI_V = 0.

WRITE(5000+myrank,*) 'NUMBER OF SUB ITERATIONS', ITH, IK, NB_ITER, DT_DIFF, DeltaTmax
!CALL FLUSH(5000+myrank)
CALL FLUSH(5000+myrank)

DO IT = 1, NB_ITER
DO IE = 1, NE
Expand All @@ -7893,12 +7893,16 @@ SUBROUTINE BLOCK_SOLVER_DIFFUSION(DTG)
V(2) = 0.5 * PDLIB_IEN(2*IDX ,IE)
eScal = DOT_PRODUCT(V, GRAD(1:2))
IP = INE(IDX,IE)
PHI_V(IP) = PHI_V(IP) + eScal
PHI_V(IP) = PHI_V(IP) + eScal !+ 1./3. * 2 * DV2DXY(IP) * DIFFVEC(3,IP)
END DO
END DO
CALL PDLIB_exchange1DREAL(PHI_V)
DO JSEA =1, NSEAL
DIFFTOT = - (DT_DIFF * PHI_V(JSEA) / PDLIB_SI(JSEA) + DT_DIFF * 2 * DV2DXY(JSEA) * DIFFVEC(3,JSEA)) * DFAC * IOBDP_LOC(JSEA)
IF (IOBP_LOC(JSEA) .EQ. 1) THEN
DIFFTOT = - DT_DIFF * DFAC * ( PHI_V(JSEA) / PDLIB_SI(JSEA) + 2 * DV2DXY(IP) * DIFFVEC(3,IP) )
ELSE
DIFFTOT = 0
ENDIF
VA(ISP,JSEA) = MAX(0.,VA(ISP,JSEA) + DIFFTOT )
!IF (ABS(DIFFTOT) .GT. 0.) THEN
! WRITE(50000+myrank,'(2I10,10F20.10)') JSEA, ISP, VA(ISP,JSEA), DT_DIFF, PHI_V(JSEA), PDLIB_SI(JSEA), DV2DXY(JSEA), DIFFVEC(3,JSEA), DFAC, IOBDP_LOC(JSEA)
Expand Down

0 comments on commit 99957a5

Please sign in to comment.