Skip to content

Commit

Permalink
Merge pull request #13321 from rmcdermo/master
Browse files Browse the repository at this point in the history
FDS Source: make OXPYRO_MODEL default for thermally thick solids and particles undergoing oxidative pyrolysis
  • Loading branch information
rmcdermo authored Aug 14, 2024
2 parents 67e5a4f + 5ff85da commit 1a834b5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Source/cons.f90
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ MODULE GLOBAL_CONSTANTS
LOGICAL :: SMOKE3D_16=.FALSE. !< Output 3D smoke values using 16 bit integers
LOGICAL :: CHECK_BOUNDARY_ONE_D_ARRAYS=.FALSE. !< Flag that indicates that ONE_D array dimensions need to be checked
LOGICAL :: TENSOR_DIFFUSIVITY=.FALSE. !< If true, use experimental tensor diffusivity model for spec and tmp
LOGICAL :: TEST_CHAR_MASS_TRANSFER_MODEL=.FALSE. !< Experimental flag to test mass transfer resistence in char model
LOGICAL :: OXPYRO_MODEL=.FALSE. !< Flag to use oxidative pyrolysis mass transfer model
LOGICAL :: OUTPUT_WALL_QUANTITIES=.FALSE. !< Flag to force call to WALL_MODEL

INTEGER, ALLOCATABLE, DIMENSION(:) :: CHANGE_TIME_STEP_INDEX !< Flag to indicate if a mesh needs to change time step
Expand Down
21 changes: 17 additions & 4 deletions Source/read.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ SUBROUTINE READ_MISC
POROUS_FLOOR,PR,PROFILING,&
P_INF,RAMP_GX,RAMP_GY,RAMP_GZ,RESTART,RESTART_CHID,SC,&
RND_SEED,SHARED_FILE_SYSTEM,SIMULATION_MODE,SMOKE3D_16,SMOKE_ALBEDO,SOLID_PHASE_ONLY,SOOT_DENSITY,SOOT_OXIDATION,&
TAU_DEFAULT,TENSOR_DIFFUSIVITY,TERRAIN_IMAGE,TEST_CHAR_MASS_TRANSFER_MODEL,TEXTURE_ORIGIN,&
TAU_DEFAULT,TENSOR_DIFFUSIVITY,TERRAIN_IMAGE,TEXTURE_ORIGIN,&
THERMOPHORETIC_DEPOSITION,THERMOPHORETIC_SETTLING,THICKEN_OBSTRUCTIONS,&
TMPA,TURBULENCE_MODEL,TURBULENT_DEPOSITION,UVW_FILE,&
VERBOSE,VISIBILITY_FACTOR,VN_MAX,VN_MIN,Y_CO2_INFTY,Y_O2_INFTY,&
Expand Down Expand Up @@ -6133,6 +6133,7 @@ SUBROUTINE PROC_PART
TYPE(LAGRANGIAN_PARTICLE_CLASS_TYPE), POINTER :: LPC=>NULL()
TYPE(SPECIES_TYPE),POINTER:: SS=>NULL()
TYPE(SURFACE_TYPE),POINTER:: SF=>NULL()
TYPE(MATERIAL_TYPE), POINTER :: ML=>NULL()

IF (N_LAGRANGIAN_CLASSES == 0) RETURN

Expand All @@ -6152,7 +6153,7 @@ SUBROUTINE PROC_PART
LPC%FTPR = FOTH*PI*LPC%DENSITY
ENDIF

IF (SF%THERMAL_BC_INDEX==THERMALLY_THICK) THEN
THERMALLY_THICK_IF: IF (SF%THERMAL_BC_INDEX==THERMALLY_THICK) THEN
LPC%INCLUDE_BOUNDARY_ONE_D_TYPE = .TRUE.
MASS = 0._EB
VOLUME = 0._EB
Expand Down Expand Up @@ -6182,8 +6183,14 @@ SUBROUTINE PROC_PART
LPC%INITIAL_MASS = MASS
LPC%FTPR = FOTH*PI*LPC%DENSITY

