Skip to content

Commit

Permalink
Merge pull request #12462 from drjfloyd/master
Browse files Browse the repository at this point in the history
FDS Source: Add RAMPs for HTC and HTC_B
  • Loading branch information
drjfloyd authored Feb 12, 2024
2 parents 81409da + e2112d2 commit e2a8084
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 26 deletions.
4 changes: 3 additions & 1 deletion Manuals/FDS_User_Guide/FDS_User_Guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,7 @@ \subsubsection{Output for Convective Heat Transfer Regime}
\subsubsection{Specified Convective Heat Transfer Coefficient}

To specify the convective heat transfer coefficient, set it to a constant using \\
{\ct HEAT\_TRANSFER\_COEFFICIENT} on the {\ct SURF} line in units of \si{W/(m$^2$.K)}. If the back side of the solid obstruction faces the exterior of the computational domain and the solid conducts heat, the heat transfer coefficient of the back side may be specified using {\ct HEAT\_TRANSFER\_COEFFICIENT\_BACK}. This back side condition is appropriate for a {\ct SURF} line with {\ct BACKING='VOID'} or {\ct BACKING='EXPOSED'}.
{\ct HEAT\_TRANSFER\_COEFFICIENT} on the {\ct SURF} line in units of \si{W/(m$^2$.K)} with optional time dependent ramp using {\ct RAMP\_HEAT\_TRANSFER\_COEFFICIENT}. If the back side of the solid obstruction faces the exterior of the computational domain and the solid conducts heat, the heat transfer coefficient of the back side may be specified using {\ct HEAT\_TRANSFER\_COEFFICIENT\_BACK} with optional time dependent ramp ramp using {\ct RAMP\_HEAT\_TRANSFER\_COEFFICIENT\_BACK}. This back side condition is appropriate for a {\ct SURF} line with {\ct BACKING='VOID'} or {\ct BACKING='EXPOSED'}.

