-
Notifications
You must be signed in to change notification settings - Fork 664
Open
Milestone
Description
I'm looking at mass fluxes across interpolated mesh boundaries. I'm having difficulties getting matching diffusive mass fluxes across mesh boundaries with refinement.
Add this piece of code in line 267 of divg.f90 to write out computed fluxes in one interpolated boundary face (4 faces fine side) as seen from the two meshes of the attached case.
N=1; RHO_D_DZDN=0._EB
DO K=0,KBAR
DO J=0,JBAR
DO I=0,IBAR
IF(NM==1 .AND. I==8 .AND. (J==3 .OR. J==4) .AND. (K==3 .OR. K==4)) THEN ! <- With Refinement
!IF(NM==1 .AND. I==4 .AND. J==2 .AND. K==2) THEN ! <- No Refinement
WRITE(LU_ERR,*) 'NM,N,I,J,K=',NM,N,I,J,K,' : RHO_D_DZDX=',RHO_D_DZDX(I,J,K,N)
RHO_D_DZDN=RHO_D_DZDN+RHO_D_DZDX(I,J,K,N)
ELSEIF(NM==2 .AND. I==0 .AND. J==2 .AND. K==2) THEN
WRITE(LU_ERR,*) 'NM,N,I,J,K=',NM,N,I,J,K,' : RHO_D_DZDX=',RHO_D_DZDX(I,J,K,N)
WRITE(LU_ERR,*) ' '; WRITE(LU_ERR,*) ' '
ENDIF
ENDDO
ENDDO
ENDDO
IF(NM==1) THEN ! <- With Refinement
WRITE(LU_ERR,*) ' '
WRITE(LU_ERR,*) 'Fine NM,N=',NM,N,' : Average RHO_D_DZDX=',1._EB/4._EB*RHO_D_DZDN ! Area average.
ENDIF
When commenting the lines with tag "With Refinement", uncommenting the "No refinement" line and using the 4x4x4 left mesh specified in the input file I get matching fluxes for the boundary face. I'm not seeing that for the case with refinement.