Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | ErrorsFound |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE GetSurfaceHeatTransferAlgorithmOverrides(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith, portions from ApplyConvectionValue by Linda Lawrie
! DATE WRITTEN July 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! <description>
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataIPShortcuts
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, FindItemInList
USE DataSurfaces, ONLY: Surface
USE DataHeatBalance, ONLY: HeatTransferAlgosUsed, NumberOfHeatTransferAlgosUsed &
,LowHConvLimit, HighHConvLimit
USE General, ONLY: RoundSigDigits
USE DataHeatBalSurface ,ONLY:MaxSurfaceTempLimit
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: fmtA="(A)"
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: CountHTAlgoObjectsSingleSurf
INTEGER :: CountHTAlgoObjectsMultiSurf
INTEGER :: CountHTAlgoObjectsSurfList
INTEGER :: IOStatus ! Used in GetObjectItem
LOGICAL :: ErrorsFoundSingleSurf = .FALSE.
LOGICAL :: ErrorsFoundMultiSurf = .FALSE.
LOGICAL :: ErrorsFoundSurfList = .FALSE.
LOGICAL :: ErrorsFoundByConstruct= .FALSE.
INTEGER :: tmpAlgoInput
INTEGER :: Item
INTEGER :: Item1
INTEGER :: NumAlphas
INTEGER :: NumNumbers
INTEGER :: Found
LOGICAL :: SurfacesOfType
INTEGER :: SurfNum
! INTEGER :: Index
INTEGER, DIMENSION(:), ALLOCATABLE :: tmpHeatTransferAlgosUsed
INTEGER :: NumEMPDMat
INTEGER :: NumPCMat
INTEGER :: NumVTCMat
INTEGER :: NumHAMTMat1
INTEGER :: NumHAMTMat2
INTEGER :: NumHAMTMat3
INTEGER :: NumHAMTMat4
INTEGER :: NumHAMTMat5
INTEGER :: NumHAMTMat6
INTEGER :: SumHAMTMat
LOGICAL :: msgneeded
CHARACTER(len=MaxNameLength) :: AlgoName
! first initialize each heat transfer surface with the overall model type, array assignment
Surface%HeatTransferAlgorithm = HeatTransferAlgosUsed(1)
!
cCurrentModuleObject = 'SurfaceProperty:HeatTransferAlgorithm'
CountHTAlgoObjectsSingleSurf = GetNumObjectsFound(cCurrentModuleObject)
cCurrentModuleObject = 'SurfaceProperty:HeatTransferAlgorithm'
DO Item=1, CountHTAlgoObjectsSingleSurf
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
ErrorsFoundSingleSurf = .FALSE.
Found = FindItemInList(cAlphaArgs(1), Surface%Name, TotSurfaces)
IF (Found == 0) Then
Call ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM( cAlphaArgs(1))// &
'", did not find matching surface.')
ErrorsFoundSingleSurf = .TRUE.
ENDIF
SELECT CASE (cAlphaArgs(2))
CASE ('CONDUCTIONTRANSFERFUNCTION')
tmpAlgoInput = HeatTransferModel_CTF
CASE ('MOISTUREPENETRATIONDEPTHCONDUCTIONTRANSFERFUNCTION')
tmpAlgoInput = HeatTransferModel_EMPD
CASE ('COMBINEDHEATANDMOISTUREFINITEELEMENT')
tmpAlgoInput = HeatTransferModel_HAMT
CASE ('CONDUCTIONFINITEDIFFERENCE')
tmpAlgoInput = HeatTransferModel_CondFD
CASE DEFAULT
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", invalid '//TRIM(cAlphaFieldNames(2))//'="'//TRIM(cAlphaArgs(2)))
ErrorsFoundSingleSurf = .TRUE.
END SELECT
IF (.NOT. ErrorsFoundSingleSurf) THEN
Surface(Found)%HeatTransferAlgorithm = tmpAlgoInput
IF (.NOT. ANY(HeatTransferAlgosUsed == tmpAlgoInput)) THEN ! add new algo
ALLOCATE(tmpHeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed))
tmpHeatTransferAlgosUsed = HeatTransferAlgosUsed
NumberOfHeatTransferAlgosUsed = NumberOfHeatTransferAlgosUsed + 1
DEALLOCATE(HeatTransferAlgosUsed)
ALLOCATE(HeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed))
HeatTransferAlgosUsed(1:NumberOfHeatTransferAlgosUsed-1) = tmpHeatTransferAlgosUsed
HeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed) = tmpAlgoInput
DEALLOCATE(tmpHeatTransferAlgosUsed)
ENDIF
ELSE
ErrorsFound = .TRUE.
ENDIF
ENDDO ! single surface heat transfer algorithm override
cCurrentModuleObject = 'SurfaceProperty:HeatTransferAlgorithm:MultipleSurface'
CountHTAlgoObjectsMultiSurf = GetNumObjectsFound(cCurrentModuleObject)
DO Item=1, CountHTAlgoObjectsMultiSurf
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
ErrorsFoundMultiSurf = .FALSE.
SELECT CASE (cAlphaArgs(3))
CASE ('CONDUCTIONTRANSFERFUNCTION')
tmpAlgoInput = HeatTransferModel_CTF
CASE ('MOISTUREPENETRATIONDEPTHCONDUCTIONTRANSFERFUNCTION')
tmpAlgoInput = HeatTransferModel_EMPD
CASE ('COMBINEDHEATANDMOISTUREFINITEELEMENT')
tmpAlgoInput = HeatTransferModel_HAMT
CASE ('CONDUCTIONFINITEDIFFERENCE')
tmpAlgoInput = HeatTransferModel_CondFD
CASE DEFAULT
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", invalid '//TRIM(cAlphaFieldNames(3))//'="'//TRIM(cAlphaArgs(3)))
ErrorsFoundMultiSurf = .TRUE.
END SELECT
SELECT CASE(cAlphaArgs(2))
CASE ('ALLEXTERIORSURFACES')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond > 0) CYCLE ! Interior surfaces
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE ('ALLEXTERIORWALLS')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond > 0) CYCLE ! Interior surfaces
IF (.not. Surface(SurfNum)%Class == SurfaceClass_Wall) CYCLE
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE('ALLEXTERIORROOFS')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond > 0) CYCLE ! Interior surfaces
IF (.not. Surface(SurfNum)%Class == SurfaceClass_Roof) CYCLE
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE('ALLEXTERIORFLOORS')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond > 0) CYCLE ! Interior surfaces
IF (.not. Surface(SurfNum)%Class == SurfaceClass_Floor) CYCLE
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE ('ALLGROUNDCONTACTSURFACES')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond /= Ground) CYCLE ! ground BC
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE ('ALLINTERIORSURFACES')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond <= 0) CYCLE ! Exterior surfaces
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE ('ALLINTERIORWALLS')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond <= 0) CYCLE ! Exterior surfaces
IF (.not. Surface(SurfNum)%Class == SurfaceClass_Wall) CYCLE
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE('ALLINTERIORROOFS','ALLINTERIORCEILINGS')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond <= 0) CYCLE ! Exterior surfaces
IF (.not. Surface(SurfNum)%Class == SurfaceClass_Roof) CYCLE
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE('ALLINTERIORFLOORS')
SurfacesOfType=.false.
DO SurfNum=1,TotSurfaces
IF (.not. Surface(SurfNum)%HeatTransSurf) CYCLE
IF (Surface(SurfNum)%ExtBoundCond <= 0) CYCLE ! Exterior surfaces
IF (.not. Surface(SurfNum)%Class == SurfaceClass_Floor) CYCLE
IF (Construct(Surface(SurfNum)%Construction)%TypeIsWindow) CYCLE
SurfacesOfType=.true.
Surface(SurfNum)%HeatTransferAlgorithm = tmpAlgoInput
ENDDO
CASE DEFAULT
SurfacesOfType=.false.
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", invalid '//TRIM(cAlphaFieldNames(2))//'="'//TRIM(cAlphaArgs(2)))
ErrorsFoundMultiSurf = .TRUE.
END SELECT
IF (.not. SurfacesOfType) THEN
CALL ShowWarningError('In '//TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", for Multiple Surface Assignment="'//trim(cAlphaArgs(2))// &
'", there were no surfaces of that type found for assignment.')
ELSE
IF (.NOT. ANY(HeatTransferAlgosUsed == tmpAlgoInput)) THEN ! add new algo
ALLOCATE(tmpHeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed))
tmpHeatTransferAlgosUsed = HeatTransferAlgosUsed
NumberOfHeatTransferAlgosUsed = NumberOfHeatTransferAlgosUsed + 1
DEALLOCATE(HeatTransferAlgosUsed)
ALLOCATE(HeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed))
HeatTransferAlgosUsed(1:NumberOfHeatTransferAlgosUsed-1) = tmpHeatTransferAlgosUsed
HeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed) = tmpAlgoInput
DEALLOCATE(tmpHeatTransferAlgosUsed)
ENDIF
ENDIF
IF (ErrorsFoundMultiSurf) ErrorsFound = .TRUE.
ENDDO ! multi surface heat transfer algo override
cCurrentModuleObject = 'SurfaceProperty:HeatTransferAlgorithm:SurfaceList'
CountHTAlgoObjectsSurfList = GetNumObjectsFound(cCurrentModuleObject)
DO Item=1, CountHTAlgoObjectsSurfList
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
ErrorsFoundSurfList = .FALSE.
SELECT CASE (cAlphaArgs(2))
CASE ('CONDUCTIONTRANSFERFUNCTION')
tmpAlgoInput = HeatTransferModel_CTF
CASE ('MOISTUREPENETRATIONDEPTHCONDUCTIONTRANSFERFUNCTION')
tmpAlgoInput = HeatTransferModel_EMPD
CASE ('COMBINEDHEATANDMOISTUREFINITEELEMENT')
tmpAlgoInput = HeatTransferModel_HAMT
CASE ('CONDUCTIONFINITEDIFFERENCE')
tmpAlgoInput = HeatTransferModel_CondFD
CASE DEFAULT
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", invalid '//TRIM(cAlphaFieldNames(2))//'="'//TRIM(cAlphaArgs(2)))
ErrorsFoundSurfList = .TRUE.
END SELECT
Do item1 = 3, NumAlphas
Found = FinditemInList(cAlphaArgs(item1), Surface%Name, TotSurfaces)
IF (Found == 0) Then
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM( cAlphaArgs(1))// &
'", did not find matching surface.')
CALL ShowContinueError('Name of surface not found = "'//TRIM(cAlphaArgs(item1))//'"')
ErrorsFoundSurfList = .TRUE.
ENDIF
IF (.NOT. ErrorsFoundSurfList) THEN
Surface(Found)%HeatTransferAlgorithm = tmpAlgoInput
IF (.NOT. ANY(HeatTransferAlgosUsed == tmpAlgoInput)) THEN ! add new algo
ALLOCATE(tmpHeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed))
tmpHeatTransferAlgosUsed = HeatTransferAlgosUsed
NumberOfHeatTransferAlgosUsed = NumberOfHeatTransferAlgosUsed + 1
DEALLOCATE(HeatTransferAlgosUsed)
ALLOCATE(HeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed))
HeatTransferAlgosUsed(1:NumberOfHeatTransferAlgosUsed-1) = tmpHeatTransferAlgosUsed
HeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed) = tmpAlgoInput
DEALLOCATE(tmpHeatTransferAlgosUsed)
ENDIF
ELSE
ErrorsFound = .TRUE.
ENDIF
ENDDO
ENDDO
cCurrentModuleObject = 'SurfaceProperty:HeatTransferAlgorithm:Construction'
CountHTAlgoObjectsSurfList = GetNumObjectsFound(cCurrentModuleObject)
DO Item=1, CountHTAlgoObjectsSurfList
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
ErrorsFoundByConstruct = .FALSE.
SELECT CASE (cAlphaArgs(2))
CASE ('CONDUCTIONTRANSFERFUNCTION')
tmpAlgoInput = HeatTransferModel_CTF
CASE ('MOISTUREPENETRATIONDEPTHCONDUCTIONTRANSFERFUNCTION')
tmpAlgoInput = HeatTransferModel_EMPD
CASE ('COMBINEDHEATANDMOISTUREFINITEELEMENT')
tmpAlgoInput = HeatTransferModel_HAMT
CASE ('CONDUCTIONFINITEDIFFERENCE')
tmpAlgoInput = HeatTransferModel_CondFD
CASE DEFAULT
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", invalid '//TRIM(cAlphaFieldNames(2))//'="'//TRIM(cAlphaArgs(2)))
ErrorsFoundByConstruct = .TRUE.
END SELECT
Found = 0
Found = FindItemInList(cAlphaArgs(3), Construct%Name, TotConstructs )
IF (Found == 0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", invalid '//TRIM(cAlphaFieldNames(3))//'="'//TRIM(cAlphaArgs(3)))
ErrorsFoundByConstruct = .TRUE.
ENDIF
IF (.NOT. ErrorsFoundByConstruct ) THEN
DO item1=1, TotSurfaces
IF (Surface(item1)%Construction == Found) THEN
Surface(item1)%HeatTransferAlgorithm = tmpAlgoInput
IF (.NOT. ANY(HeatTransferAlgosUsed == tmpAlgoInput)) THEN ! add new algo
ALLOCATE(tmpHeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed))
tmpHeatTransferAlgosUsed = HeatTransferAlgosUsed
NumberOfHeatTransferAlgosUsed = NumberOfHeatTransferAlgosUsed + 1
DEALLOCATE(HeatTransferAlgosUsed)
ALLOCATE(HeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed))
HeatTransferAlgosUsed(1:NumberOfHeatTransferAlgosUsed-1) = tmpHeatTransferAlgosUsed
HeatTransferAlgosUsed(NumberOfHeatTransferAlgosUsed) = tmpAlgoInput
DEALLOCATE(tmpHeatTransferAlgosUsed)
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
! test for missing materials for algorithms selected
NumEMPDMat=GetNumObjectsFound('MaterialProperty:MoisturePenetrationDepth:Settings')
NumPCMat=GetNumObjectsFound('MaterialProperty:PhaseChange') ! needs detailed algo
NumVTCMat=GetNumObjectsFound('MaterialProperty:VariableThermalConductivity')
NumHAMTMat1=GetNumObjectsFound('MaterialProperty:HeatAndMoistureTransfer:Settings')
NumHAMTMat2=GetNumObjectsFound('MaterialProperty:HeatAndMoistureTransfer:SorptionIsotherm')
NumHAMTMat3=GetNumObjectsFound('MaterialProperty:HeatAndMoistureTransfer:Suction')
NumHAMTMat4=GetNumObjectsFound('MaterialProperty:HeatAndMoistureTransfer:Redistribution')
NumHAMTMat5=GetNumObjectsFound('MaterialProperty:HeatAndMoistureTransfer:Diffusion')
NumHAMTMat6=GetNumObjectsFound('MaterialProperty:HeatAndMoistureTransfer:ThermalConductivity')
SumHAMTMat=NumHAMTMat1+NumHAMTMat2+NumHAMTMat3+NumHAMTMat4+NumHAMTMat5+NumHAMTMat6
msgneeded=.false.
IF (NumEMPDMat > 0 .AND. .NOT. ANY(HeatTransferAlgosUsed == HeatTransferModel_EMPD)) THEN
CALL ShowWarningError('The input file includes '// &
TRIM(RoundSigDigits(NumEMPDMat))//' MaterialProperty:MoisturePenetrationDepth:Settings objects' &
// ' but the moisture penetration depth algorithm is not used anywhere.')
msgneeded=.true.
ENDIF
IF (NumPCMat > 0 .AND. .NOT. ANY(HeatTransferAlgosUsed == HeatTransferModel_CondFD)) THEN
CALL ShowWarningError('The input file includes '// &
TRIM(RoundSigDigits(NumPCMat))//' MaterialProperty:PhaseChange objects' &
// ' but the conduction finite difference algorithm is not used anywhere.')
msgneeded=.true.
ENDIF
IF (NumVTCMat > 0 .AND. .NOT. ANY(HeatTransferAlgosUsed == HeatTransferModel_CondFD)) THEN
CALL ShowWarningError('The input file includes '// &
TRIM(RoundSigDigits(NumVTCMat))//' MaterialProperty:VariableThermalConductivity objects' &
// ' but the conduction finite difference algorithm is not used anywhere.')
msgneeded=.true.
ENDIF
IF (SumHAMTMat > 0 .AND. .NOT. ANY(HeatTransferAlgosUsed == HeatTransferModel_HAMT )) THEN
CALL ShowWarningError('The input file includes '// &
trim(RoundSigDigits(SumHAMTMat))//' MaterialProperty:HeatAndMoistureTransfer:* objects' &
// ' but the combined heat and moisture finite difference algorithm is not used anywhere.')
msgneeded=.true.
ENDIF
IF (msgneeded) THEN
CALL ShowContinueError('Previous materials will be ignored due to HeatBalanceAlgorithm choice.')
ENDIF
msgneeded = .FALSE.
IF (NumEMPDMat == 0 .AND. ANY(HeatTransferAlgosUsed == HeatTransferModel_EMPD)) THEN
CALL ShowWarningError('The moisture penetration depth conduction transfer function algorithm is used' &
// ' but the input file includes no MaterialProperty:MoisturePenetrationDepth:Settings objects.')
msgneeded=.TRUE.
ENDIF
IF (SumHAMTMat == 0 .AND. ANY(HeatTransferAlgosUsed == HeatTransferModel_HAMT ) ) THEN
CALL ShowWarningError('The combined heat and moisture finite element algorithm is used but the input file includes '// &
' no MaterialProperty:HeatAndMoistureTransfer:* objects.')
msgneeded=.TRUE.
ENDIF
IF (msgneeded) THEN
CALL ShowContinueError('Certain materials objects are necessary to achieve proper results with the heat transfer ' &
// 'algorithm(s) selected.')
ENDIF
! Write Solution Algorithm to the initialization output file for User Verification
Write(OutputFileInits,fmtA) '! <Surface Heat Transfer Algorithm>, Value {CTF - ConductionTransferFunction | '// &
'EMPD - MoisturePenetrationDepthConductionTransferFunction | '// &
'CondFD - ConductionFiniteDifference | '// &
'HAMT - CombinedHeatAndMoistureFiniteElement} - Description,Inside Surface Max Temperature Limit{C}, ' // &
'Surface Convection Coefficient Lower Limit {W/m2-K}, Surface Convection Coefficient Upper Limit {W/m2-K}'
DO item1 = 1, NumberOfHeatTransferAlgosUsed
AlgoName = ' '
SELECT CASE (HeatTransferAlgosUsed(item1))
CASE (HeatTransferModel_CTF)
AlgoName = 'CTF - ConductionTransferFunction'
CASE (HeatTransferModel_CondFD)
AlgoName = 'CondFD - ConductionFiniteDifference'
CASE (HeatTransferModel_EMPD)
AlgoName = 'EMPD - MoisturePenetrationDepthConductionTransferFunction'
CASE (HeatTransferModel_HAMT)
AlgoName = 'HAMT - CombinedHeatAndMoistureFiniteElement'
END SELECT
WRITE(OutputFileInits,725) TRIM(AlgoName),TRIM(RoundSigDigits(MaxSurfaceTempLimit,0)), &
TRIM(RoundSigDigits(LowHConvLimit, 2)), TRIM(RoundSigDigits(HighHConvLimit, 1))
ENDDO
725 Format('Surface Heat Transfer Algorithm, ',A,',',A, ',', A, ',', A)
!Assign model type to windows, shading surfaces, and TDDs
DO item=1, TotSurfaces
IF (Surface(item)%Class == SurfaceClass_Window .OR. &
Surface(item)%Class == SurfaceClass_GlassDoor) THEN
! todo, add complex fenestration switch HeatTransferModel_ComplexFenestration
IF (SurfaceWindow(item)%WindowModelType == WindowBSDFModel) THEN
Surface(item)%HeatTransferAlgorithm = HeatTransferModel_ComplexFenestration
ELSE
Surface(item)%HeatTransferAlgorithm = HeatTransferModel_Window5
ENDIF
ENDIF
IF (Surface(item)%Class == SurfaceClass_Detached_B .OR. &
Surface(item)%Class == SurfaceClass_Detached_F .OR. &
Surface(item)%Class == SurfaceClass_Shading .OR. &
Surface(item)%Class == SurfaceClass_Overhang .OR. &
Surface(item)%Class == SurfaceClass_Fin) THEN
Surface(item)%HeatTransferAlgorithm = HeatTransferModel_None
ENDIF
IF ( Surface(item)%Class == SurfaceClass_TDD_Diffuser) THEN
Surface(item)%HeatTransferAlgorithm = HeatTransferModel_TDD
ENDIF
ENDDO
RETURN
END SUBROUTINE GetSurfaceHeatTransferAlgorithmOverrides