\subsubsection{Specifying the Heat Flux at a Solid Surface}
\label{info:net_and_convective_heat_flux}
Expand Down Expand Up @@ -12942,6 +12942,8 @@ \section{\texorpdfstring{{\tt SURF}}{SURF} (Surface Properties)}
{\ct PROFILE} & Character & Section~\ref{info:profiles} & & \\ \hline
{\ct RADIUS} & Real & Section~\ref{info:PART_GEOMETRY} & m & \\ \hline
{\ct RAMP\_EF} & Character & Section~\ref{info:RAMP_Time} & & \\ \hline
{\ct \footnotesize RAMP\_HEAT\_TRANSFER\_COEFFICIENT} & Real & Section~\ref{info:convection} & & \\ \hline
{\ct \footnotesize RAMP\_HEAT\_TRANSFER\_COEFFICIENT\_BACK} & Real & Section~\ref{info:convection} & & \\ \hline
{\ct RAMP\_MF(:)} & Character & Section~\ref{info:RAMP_Time} & & \\ \hline
{\ct RAMP\_PART} & Character & Section~\ref{info:RAMP_Time} & & \\ \hline
{\ct RAMP\_Q} & Character & Section~\ref{info:RAMP_Time} & & \\ \hline
Expand Down
13 changes: 11 additions & 2 deletions Source/read.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7118,7 +7118,8 @@ SUBROUTINE READ_SURF(QUICK_READ)
CHARACTER(LABEL_LENGTH) :: PART_ID,RAMP_MF(MAX_SPECIES),RAMP_Q(MAX_QDOTPP_REF),RAMP_V,RAMP_T,RAMP_T_I,&
MATL_ID(MAX_LAYERS,MAX_MATERIALS),PROFILE,BACKING,GEOMETRY,RAMP_EF,RAMP_PART,NAME_LIST(MAX_MATERIALS*MAX_LAYERS),&
SPEC_ID(MAX_SPECIES),RAMP_TMP_BACK,RAMP_TMP_GAS_BACK,RAMP_TMP_GAS_FRONT,&
RAMP_V_X,RAMP_V_Y,RAMP_V_Z,NEAR_WALL_TURBULENCE_MODEL,SURF_DEFAULT
RAMP_V_X,RAMP_V_Y,RAMP_V_Z,NEAR_WALL_TURBULENCE_MODEL,SURF_DEFAULT,&
RAMP_HEAT_TRANSFER_COEFFICIENT,RAMP_HEAT_TRANSFER_COEFFICIENT_BACK
CHARACTER(LABEL_LENGTH), DIMENSION(10) :: INIT_IDS
LOGICAL :: ADIABATIC,BURN_AWAY,FREE_SLIP,NO_SLIP,CONVERT_VOLUME_TO_MASS,HORIZONTAL,DIRICHLET_FRONT,DIRICHLET_BACK, BLOWING, &
INERT_Q_REF
Expand Down Expand Up @@ -7169,7 +7170,7 @@ SUBROUTINE READ_SURF(QUICK_READ)
N_LAYER_CELLS_MAX,NEAR_WALL_EDDY_VISCOSITY,NEAR_WALL_TURBULENCE_MODEL,NET_HEAT_FLUX,&
NO_SLIP,NPPC,NUSSELT_C0,NUSSELT_C1,NUSSELT_C2,NUSSELT_M,&
PARTICLE_EXTRACTION_VELOCITY,PARTICLE_MASS_FLUX,PARTICLE_SURFACE_DENSITY,PART_ID,&
PLE,PROFILE,RADIUS,RAMP_EF,RAMP_MF,&
PLE,PROFILE,RADIUS,RAMP_EF,RAMP_HEAT_TRANSFER_COEFFICIENT,RAMP_HEAT_TRANSFER_COEFFICIENT_BACK,RAMP_MF,&
RAMP_PART,RAMP_Q,RAMP_T,RAMP_T_I,RAMP_TMP_BACK,RAMP_TMP_GAS_BACK,RAMP_TMP_GAS_FRONT,&
RAMP_V,RAMP_V_X,RAMP_V_Y,RAMP_V_Z,&
REFERENCE_HEAT_FLUX,REFERENCE_HEAT_FLUX_TIME_INTERVAL,MINIMUM_SCALING_HEAT_FLUX,MAXIMUM_SCALING_HEAT_FLUX,&
Expand Down Expand Up @@ -7782,6 +7783,10 @@ SUBROUTINE READ_SURF(QUICK_READ)
IF (HEAT_TRANSFER_COEFFICIENT_BACK < 0._EB) HEAT_TRANSFER_COEFFICIENT_BACK=HEAT_TRANSFER_COEFFICIENT
SF%H_FIXED = HEAT_TRANSFER_COEFFICIENT
SF%H_FIXED_B = HEAT_TRANSFER_COEFFICIENT_BACK
IF (RAMP_HEAT_TRANSFER_COEFFICIENT/='null') &
CALL GET_RAMP_INDEX(RAMP_HEAT_TRANSFER_COEFFICIENT,'TIME',SF%RAMP_H_FIXED_INDEX)
IF (RAMP_HEAT_TRANSFER_COEFFICIENT_BACK/='null') &
CALL GET_RAMP_INDEX(RAMP_HEAT_TRANSFER_COEFFICIENT,'TIME',SF%RAMP_H_FIXED_B_INDEX)
SF%NUSSELT_C0 = NUSSELT_C0
SF%NUSSELT_C1 = NUSSELT_C1
SF%NUSSELT_C2 = NUSSELT_C2
Expand Down Expand Up @@ -8232,6 +8237,8 @@ SUBROUTINE SET_SURF_DEFAULTS
HEAT_TRANSFER_MODEL = 'null'
HEAT_TRANSFER_COEFFICIENT = -1._EB
HEAT_TRANSFER_COEFFICIENT_BACK = -1._EB
RAMP_HEAT_TRANSFER_COEFFICIENT = 'null'
RAMP_HEAT_TRANSFER_COEFFICIENT = 'null'
MASS_TRANSFER_COEFFICIENT = -1._EB
HORIZONTAL = .FALSE.
HRRPUA = 0._EB
Expand Down Expand Up @@ -8276,6 +8283,8 @@ SUBROUTINE SET_SURF_DEFAULTS
PROFILE = 'null'
RADIUS = -1._EB
RAMP_EF = 'null'
RAMP_HEAT_TRANSFER_COEFFICIENT = 'null'
RAMP_HEAT_TRANSFER_COEFFICIENT = 'null'
RAMP_MF = 'null'
RAMP_Q = 'null'
RAMP_V = 'null'
Expand Down
2 changes: 1 addition & 1 deletion Source/type.f90
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ MODULE TYPES
REAL(EB), DIMENSION(2) :: VEL_T,EMBER_GENERATION_HEIGHT=-1._EB
INTEGER, DIMENSION(2) :: LEAK_PATH,DUCT_PATH
INTEGER :: THERMAL_BC_INDEX,NPPC,SPECIES_BC_INDEX,VELOCITY_BC_INDEX,SURF_TYPE,N_CELLS_INI,N_CELLS_MAX=0, &
PART_INDEX,PROP_INDEX=-1,RAMP_T_I_INDEX=-1
PART_INDEX,PROP_INDEX=-1,RAMP_T_I_INDEX=-1,RAMP_H_FIXED_INDEX=-1,RAMP_H_FIXED_B_INDEX=-1
INTEGER, DIMENSION(10) :: INIT_INDICES=0
INTEGER :: PYROLYSIS_MODEL
INTEGER :: N_LAYERS,N_MATL,SUBSTEP_POWER=2,N_SPEC=0,N_LPC=0,N_CONE_CURVES=0
Expand Down
86 changes: 64 additions & 22 deletions Source/wall.f90
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ SUBROUTINE THERMAL_BC(T,NM)
USE PHYSICAL_FUNCTIONS, ONLY : GET_SPECIFIC_GAS_CONSTANT
USE CC_SCALARS, ONLY : CFACE_THERMAL_GASVARS
REAL(EB), INTENT(IN) :: T
REAL(EB) :: DT_BC,DTMP,TSI,UBAR,VBAR,WBAR,RAMP_FACTOR,RSUM_G,MU_G
REAL(EB) :: DT_BC,DTMP,TSI,UBAR,VBAR,WBAR,RAMP_FACTOR,RSUM_G,MU_G,SF_HTC
INTEGER :: SURF_INDEX,IW,IP,ICF,ITW
INTEGER, INTENT(IN) :: NM
REAL(EB), POINTER, DIMENSION(:,:) :: PBAR_P
Expand Down Expand Up @@ -220,7 +220,13 @@ SUBROUTINE THERMAL_BC(T,NM)
IF (PY%HEAT_TRANSFER_COEFFICIENT>0._EB) THEN
B1%HEAT_TRANS_COEF = PY%HEAT_TRANSFER_COEFFICIENT
ELSE
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,B1%TMP_G-PY%GAUGE_TEMPERATURE,SF%H_FIXED,SURF_INDEX,&
IF (SF%H_FIXED > 0._EB) THEN
SF_HTC = SF%H_FIXED
IF (SF%RAMP_H_FIXED_INDEX > 0) SF_HTC = SF_HTC * EVALUATE_RAMP(T-LP%T_INSERT,SF%RAMP_H_FIXED_INDEX)
ELSE
SF_HTC = -1._EB
ENDIF
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,B1%TMP_G-PY%GAUGE_TEMPERATURE,SF_HTC,SURF_INDEX,&
PARTICLE_INDEX_IN=IP)
ENDIF
B1%Q_CON_F = B1%HEAT_TRANS_COEF*(B1%TMP_G-PY%GAUGE_TEMPERATURE)
Expand Down Expand Up @@ -252,7 +258,7 @@ SUBROUTINE CALCULATE_TMP_F(WALL_INDEX,CFACE_INDEX,PARTICLE_INDEX)
RHO_ZZ_F(1:N_TOTAL_SCALARS),ZZ_GET(1:N_TRACKED_SPECIES), &
RHO_OTHER,RHO_OTHER_2,RHO_ZZ_OTHER(1:N_TOTAL_SCALARS),RHO_ZZ_OTHER_2,RHO_ZZ_G,RHO_ZZ_G_2, &
DDO,PBAR_G,PBAR_OTHER,DENOM,D_Z_N(0:I_MAX_TEMP),D_Z_G,D_Z_OTHER,TMP_OTHER, &
MU_DNS_G,MU_DNS_OTHER,MU_OTHER,RHO_D,RHO_D_TURB,RHO_D_DZDN,RHO_D_DZDN_OTHER,RSUM_OTHER
MU_DNS_G,MU_DNS_OTHER,MU_OTHER,RHO_D,RHO_D_TURB,RHO_D_DZDN,RHO_D_DZDN_OTHER,RSUM_OTHER,SF_HTC

