Skip to content

Commit

Permalink
Merge pull request #13952 from marcosvanella/master
Browse files Browse the repository at this point in the history
FDS Source: Remove interpolation in CFACE wall pressure calculation.
  • Loading branch information
marcosvanella authored Dec 27, 2024
2 parents ae978b6 + aaca2f2 commit cd9eb53
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 39 deletions.
43 changes: 8 additions & 35 deletions Source/ccib.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6487,43 +6487,16 @@ SUBROUTINE GET_PRES_CFACE(PRESS,IND1,IND2,CFA)
REAL(EB), INTENT(OUT) :: PRESS

! Local Variables:
INTEGER :: VIND, EP, INT_NPE_LO, INT_NPE_HI, INPE, ICC, IIG, JJG, KKG
! REAL(EB):: VVEL(IAXIS:KAXIS), U_NORM
INTEGER :: ICC, IIG, JJG, KKG
TYPE(BOUNDARY_PROP1_TYPE), POINTER :: B1

! Cell-centered variables:
VIND=0; EP = 1
INT_NPE_HI = CUT_FACE(IND1)%INT_NPE(HIGH_IND,VIND,EP,IND2)
IF (INT_NPE_HI > 0) THEN
! ! First normal velocity:
! VVEL(IAXIS:KAXIS) = 0._EB
! DO VIND=IAXIS,KAXIS
! INT_NPE_LO = CUT_FACE(IND1)%INT_NPE( LOW_IND,VIND,EP,IND2)
! INT_NPE_HI = CUT_FACE(IND1)%INT_NPE(HIGH_IND,VIND,EP,IND2)
! DO INPE=INT_NPE_LO+1,INT_NPE_LO+INT_NPE_HI
! VVEL(VIND) = VVEL(VIND) + CUT_FACE(IND1)%INT_COEF(INPE)*CUT_FACE(IND1)%INT_FVARS(INT_VEL_IND,INPE)
! ENDDO
! ENDDO
! U_NORM = DOT_PRODUCT(VVEL , CFACE(CUT_FACE(IND1)%CFACE_INDEX(IND2))%NVEC)

! Now Pressure:
! VIND=0;
PRESS=0._EB
INT_NPE_LO = CUT_FACE(IND1)%INT_NPE( LOW_IND,VIND,EP,IND2)
! INT_NPE_HI = CUT_FACE(IND1)%INT_NPE(HIGH_IND,VIND,EP,IND2)
DO INPE=INT_NPE_LO+1,INT_NPE_LO+INT_NPE_HI
PRESS = PRESS + CUT_FACE(IND1)%INT_COEF(INPE)*CUT_FACE(IND1)%INT_CVARS( INT_P_IND,INPE)
ENDDO
! PRESS = PRESS + B1%RHO_F*U_NORM**2._EB
ELSE
B1 => BOUNDARY_PROP1(CFA%B1_INDEX)
! Underlying cell approximate value:
ICC = CUT_FACE(IND1)%CELL_LIST(2,LOW_IND,IND2)
IIG = CUT_CELL(ICC)%IJK(1)
JJG = CUT_CELL(ICC)%IJK(2)
KKG = CUT_CELL(ICC)%IJK(3)
PRESS=B1%RHO_G*(H(IIG,JJG,KKG)-KRES(IIG,JJG,KKG))
ENDIF
B1 => BOUNDARY_PROP1(CFA%B1_INDEX)
! Underlying cell values corresponding to cut-cell:
ICC = CUT_FACE(IND1)%CELL_LIST(2,LOW_IND,IND2)
IIG = CUT_CELL(ICC)%IJK(IAXIS)
JJG = CUT_CELL(ICC)%IJK(JAXIS)
KKG = CUT_CELL(ICC)%IJK(KAXIS)
PRESS=B1%RHO_G*(H(IIG,JJG,KKG)-KRES(IIG,JJG,KKG))

RETURN
END SUBROUTINE GET_PRES_CFACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

&MISC SIMULATION_MODE='LES', BNDF_DEFAULT=.FALSE. /

&PRES MAX_PRESSURE_ITERATIONS=50 /
&PRES SOLVER='UGLMAT HYPRE' /

&SURF ID='BUILDING', RGB=245,245,245 /
&SURF ID='GROUND', ROUGHNESS=0.0003, RGB=110,139,61 /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

&MISC SIMULATION_MODE='LES', BNDF_DEFAULT=.FALSE. /

&PRES MAX_PRESSURE_ITERATIONS=50 /
&PRES SOLVER='UGLMAT HYPRE' /

&SURF ID='BUILDING', RGB=245,245,245 /
&SURF ID='GROUND', ROUGHNESS=0.0003, RGB=110,139,61 /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

&MISC SIMULATION_MODE='LES', BNDF_DEFAULT=.FALSE. /

&PRES MAX_PRESSURE_ITERATIONS=50 /
&PRES SOLVER='UGLMAT HYPRE' /

&SURF ID='BUILDING', RGB=245,245,245 /
&SURF ID='GROUND', ROUGHNESS=0.0003, RGB=110,139,61 /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

&MISC SIMULATION_MODE='LES', BNDF_DEFAULT=.FALSE. /

&PRES MAX_PRESSURE_ITERATIONS=50 /
&PRES SOLVER='UGLMAT HYPRE' /

&SURF ID='BUILDING', RGB=245,245,245 /
&SURF ID='GROUND', ROUGHNESS=0.0003, RGB=110,139,61 /
Expand Down

0 comments on commit cd9eb53

Please sign in to comment.