diff --git a/Source/ccib.f90 b/Source/ccib.f90 index ece31a7a56a..71388936eec 100644 --- a/Source/ccib.f90 +++ b/Source/ccib.f90 @@ -1673,6 +1673,7 @@ SUBROUTINE GET_FH_FROM_PRHS_AND_BCS(NM,DT,CYL_FCT,UNKH,NUNKH,IPZ,F_H) ! Local variables: INTEGER :: I,J,K,IROW,IW,IIG,JJG,KKG,IOR,ICFACE,IFACE,JFACE,ILH,JLH,KLH,IRC TYPE (WALL_TYPE), POINTER :: WC=>NULL() +TYPE (EXTERNAL_WALL_TYPE), POINTER :: EWC=>NULL() TYPE(CFACE_TYPE), POINTER :: CFA=>NULL() REAL(EB) :: IDX, AF, VAL, BCV @@ -1708,9 +1709,10 @@ SUBROUTINE GET_FH_FROM_PRHS_AND_BCS(NM,DT,CYL_FCT,UNKH,NUNKH,IPZ,F_H) IFACE= CFA%CUT_FACE_IND1 JFACE= CFA%CUT_FACE_IND2 WC => WALL(CUT_FACE(IFACE)%IWC) + EWC => EXTERNAL_WALL(CUT_FACE(IFACE)%IWC) ! DIRICHLET boundaries: - IF_CFACE_DIRICHLET: IF (WC%PRESSURE_BC_INDEX==DIRICHLET) THEN + IF_CFACE_DIRICHLET: IF (EWC%PRESSURE_BC_TYPE==DIRICHLET) THEN ! Gasphase cell indexes: BC => BOUNDARY_COORD(WC%BC_INDEX); IF(ZONE_SOLVE(PRESSURE_ZONE(BC%IIG,BC%JJG,BC%KKG))%CONNECTED_ZONE_PARENT/=IPZ) CYCLE @@ -1747,6 +1749,7 @@ SUBROUTINE GET_FH_FROM_PRHS_AND_BCS(NM,DT,CYL_FCT,UNKH,NUNKH,IPZ,F_H) WALL_CELL_LOOP_1: DO IW=1,N_EXTERNAL_WALL_CELLS WC => WALL(IW) + EWC => EXTERNAL_WALL(IW) ! Drop if this is a cut-face or NULL Boundary. Dealt with external CFACE. IF (WC%CUT_FACE_INDEX>0 .OR. WC%BOUNDARY_TYPE==NULL_BOUNDARY) CYCLE ! Gasphase cell indexes: @@ -1754,7 +1757,7 @@ SUBROUTINE GET_FH_FROM_PRHS_AND_BCS(NM,DT,CYL_FCT,UNKH,NUNKH,IPZ,F_H) IIG = BC%IIG; JJG = BC%JJG; KKG = BC%KKG; IOR = BC%IOR ! NEUMANN boundaries: - IF_NEUMANN: IF (WC%PRESSURE_BC_INDEX==NEUMANN) THEN + IF_NEUMANN: IF (EWC%PRESSURE_BC_TYPE==NEUMANN) THEN ! Define cell size, normal to WC: SELECT CASE (IOR) CASE(-1) ! -IAXIS oriented, high face of IIG cell. @@ -1790,7 +1793,7 @@ SUBROUTINE GET_FH_FROM_PRHS_AND_BCS(NM,DT,CYL_FCT,UNKH,NUNKH,IPZ,F_H) ENDIF IF_NEUMANN ! DIRICHLET boundaries: - IF_DIRICHLET: IF (WC%PRESSURE_BC_INDEX==DIRICHLET) THEN + IF_DIRICHLET: IF (EWC%PRESSURE_BC_TYPE==DIRICHLET) THEN ! Global matrix solve, skip INTERPOLATED boundaries. IF (PRES_FLAG/=ULMAT_FLAG .AND. WC%BOUNDARY_TYPE==INTERPOLATED_BOUNDARY) CYCLE ! Here case where SOLID and OPEN or interpolated are mixed on a boundary: diff --git a/Source/func.f90 b/Source/func.f90 index c3597d9923d..00f6e37e081 100644 --- a/Source/func.f90 +++ b/Source/func.f90 @@ -1580,9 +1580,7 @@ SUBROUTINE PACK_WALL(NM,OS,WC,SURF_INDEX,RC,IC,LC,UNPACK_IT,COUNT_ONLY) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%BACK_MESH,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%BACK_SURF,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%BOUNDARY_TYPE,UNPACK_IT) -IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%SURF_INDEX_ORIG,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%OBST_INDEX,UNPACK_IT) -IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%PRESSURE_BC_INDEX,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%VENT_INDEX,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%JD11_INDEX,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),WC%JD12_INDEX,UNPACK_IT) diff --git a/Source/init.f90 b/Source/init.f90 index be3afc3cdd5..96c18f4fcfb 100644 --- a/Source/init.f90 +++ b/Source/init.f90 @@ -2296,6 +2296,7 @@ SUBROUTINE INITIALIZE_POISSON_SOLVER(NM) INTEGER, POINTER, DIMENSION(:) :: NOC TYPE (VENTS_TYPE), POINTER :: VT TYPE (WALL_TYPE), POINTER :: WC +TYPE (EXTERNAL_WALL_TYPE), POINTER :: EWC TYPE (MESH_TYPE), POINTER :: M TYPE (BOUNDARY_COORD_TYPE), POINTER :: BC @@ -2570,31 +2571,32 @@ SUBROUTINE INITIALIZE_POISSON_SOLVER(NM) WALL_CELL_LOOP: DO IW=1,M%N_EXTERNAL_WALL_CELLS WC => M%WALL(IW) + EWC => M%EXTERNAL_WALL(IW) BC => M%BOUNDARY_COORD(WC%BC_INDEX) IOR = BC%IOR SELECT CASE(IOR) CASE( 1) IF (LBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. & - LBC==FISHPAK_BC_NEUMANN_DIRICHLET .OR. LBC==6) WC%PRESSURE_BC_INDEX = NEUMANN + LBC==FISHPAK_BC_NEUMANN_DIRICHLET .OR. LBC==6) EWC%PRESSURE_BC_TYPE = NEUMANN IF (LBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. & - LBC==FISHPAK_BC_DIRICHLET_NEUMANN .OR. LBC==5) WC%PRESSURE_BC_INDEX = DIRICHLET + LBC==FISHPAK_BC_DIRICHLET_NEUMANN .OR. LBC==5) EWC%PRESSURE_BC_TYPE = DIRICHLET CASE(-1) IF (LBC==FISHPAK_BC_DIRICHLET_NEUMANN .OR. & - LBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. LBC==6) WC%PRESSURE_BC_INDEX = NEUMANN + LBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. LBC==6) EWC%PRESSURE_BC_TYPE = NEUMANN IF (LBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. & - LBC==FISHPAK_BC_NEUMANN_DIRICHLET .OR. LBC==5) WC%PRESSURE_BC_INDEX = DIRICHLET + LBC==FISHPAK_BC_NEUMANN_DIRICHLET .OR. LBC==5) EWC%PRESSURE_BC_TYPE = DIRICHLET CASE( 2) - IF (MBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. MBC==FISHPAK_BC_NEUMANN_DIRICHLET) WC%PRESSURE_BC_INDEX = NEUMANN - IF (MBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. MBC==FISHPAK_BC_DIRICHLET_NEUMANN) WC%PRESSURE_BC_INDEX = DIRICHLET + IF (MBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. MBC==FISHPAK_BC_NEUMANN_DIRICHLET) EWC%PRESSURE_BC_TYPE = NEUMANN + IF (MBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. MBC==FISHPAK_BC_DIRICHLET_NEUMANN) EWC%PRESSURE_BC_TYPE = DIRICHLET CASE(-2) - IF (MBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. MBC==FISHPAK_BC_DIRICHLET_NEUMANN) WC%PRESSURE_BC_INDEX = NEUMANN - IF (MBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. MBC==FISHPAK_BC_NEUMANN_DIRICHLET) WC%PRESSURE_BC_INDEX = DIRICHLET + IF (MBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. MBC==FISHPAK_BC_DIRICHLET_NEUMANN) EWC%PRESSURE_BC_TYPE = NEUMANN + IF (MBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. MBC==FISHPAK_BC_NEUMANN_DIRICHLET) EWC%PRESSURE_BC_TYPE = DIRICHLET CASE( 3) - IF (NBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. NBC==FISHPAK_BC_NEUMANN_DIRICHLET) WC%PRESSURE_BC_INDEX = NEUMANN - IF (NBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. NBC==FISHPAK_BC_DIRICHLET_NEUMANN) WC%PRESSURE_BC_INDEX = DIRICHLET + IF (NBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. NBC==FISHPAK_BC_NEUMANN_DIRICHLET) EWC%PRESSURE_BC_TYPE = NEUMANN + IF (NBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. NBC==FISHPAK_BC_DIRICHLET_NEUMANN) EWC%PRESSURE_BC_TYPE = DIRICHLET CASE(-3) - IF (NBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. NBC==FISHPAK_BC_DIRICHLET_NEUMANN) WC%PRESSURE_BC_INDEX = NEUMANN - IF (NBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. NBC==FISHPAK_BC_NEUMANN_DIRICHLET) WC%PRESSURE_BC_INDEX = DIRICHLET + IF (NBC==FISHPAK_BC_NEUMANN_NEUMANN .OR. NBC==FISHPAK_BC_DIRICHLET_NEUMANN) EWC%PRESSURE_BC_TYPE = NEUMANN + IF (NBC==FISHPAK_BC_DIRICHLET_DIRICHLET .OR. NBC==FISHPAK_BC_NEUMANN_DIRICHLET) EWC%PRESSURE_BC_TYPE = DIRICHLET END SELECT ENDDO WALL_CELL_LOOP @@ -3543,7 +3545,7 @@ SUBROUTINE INIT_WALL_CELL(NM,I,J,K,OBST_INDEX,IW,IOR,SURF_INDEX,IERR,TT) ! Record original boundary condition index for exterior wall cells that might get covered up -IF (OBST_INDEX==0) WC%SURF_INDEX_ORIG = SURF_INDEX_NEW +IF (OBST_INDEX==0 .AND. IW<=M%N_EXTERNAL_WALL_CELLS) EWC%SURF_INDEX_ORIG = SURF_INDEX_NEW END SUBROUTINE INIT_WALL_CELL @@ -4555,9 +4557,10 @@ SUBROUTINE REASSIGN_WALL_CELLS(T,NM) SUBROUTINE GET_BOUNDARY_TYPE -INTEGER :: IOR,IIG,JJG,KKG,IW_OLD,IERR,PRESSURE_BC_INDEX,ICG_OLD,II +INTEGER :: IOR,IIG,JJG,KKG,IW_OLD,IERR,PRESSURE_BC_TYPE,ICG_OLD,II TYPE (BOUNDARY_PROP1_TYPE), POINTER :: B1,B1_OLD TYPE (WALL_TYPE), POINTER :: WC_OLD +TYPE (EXTERNAL_WALL_TYPE), POINTER :: EWC TYPE (STORAGE_TYPE), POINTER :: OS TYPE (SURFACE_TYPE), POINTER :: SF @@ -4565,20 +4568,21 @@ SUBROUTINE GET_BOUNDARY_TYPE BC => MESHES(NM)%BOUNDARY_COORD(WC%BC_INDEX) IF (IW<=N_EXTERNAL_WALL_CELLS .AND. REMOVE) THEN + EWC => MESHES(NM)%EXTERNAL_WALL(IW) WC%BOUNDARY_TYPE = SOLID_BOUNDARY CELL(IC)%SOLID = .TRUE. - IF (WC%SURF_INDEX_ORIG==MIRROR_SURF_INDEX) THEN + IF (EWC%SURF_INDEX_ORIG==MIRROR_SURF_INDEX) THEN WC%BOUNDARY_TYPE = MIRROR_BOUNDARY WC%SURF_INDEX = MIRROR_SURF_INDEX CELL(IC)%SOLID = .TRUE. RETURN ENDIF - IF (WC%SURF_INDEX_ORIG==OPEN_SURF_INDEX) THEN + IF (EWC%SURF_INDEX_ORIG==OPEN_SURF_INDEX) THEN WC%BOUNDARY_TYPE = OPEN_BOUNDARY WC%SURF_INDEX = OPEN_SURF_INDEX CELL(IC)%SOLID = .FALSE. ENDIF - IF (WC%SURF_INDEX_ORIG==INTERPOLATED_SURF_INDEX) THEN + IF (EWC%SURF_INDEX_ORIG==INTERPOLATED_SURF_INDEX) THEN WC%BOUNDARY_TYPE = INTERPOLATED_BOUNDARY WC%SURF_INDEX = INTERPOLATED_SURF_INDEX CELL(IC)%SOLID = .FALSE. @@ -4607,7 +4611,9 @@ SUBROUTINE GET_BOUNDARY_TYPE IF (WC%BOUNDARY_TYPE/=NULL_BOUNDARY) THEN IF (IW<=N_EXTERNAL_WALL_CELLS) THEN WC%OBST_INDEX = 0 - WC%SURF_INDEX = WC%SURF_INDEX_ORIG + EWC => EXTERNAL_WALL(IW) + WC%SURF_INDEX = EWC%SURF_INDEX_ORIG + PRESSURE_BC_TYPE = EWC%PRESSURE_BC_TYPE ! Save this parameter and restore it after the call to INIT_WALL_CELL ENDIF IF (CELL(IC)%OBST_INDEX>0) THEN WC%OBST_INDEX = CELL(IC)%OBST_INDEX @@ -4617,10 +4623,9 @@ SUBROUTINE GET_BOUNDARY_TYPE WC%SURF_INDEX = OBSTRUCTION(WC%OBST_INDEX)%SURF_INDEX(BC%IOR) ENDIF IF (OBSTRUCTION(WC%OBST_INDEX)%SURF_INDEX_INTERIOR>0) WC%SURF_INDEX = OBSTRUCTION(WC%OBST_INDEX)%SURF_INDEX_INTERIOR - PRESSURE_BC_INDEX = WC%PRESSURE_BC_INDEX ! Save this parameter and restore it after the call to INIT_WALL_CELL CALL INIT_WALL_CELL(NM,BC%II,BC%JJ,BC%KK,WC%OBST_INDEX,IW,BC%IOR,WC%SURF_INDEX,IERR,T) WC => MESHES(NM)%WALL(IW) - WC%PRESSURE_BC_INDEX = PRESSURE_BC_INDEX + IF (IW<=N_EXTERNAL_WALL_CELLS) EWC%PRESSURE_BC_TYPE = PRESSURE_BC_TYPE ENDIF ! Special case: A BURNed_AWAY obstruction exposes a surface that also burns, in which case the surface is to ignite immediately. diff --git a/Source/pres.f90 b/Source/pres.f90 index f9f5bc351fc..e8c010a71b3 100644 --- a/Source/pres.f90 +++ b/Source/pres.f90 @@ -76,7 +76,7 @@ SUBROUTINE PRESSURE_SOLVER_COMPUTE_RHS(T,DT,NM) ! Apply pressure gradients at NEUMANN boundaries: dH/dn = -F_n - d(u_n)/dt - IF_NEUMANN: IF (WC%PRESSURE_BC_INDEX==NEUMANN) THEN + IF_NEUMANN: IF (EWC%PRESSURE_BC_TYPE==NEUMANN) THEN SELECT CASE(IOR) CASE( 1) @@ -96,7 +96,7 @@ SUBROUTINE PRESSURE_SOLVER_COMPUTE_RHS(T,DT,NM) ! Apply pressures at DIRICHLET boundaries, depending on the specific type - IF_DIRICHLET: IF (WC%PRESSURE_BC_INDEX==DIRICHLET) THEN + IF_DIRICHLET: IF (EWC%PRESSURE_BC_TYPE==DIRICHLET) THEN NOT_OPEN: IF (WC%BOUNDARY_TYPE/=OPEN_BOUNDARY .AND. WC%BOUNDARY_TYPE/=INTERPOLATED_BOUNDARY) THEN @@ -1126,6 +1126,7 @@ SUBROUTINE ULMAT_SOLVER_SETUP(NM) TYPE(ZONE_MESH_TYPE), POINTER :: ZM TYPE (MESH_TYPE), POINTER :: M=>NULL() TYPE (WALL_TYPE), POINTER :: WC=>NULL() +TYPE (EXTERNAL_WALL_TYPE), POINTER :: EWC=>NULL() TYPE (BOUNDARY_COORD_TYPE), POINTER :: BC INTEGER, PARAMETER :: NULL_BTYPE=0,DIRICHLET_BTYPE=1,NEUMANN_BTYPE=2,PERIODIC_BTYPE=3 @@ -1207,6 +1208,7 @@ SUBROUTINE ULMAT_SOLVER_SETUP(NM) ZBTYPE_LAST=NULL_BTYPE WALL_LOOP: DO IW=1,M%N_EXTERNAL_WALL_CELLS WC=>M%WALL(IW) + EWC=>M%EXTERNAL_WALL(IW) BC=>M%BOUNDARY_COORD(WC%BC_INDEX) IOR = BC%IOR WALL_BTYPE=NULL_BTYPE @@ -1224,7 +1226,7 @@ SUBROUTINE ULMAT_SOLVER_SETUP(NM) ! Test for obstructions on an open boundary or mirror set to dirichlet IF ( (WC%BOUNDARY_TYPE==SOLID_BOUNDARY .OR. WC%BOUNDARY_TYPE==MIRROR_BOUNDARY) & - .AND. WC%PRESSURE_BC_INDEX==DIRICHLET) THEN + .AND. EWC%PRESSURE_BC_TYPE==DIRICHLET) THEN ZM%USE_FFT=.FALSE. EXIT WALL_LOOP ENDIF @@ -1439,6 +1441,7 @@ SUBROUTINE ULMAT_SOLVE_ZONE(NM,IPZ) REAL(EB):: SUM_FH(1:2),MEAN_FH,SUM_XH(1:2),MEAN_XH,DIV_FN_VOL,DIV_FN,IDX,AF,VAL,BCV TYPE(ZONE_MESH_TYPE), POINTER :: ZM TYPE (WALL_TYPE), POINTER :: WC +TYPE (EXTERNAL_WALL_TYPE), POINTER :: EWC TYPE (CFACE_TYPE), POINTER :: CFA TYPE (BOUNDARY_COORD_TYPE), POINTER :: BC REAL(EB), POINTER, DIMENSION(:,:,:) :: HP=>NULL() @@ -1498,9 +1501,10 @@ SUBROUTINE ULMAT_SOLVE_ZONE(NM,IPZ) IFACE= CFA%CUT_FACE_IND1 JFACE= CFA%CUT_FACE_IND2 WC => WALL(CUT_FACE(IFACE)%IWC) + EWC => EXTERNAL_WALL(CUT_FACE(IFACE)%IWC) BC => BOUNDARY_COORD(WC%BC_INDEX) ! DIRICHLET boundaries: - IF_CFACE_DIRICHLET: IF (WC%PRESSURE_BC_INDEX==DIRICHLET) THEN + IF_CFACE_DIRICHLET: IF (EWC%PRESSURE_BC_TYPE==DIRICHLET) THEN ! Gasphase cell indexes: IIG = BC%IIG; JJG = BC%JJG; KKG = BC%KKG IF(ZONE_MESH(PRESSURE_ZONE(IIG,JJG,KKG))%CONNECTED_ZONE_PARENT/=IPZ) CYCLE CFACE_LOOP @@ -1534,6 +1538,7 @@ SUBROUTINE ULMAT_SOLVE_ZONE(NM,IPZ) ! Finally add External Wall cell BCs: WALL_CELL_LOOP_1 : DO IW=1,N_EXTERNAL_WALL_CELLS WC => WALL(IW) + EWC => EXTERNAL_WALL(IW) ! Drop if NULL or this is a cut-face. Dealt with external CFACE. IF (WC%BOUNDARY_TYPE==NULL_BOUNDARY .OR. WC%CUT_FACE_INDEX>0) CYCLE WALL_CELL_LOOP_1 BC => BOUNDARY_COORD(WC%BC_INDEX) @@ -1541,7 +1546,7 @@ SUBROUTINE ULMAT_SOLVE_ZONE(NM,IPZ) IIG = BC%IIG; JJG = BC%JJG; KKG = BC%KKG; IOR = BC%IOR IF(ZONE_MESH(PRESSURE_ZONE(IIG,JJG,KKG))%CONNECTED_ZONE_PARENT/=IPZ) CYCLE WALL_CELL_LOOP_1 ! NEUMANN boundaries: - IF_NEUMANN_1: IF (WC%PRESSURE_BC_INDEX==NEUMANN) THEN + IF_NEUMANN_1: IF (EWC%PRESSURE_BC_TYPE==NEUMANN) THEN IROW = MUNKH(IIG,JJG,KKG) IF(CC_IBM) THEN @@ -1577,7 +1582,7 @@ SUBROUTINE ULMAT_SOLVE_ZONE(NM,IPZ) ENDIF IF_NEUMANN_1 ! DIRICHLET boundaries: - IF_DIRICHLET_1: IF (WC%PRESSURE_BC_INDEX==DIRICHLET) THEN + IF_DIRICHLET_1: IF (EWC%PRESSURE_BC_TYPE==DIRICHLET) THEN ! Here case where SOLID and OPEN or interpolated are mixed on a boundary: IF( WC%BOUNDARY_TYPE==SOLID_BOUNDARY .OR. WC%BOUNDARY_TYPE==MIRROR_BOUNDARY) CYCLE WALL_CELL_LOOP_1 IROW = MUNKH(IIG,JJG,KKG) @@ -1779,12 +1784,13 @@ SUBROUTINE ULMAT_SOLVE_ZONE(NM,IPZ) ! Fill external boundary conditions for Mesh, if necessary: WALL_CELL_LOOP_2 : DO IW=1,N_EXTERNAL_WALL_CELLS WC => WALL(IW) + EWC => EXTERNAL_WALL(IW) BC => BOUNDARY_COORD(WC%BC_INDEX) ! Gasphase cell indexes: IIG = BC%IIG; JJG = BC%JJG; KKG = BC%KKG; IOR = BC%IOR - IF(ZONE_MESH(PRESSURE_ZONE(IIG,JJG,KKG))%CONNECTED_ZONE_PARENT/=IPZ) CYCLE WALL_CELL_LOOP_2 + IF (ZONE_MESH(PRESSURE_ZONE(IIG,JJG,KKG))%CONNECTED_ZONE_PARENT/=IPZ) CYCLE WALL_CELL_LOOP_2 ! NEUMANN boundaries: - IF_NEUMANN_2 : IF (WC%PRESSURE_BC_INDEX==NEUMANN) THEN + IF_NEUMANN_2 : IF (EWC%PRESSURE_BC_TYPE==NEUMANN) THEN I = BC%II; J = BC%JJ; K = BC%KK ! Define cell size, normal to WC: SELECT CASE (IOR) @@ -1804,7 +1810,7 @@ SUBROUTINE ULMAT_SOLVE_ZONE(NM,IPZ) ENDIF IF_NEUMANN_2 ! DIRICHLET boundaries: - IF_DIRICHLET_2 : IF (WC%PRESSURE_BC_INDEX==DIRICHLET) THEN + IF_DIRICHLET_2 : IF (EWC%PRESSURE_BC_TYPE==DIRICHLET) THEN I = BC%II; J = BC%JJ; K = BC%KK ! Define cell size, normal to WC: IF (WC%BOUNDARY_TYPE==SOLID_BOUNDARY .OR. WC%BOUNDARY_TYPE==MIRROR_BOUNDARY) THEN @@ -2933,6 +2939,7 @@ SUBROUTINE GLMAT_SOLVER(T,DT) #endif INTEGER :: NM, IW, IIG, JJG, KKG, IOR, IROW, I, J, K, ICC TYPE (WALL_TYPE), POINTER :: WC=>NULL() +TYPE (EXTERNAL_WALL_TYPE), POINTER :: EWC=>NULL() TYPE (BOUNDARY_COORD_TYPE), POINTER :: BC REAL(EB), POINTER, DIMENSION(:,:,:) :: HP REAL(EB) :: SUM_FH(2), SUM_XH(2), MEAN_FH, MEAN_XH @@ -3105,6 +3112,7 @@ SUBROUTINE GLMAT_SOLVER(T,DT) ! Fill external boundary conditions for Mesh, if necesary: WALL_CELL_LOOP_2: DO IW=1,N_EXTERNAL_WALL_CELLS WC => WALL(IW) + EWC => EXTERNAL_WALL(IW) BC => BOUNDARY_COORD(WC%BC_INDEX) IIG = BC%IIG; JJG = BC%JJG; KKG = BC%KKG @@ -3112,7 +3120,7 @@ SUBROUTINE GLMAT_SOLVER(T,DT) I = BC%II; J = BC%JJ; K = BC%KK; IOR = BC%IOR ! NEUMANN boundaries: - IF_NEUMANN2: IF (WC%PRESSURE_BC_INDEX==NEUMANN) THEN + IF_NEUMANN2: IF (EWC%PRESSURE_BC_TYPE==NEUMANN) THEN ! Define cell size, normal to WC: SELECT CASE (IOR) CASE(-1) ! -IAXIS oriented, high face of IIG cell. @@ -3131,7 +3139,7 @@ SUBROUTINE GLMAT_SOLVER(T,DT) ENDIF IF_NEUMANN2 ! DIRICHLET boundaries: - IF_DIRICHLET2: IF (WC%PRESSURE_BC_INDEX==DIRICHLET) THEN + IF_DIRICHLET2: IF (EWC%PRESSURE_BC_TYPE==DIRICHLET) THEN IF (WC%BOUNDARY_TYPE==INTERPOLATED_BOUNDARY .OR. & WC%BOUNDARY_TYPE== NULL_BOUNDARY ) CYCLE ! No need for these, that's the whole point of a ! global solve. @@ -3296,6 +3304,7 @@ SUBROUTINE CHECK_UNSUPPORTED_MESH(SUPPORTED_MESH) LOGICAL, ALLOCATABLE, DIMENSION(:) :: COUNTED INTEGER, ALLOCATABLE, DIMENSION(:) :: DIRI_SET,MESH_LIST TYPE (WALL_TYPE), POINTER :: WC=>NULL() +TYPE (EXTERNAL_WALL_TYPE), POINTER :: EWC=>NULL() INTEGER :: NOM,IW,NMLOC,NSETS,ISET,PIVOT,PIVOT_LOC,MESHES_LEFT,CTMSH_LO,CTMSH_HI @@ -3447,7 +3456,8 @@ SUBROUTINE CHECK_UNSUPPORTED_MESH(SUPPORTED_MESH) ! OPEN_BOUNDARY condition. DO IW=1,N_EXTERNAL_WALL_CELLS WC => WALL(IW) - IF (WC%PRESSURE_BC_INDEX==DIRICHLET .AND. WC%BOUNDARY_TYPE==OPEN_BOUNDARY) DIRI_SET(ISET) = 1 + EWC => EXTERNAL_WALL(IW) + IF (EWC%PRESSURE_BC_TYPE==DIRICHLET .AND. WC%BOUNDARY_TYPE==OPEN_BOUNDARY) DIRI_SET(ISET) = 1 ENDDO ENDDO ENDDO SETS_LOOP diff --git a/Source/type.f90 b/Source/type.f90 index 49435b353ad..da824976054 100644 --- a/Source/type.f90 +++ b/Source/type.f90 @@ -395,9 +395,7 @@ MODULE TYPES INTEGER :: BACK_MESH=0 !< Mesh number on back side of obstruction or exterior wall cell INTEGER :: BACK_SURF=0 !< SURF_INDEX on back side of obstruction or exterior wall cell INTEGER :: BOUNDARY_TYPE=0 !< Descriptor: SOLID, MIRROR, OPEN, INTERPOLATED, etc - INTEGER :: SURF_INDEX_ORIG=0 !< Original SURFace index for this cell INTEGER :: OBST_INDEX=0 !< Index of the OBSTruction - INTEGER :: PRESSURE_BC_INDEX !< Poisson boundary condition, NEUMANN or DIRICHLET INTEGER :: VENT_INDEX=0 !< Index of the VENT containing this cell INTEGER :: JD11_INDEX=0 INTEGER :: JD12_INDEX=0 @@ -424,6 +422,8 @@ MODULE TYPES INTEGER :: JJO_MAX !< Maximum J index of adjacent cell in other mesh INTEGER :: KKO_MIN !< Minimum K index of adjacent cell in other mesh INTEGER :: KKO_MAX !< Maximum K index of adjacent cell in other mesh + INTEGER :: PRESSURE_BC_TYPE !< Poisson boundary condition, NEUMANN or DIRICHLET + INTEGER :: SURF_INDEX_ORIG=0 !< Original SURFace index for this cell REAL(EB) :: AREA_RATIO !< Ratio of face areas of adjoining cells REAL(EB), ALLOCATABLE, DIMENSION(:) :: FVN !< Flux-limited \f$ \int \rho Y_\alpha u_n \f$ REAL(EB), ALLOCATABLE, DIMENSION(:) :: FVNS !< Estimated value of FVN at next time step