LOGICAL :: SECOND_ORDER_INTERPOLATED_BOUNDARY,SOLID_OTHER,ATMOSPHERIC_INTERPOLATION,CC_SOLID_FLAG
INTEGER :: II,JJ,KK,IIG,JJG,KKG,IOR,IIO,JJO,KKO,N,ADCOUNT,ICG,ICO
Expand Down Expand Up @@ -348,12 +354,20 @@ SUBROUTINE CALCULATE_TMP_F(WALL_INDEX,CFACE_INDEX,PARTICLE_INDEX)
ENDIF

DTMP = B1%TMP_G - B1%TMP_F

IF (SF%H_FIXED > 0._EB) THEN
SF_HTC = SF%H_FIXED
IF (SF%RAMP_H_FIXED_INDEX > 0) SF_HTC = SF_HTC * EVALUATE_RAMP(TSI,SF%RAMP_H_FIXED_INDEX)
ELSE
SF_HTC = -1._EB
ENDIF

IF (PRESENT(WALL_INDEX)) THEN
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,WALL_INDEX_IN=WALL_INDEX)
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC,SURF_INDEX,WALL_INDEX_IN=WALL_INDEX)
ELSEIF (PRESENT(CFACE_INDEX)) THEN
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,CFACE_INDEX_IN=CFACE_INDEX)
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC,SURF_INDEX,CFACE_INDEX_IN=CFACE_INDEX)
ELSEIF (PRESENT(PARTICLE_INDEX)) THEN
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,PARTICLE_INDEX_IN=PARTICLE_INDEX)
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC,SURF_INDEX,PARTICLE_INDEX_IN=PARTICLE_INDEX)
ENDIF
B1%Q_CON_F = B1%HEAT_TRANS_COEF*DTMP
IF (RADIATION) B1%Q_RAD_OUT = SIGMA*B1%EMISSIVITY*B1%TMP_F**4
Expand All @@ -376,17 +390,25 @@ SUBROUTINE CALCULATE_TMP_F(WALL_INDEX,CFACE_INDEX,PARTICLE_INDEX)
ELSE
QNET = -RAMP_FACTOR*SF%CONVECTIVE_HEAT_FLUX*B1%AREA_ADJUST
ENDIF

