From 438fc1e3b801420037f5a11dba08b023aaff0a6e Mon Sep 17 00:00:00 2001 From: mcgratta Date: Fri, 6 Mar 2020 10:17:08 -0500 Subject: [PATCH] FDS Source: Fix bug initializing CHI_R --- Source/init.f90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/init.f90 b/Source/init.f90 index be34ff88566..7ac08b745eb 100644 --- a/Source/init.f90 +++ b/Source/init.f90 @@ -291,7 +291,11 @@ SUBROUTINE INITIALIZE_MESH_VARIABLES_1(DT,NM) IF (.NOT.EVACUATION_ONLY(NM)) THEN ALLOCATE(M%CHI_R(0:IBP1,0:JBP1,0:KBP1),STAT=IZERO) CALL ChkMemErr('INIT','QR',IZERO) - M%CHI_R = MAX(0._EB,RADIATIVE_FRACTION*EVALUATE_RAMP(T_BEGIN,0._EB,REACTION(1)%RAMP_CHI_R_INDEX)) + IF (N_REACTIONS>0) THEN + M%CHI_R = MAX(0._EB,RADIATIVE_FRACTION*EVALUATE_RAMP(T_BEGIN,0._EB,REACTION(1)%RAMP_CHI_R_INDEX)) + ELSE + M%CHI_R = MAX(0._EB,RADIATIVE_FRACTION) + ENDIF ALLOCATE(M%QR(0:IBP1,0:JBP1,0:KBP1),STAT=IZERO) CALL ChkMemErr('INIT','QR',IZERO) M%QR = 0._EB