From 09521d972edad2d40f62d21439db062191437721 Mon Sep 17 00:00:00 2001 From: ericvmueller Date: Wed, 8 Nov 2023 09:25:48 -0500 Subject: [PATCH] FDS Source: prevent division by zero in SURFACE_OXIDATION_MODEL --- Source/wall.f90 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/wall.f90 b/Source/wall.f90 index 16823b2ad55..e91c5de67c5 100644 --- a/Source/wall.f90 +++ b/Source/wall.f90 @@ -2963,9 +2963,12 @@ SUBROUTINE PYROLYSIS(N_MATS,MATL_INDEX,SURF_INDEX,IIG,JJG,KKG,TMP_S,TMP_F,IOR,RH H_MASS = B1%HEAT_TRANS_COEF/CP_FILM ! Mass stoichiometric coefficient for oxygen NU_O2_CHAR = ML%NU_GAS_M(O2_INDEX,J) - Y_O2_S = (SQRT(4._EB*REACTION_RATE/H_MASS*Y_O2+(REACTION_RATE*NU_O2_CHAR/H_MASS)**2._EB + & - 2._EB*REACTION_RATE*NU_O2_CHAR/H_MASS+1._EB)-REACTION_RATE*NU_O2_CHAR/H_MASS-1) / & - (2._EB*REACTION_RATE/H_MASS) + Y_O2_S = 0._EB + IF (H_MASS>0._EB) THEN + Y_O2_S = (SQRT(4._EB*REACTION_RATE/H_MASS*Y_O2+(REACTION_RATE*NU_O2_CHAR/H_MASS)**2._EB + & + 2._EB*REACTION_RATE*NU_O2_CHAR/H_MASS+1._EB)-REACTION_RATE*NU_O2_CHAR/H_MASS-1) / & + (2._EB*REACTION_RATE/H_MASS) + ENDIF ! Compute LENGTH_SCALE: 1/(surface-to-volume ratio) IF (SF%BOUNDARY_FUEL_MODEL) THEN