IF (SF%H_FIXED > 0._EB) THEN
SF_HTC = SF%H_FIXED
IF (SF%RAMP_H_FIXED_INDEX > 0) SF_HTC = SF_HTC * EVALUATE_RAMP(TSI,SF%RAMP_H_FIXED_INDEX)
ELSE
SF_HTC = -1._EB
ENDIF

ADCOUNT = 0
ADLOOP: DO
ADCOUNT = ADCOUNT + 1
DTMP = B1%TMP_G - TMP_OTHER
IF (ABS(QNET) > 0._EB .AND. ABS(DTMP) <TWO_EPSILON_EB) DTMP=1._EB
IF (PRESENT(WALL_INDEX)) THEN
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,WALL_INDEX_IN=WALL_INDEX)
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC,SURF_INDEX,WALL_INDEX_IN=WALL_INDEX)
ELSEIF (PRESENT(CFACE_INDEX)) THEN
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,CFACE_INDEX_IN=CFACE_INDEX)
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC,SURF_INDEX,CFACE_INDEX_IN=CFACE_INDEX)
ELSEIF (PRESENT(PARTICLE_INDEX)) THEN
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,PARTICLE_INDEX_IN=PARTICLE_INDEX)
B1%HEAT_TRANS_COEF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC,SURF_INDEX,PARTICLE_INDEX_IN=PARTICLE_INDEX)
ENDIF
IF (RADIATION .AND. SF%THERMAL_BC_INDEX/=CONVECTIVE_FLUX_BC) THEN
QEXTRA = B1%HEAT_TRANS_COEF*DTMP + B1%Q_RAD_IN - B1%EMISSIVITY * SIGMA * TMP_OTHER ** 4 - QNET
Expand Down Expand Up @@ -1682,7 +1704,7 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
DEL_DOT_Q_SC,Q_DOT_G_PPP,Q_DOT_O2_PPP,Q_DOT_G_PP,Q_DOT_O2_PP,R_SURF,U_SURF,V_SURF,W_SURF,T_BC_SUB,DT_BC_SUB,&
Q_NET_F,Q_NET_B,TMP_RATIO,KODXF,KODXB,H_S,T_NODE,C_S,H_NODE,TMP_S(1:NWP_MAX),RHO_H_S(1:NWP_MAX),VOL,T_BOIL_EFF,&
Q_DOT_PART(MAX_LPC),M_DOT_PART(MAX_LPC),Q_DOT_PART_S(MAX_LPC),M_DOT_PART_S(MAX_LPC),RADIUS,HTC_LIMIT,&
CP1,CP2,DENOM
CP1,CP2,DENOM,SF_HTC_F,SF_HTC_B,TSI
REAL(EB) :: DDSUM, SMALLEST_CELL_SIZE(1:MAX_LAYERS)
INTEGER :: IIB,JJB,KKB,NWP,I,NL,N,OBST_INDEX,N_LAYER_CELLS_NEW(MAX_LAYERS),N_CELLS,EXPON,ITMP,ITER,&
BACK_MESH,BACK_INDEX,BACK_WALL_INDEX
Expand Down Expand Up @@ -1733,6 +1755,7 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
IF (BACK_INDEX==0 .AND. SF%BACKING==EXPOSED) BACKING = VOID
B1%TMP_G = TMP(BC%IIG,BC%JJG,BC%KKG)
B1%ZZ_G(1:N_TRACKED_SPECIES) = ZZ(BC%IIG,BC%JJG,BC%KKG,1:N_TRACKED_SPECIES)
TSI = T - B1%T_IGN