IF (TEST_CHAR_MASS_TRANSFER_MODEL) LPC%INCLUDE_BOUNDARY_PROP2_TYPE = .TRUE.
ENDIF
! Set up oxidative pyrolysis mass transfer model for thermally thick particles

DO NN=1,SF%N_MATL
ML => MATERIAL(NN)
IF ( ANY(ML%N_O2>0._EB) ) OXPYRO_MODEL = .TRUE.
ENDDO

ENDIF THERMALLY_THICK_IF

! Exclude some convective heat transfer models from being applied to a particle

Expand Down Expand Up @@ -6259,6 +6266,10 @@ SUBROUTINE PROC_PART

ENDDO PART_LOOP

! If we use OXPYRO_MODEL, allocate necessary boundary information for all particle classes

IF (OXPYRO_MODEL) LAGRANGIAN_PARTICLE_CLASS(1:N_LAGRANGIAN_CLASSES)%INCLUDE_BOUNDARY_PROP2_TYPE = .TRUE.

END SUBROUTINE PROC_PART


Expand Down Expand Up @@ -9423,6 +9434,8 @@ SUBROUTINE PROC_WALL
ENDIF
ENDDO
DENSITY_MIN = MIN(DENSITY_MIN,ML%RHO_S)
! Set up oxidative pyrolysis mass transfer model for thermally thick solids
IF ( ANY(ML%N_O2>0._EB) ) OXPYRO_MODEL = .TRUE.
ENDDO

SF%SWELL_RATIO = 1._EB
Expand Down
8 changes: 4 additions & 4 deletions Source/wall.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,7 @@ SUBROUTINE SOLID_HEAT_TRANSFER(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_INDEX,
LP => LAGRANGIAN_PARTICLE(PARTICLE_INDEX)
ONE_D => BOUNDARY_ONE_D(LP%OD_INDEX)
B1 => BOUNDARY_PROP1(LP%B1_INDEX)
IF (TEST_CHAR_MASS_TRANSFER_MODEL) B2 => BOUNDARY_PROP2(LP%B2_INDEX)
IF (OXPYRO_MODEL) B2 => BOUNDARY_PROP2(LP%B2_INDEX)
BC => BOUNDARY_COORD(LP%BC_INDEX)
SURF_INDEX = LAGRANGIAN_PARTICLE_CLASS(LP%CLASS_INDEX)%SURF_INDEX
SF => SURFACE(SURF_INDEX)
Expand Down Expand Up @@ -2857,7 +2857,7 @@ SUBROUTINE PERFORM_PYROLYSIS

! Initialize parameters for oxidative pyrolysis mass transfer model

IF (TEST_CHAR_MASS_TRANSFER_MODEL) THEN
IF (OXPYRO_MODEL) THEN
MAX_ITER=20
Y_O2_G = Y_O2_F
Y_LOWER = 0._EB
Expand Down Expand Up @@ -2935,7 +2935,7 @@ SUBROUTINE PERFORM_PYROLYSIS
ENDDO POINT_LOOP1

!======== Mass transfer resistance to surface O2 concentration =============
CHAR_MASS_TRANSFER_MODEL_IF: IF (TEST_CHAR_MASS_TRANSFER_MODEL) THEN
OXPYRO_MODEL_IF: IF (OXPYRO_MODEL) THEN
! Solve for Y_O2_F using bounded Newton method
M_DOT_ERROR_OLD = M_DOT_ERROR
M_DOT_O2_PP = DOT_PRODUCT(Z2Y(O2_INDEX,1:N_TRACKED_SPECIES),M_DOT_G_PP_ACTUAL(1:N_TRACKED_SPECIES))
Expand All @@ -2962,7 +2962,7 @@ SUBROUTINE PERFORM_PYROLYSIS
Y_O2_F = 0.5_EB*(Y_LOWER+Y_UPPER)
ENDIF
DY = Y_O2_F - Y_O2_F_OLD
ENDIF CHAR_MASS_TRANSFER_MODEL_IF
ENDIF OXPYRO_MODEL_IF
!===========================================================================

ENDDO O2_LOOP
Expand Down

0 comments on commit 1a834b5

Please sign in to comment.