! Take away energy flux due to water evaporation

Expand Down Expand Up @@ -1791,6 +1814,7 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
B1%TMP_G = TMP(BC%IIG,BC%JJG,BC%KKG)
ISOLATED_THIN_WALL = .TRUE.
ENDIF
TSI = T - B1%T_IGN

ELSEIF (PRESENT(CFACE_INDEX)) THEN UNPACK_WALL_PARTICLE

Expand All @@ -1815,6 +1839,7 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
ENDIF
BACKING = SF%BACKING
IF (ONE_D%BACK_INDEX==0 .AND. SF%BACKING==EXPOSED) BACKING = VOID
TSI = T - B1%T_IGN

ELSEIF (PRESENT(PARTICLE_INDEX)) THEN UNPACK_WALL_PARTICLE

Expand All @@ -1836,9 +1861,26 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
W_SURF=LP%W
B1%TMP_G = TMP(BC%IIG,BC%JJG,BC%KKG)
B1%ZZ_G(1:N_TRACKED_SPECIES) = ZZ(BC%IIG,BC%JJG,BC%KKG,1:N_TRACKED_SPECIES)
TSI = T - LP%T_INSERT

ENDIF UNPACK_WALL_PARTICLE

! Evaluate any heat transfer coefficient ramp

IF (SF%H_FIXED > 0._EB) THEN
SF_HTC_F = SF%H_FIXED
IF (SF%RAMP_H_FIXED_INDEX > 0) SF_HTC_F = SF_HTC_F * EVALUATE_RAMP(TSI,SF%RAMP_H_FIXED_INDEX)
ELSE
SF_HTC_F = -1._EB
ENDIF

IF (SF%H_FIXED_B > 0._EB) THEN
SF_HTC_B = SF%H_FIXED_B
IF (SF%RAMP_H_FIXED_B_INDEX > 0) SF_HTC_B = SF_HTC_B * EVALUATE_RAMP(TSI,SF%RAMP_H_FIXED_B_INDEX)
ELSE
SF_HTC_B = -1._EB
ENDIF

! If the fuel has burned away, return

IF (B1%BURNAWAY) THEN
Expand Down Expand Up @@ -1922,25 +1964,25 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND

DTMP = B1%TMP_G - B1%TMP_F
IF (PRESENT(WALL_INDEX)) THEN
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,WALL_INDEX_IN=WALL_INDEX)
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_F,SURF_INDEX,WALL_INDEX_IN=WALL_INDEX)
ELSEIF (PRESENT(THIN_WALL_INDEX)) THEN
IF (TW%WALL_INDEX_M>0) THEN
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,WALL_INDEX_IN=TW%WALL_INDEX_M)
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_F,SURF_INDEX,WALL_INDEX_IN=TW%WALL_INDEX_M)
ELSEIF (TW%WALL_INDEX_P>0) THEN
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,WALL_INDEX_IN=TW%WALL_INDEX_P)
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_F,SURF_INDEX,WALL_INDEX_IN=TW%WALL_INDEX_P)
ELSE
HTCF = 0._EB
ENDIF
ELSEIF (PRESENT(CFACE_INDEX)) THEN
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,CFACE_INDEX_IN=CFACE_INDEX)
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_F,SURF_INDEX,CFACE_INDEX_IN=CFACE_INDEX)
ELSEIF (PRESENT(PARTICLE_INDEX)) THEN
RADIUS = SF%INNER_RADIUS + SUM(ONE_D%LAYER_THICKNESS(1:SF%N_LAYERS))
SELECT CASE(SF%GEOMETRY)
CASE (SURF_CARTESIAN) ; HTC_LIMIT = 0.5_EB*RADIUS*ONE_D%RHO_C_S(1)/( DT_BC_SUB)
CASE (SURF_CYLINDRICAL) ; HTC_LIMIT = 0.5_EB*RADIUS*ONE_D%RHO_C_S(1)/(2._EB*DT_BC_SUB)
CASE (SURF_SPHERICAL) ; HTC_LIMIT = 0.5_EB*RADIUS*ONE_D%RHO_C_S(1)/(3._EB*DT_BC_SUB)
END SELECT
HTCF = MIN(HTC_LIMIT , HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,PARTICLE_INDEX_IN=PARTICLE_INDEX))
HTCF = MIN(HTC_LIMIT , HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_F,SURF_INDEX,PARTICLE_INDEX_IN=PARTICLE_INDEX))
ENDIF
Q_CON_F = HTCF*DTMP

Expand Down Expand Up @@ -1972,7 +2014,7 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
TMP_GAS_BACK = TMP_0(BC%KK)
ENDIF
DTMP = TMP_GAS_BACK - B1%TMP_B
HTCB = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED_B,SURF_INDEX_IN=SURF_INDEX)
HTCB = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_B,SURF_INDEX_IN=SURF_INDEX)
Q_CON_B = HTCB*DTMP
Q_RAD_IN_B = E_WALLB*SIGMA*TMP_GAS_BACK**4
Q_WATER_B = 0._EB
Expand All @@ -1996,7 +2038,7 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
TMP_GAS_BACK = B1_BACK%TMP_G
DTMP = TMP_GAS_BACK - B1%TMP_B
IF (.NOT.ISOLATED_THIN_WALL_BACK) THEN
HTCB = HEAT_TRANSFER_COEFFICIENT(BACK_MESH,DTMP,SF%H_FIXED_B,&
HTCB = HEAT_TRANSFER_COEFFICIENT(BACK_MESH,DTMP,SF_HTC_B,&
SURF_INDEX_IN=SURF_INDEX_BACK,WALL_INDEX_IN=BACK_WALL_INDEX)
ELSE
HTCB = 0._EB
Expand All @@ -2009,16 +2051,16 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
TMP_GAS_BACK = TMP(IIB,JJB,KKB)
DTMP = TMP_GAS_BACK - B1%TMP_B
IF (PRESENT(WALL_INDEX)) &
HTCB = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED_B,SURF_INDEX_IN=SURF_INDEX_BACK,WALL_INDEX_IN=ONE_D%BACK_INDEX)
HTCB = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_B,SURF_INDEX_IN=SURF_INDEX_BACK,WALL_INDEX_IN=ONE_D%BACK_INDEX)
IF (PRESENT(THIN_WALL_INDEX)) THEN
IF (BACK_WALL_INDEX>0) THEN
HTCB = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX_IN=SURF_INDEX_BACK,WALL_INDEX_IN=BACK_WALL_INDEX)
HTCB = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_B,SURF_INDEX_IN=SURF_INDEX_BACK,WALL_INDEX_IN=BACK_WALL_INDEX)
ELSE
HTCB = 0._EB
ENDIF
ENDIF
IF (PRESENT(CFACE_INDEX)) &
HTCB = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED_B,SURF_INDEX_IN=SURF_INDEX_BACK,CFACE_INDEX_IN=ONE_D%BACK_INDEX)
HTCB = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_B,SURF_INDEX_IN=SURF_INDEX_BACK,CFACE_INDEX_IN=ONE_D%BACK_INDEX)
B1_BACK%HEAT_TRANS_COEF = HTCB
Q_RAD_IN_B = B1_BACK%Q_RAD_IN
IF (NLP>0) Q_WATER_B = -SUM(B2_BACK%LP_CPUA(:)) + B1%Q_CONDENSE
Expand Down Expand Up @@ -2123,9 +2165,9 @@ SUBROUTINE SOLID_HEAT_TRANSFER_1D(NM,T,DT_BC,PARTICLE_INDEX,WALL_INDEX,CFACE_IND
IF (SF%SURFACE_VOLUME_RATIO(LAYER_INDEX(I))<=0._EB) CYCLE
DTMP = B1%TMP_G - ONE_D%TMP(I)
IF (PRESENT(WALL_INDEX)) THEN
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,WALL_INDEX_IN=WALL_INDEX)
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_F,SURF_INDEX,WALL_INDEX_IN=WALL_INDEX)
ELSEIF(PRESENT(CFACE_INDEX)) THEN
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF%H_FIXED,SURF_INDEX,CFACE_INDEX_IN=CFACE_INDEX)
HTCF = HEAT_TRANSFER_COEFFICIENT(NM,DTMP,SF_HTC_F,SURF_INDEX,CFACE_INDEX_IN=CFACE_INDEX)
ENDIF
DEL_DOT_Q_SC = HTCF*DTMP
Q_S(I) = Q_S(I) + SF%SURFACE_VOLUME_RATIO(LAYER_INDEX(I))*SF%PACKING_RATIO(LAYER_INDEX(I))*DEL_DOT_Q_SC
Expand Down

0 comments on commit e2a8084

Please sign in to comment.