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.
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 GetMoistureBalanceEMPDInput ! Moisture Balance EMPD Input Reader Manager
! SUBROUTINE INFORMATION:
! AUTHOR Muthusamy V. Swami and Lixing Gu
! DATE WRITTEN August 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is the main driver for initializations within the
! heat balance using the EMPD model.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataIPShortCuts
USE InputProcessor, ONLY: GetNumObjectsFound,GetObjectItem,FindItemInList
USE DataSurfaces, ONLY: HeatTransferModel_EMPD
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: IOStat ! IO Status when calling get input subroutine
CHARACTER(len=MaxNameLength),DIMENSION(3) &
:: MaterialNames ! Number of Material Alpha names defined
INTEGER :: MaterNum ! Counter to keep track of the material number
INTEGER :: MaterialNumAlpha ! Number of material alpha names being passed
INTEGER :: MaterialNumProp ! Number of material properties being passed
REAL(r64), DIMENSION(5) :: MaterialProps !Temporary array to transfer material properties
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
INTEGER :: EMPDMat ! EMPD Moisture Material additional properties for each base material
Integer :: Loop
INTEGER :: Layer
INTEGER :: SurfNum ! Surface number
INTEGER :: MatNum ! Material number at interior layer
INTEGER :: ConstrNum ! Construction number
LOGICAL, ALLOCATABLE, DIMENSION(:) :: EMPDzone ! EMPD property check for each zone
INTEGER, SAVE :: ErrCount=0
! Load the additional EMPD Material properties
cCurrentModuleObject='MaterialProperty:MoisturePenetrationDepth:Settings'
EMPDMat=GetNumObjectsFound(cCurrentModuleObject)
IF (EMPDMat == 0) THEN
CALL ShowSevereError('EMPD Solution requested, but no "'//TRIM(cCurrentModuleObject)//'" objects were found.')
ErrorsFound=.true.
ENDIF
DO Loop=1,EMPDMat
!Call Input Get routine to retrieve material data
CALL GetObjectItem(cCurrentModuleObject,Loop,MaterialNames,MaterialNumAlpha, &
MaterialProps,MaterialNumProp,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
!Load the material derived type from the input data.
MaterNum = FindItemInList(MaterialNames(1),Material%Name,TotMaterials)
IF (MaterNum == 0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': invalid '//TRIM(cAlphaFieldNames(1))// &
' entered='//TRIM(MaterialNames(1))//', must match to a valid Material name.')
ErrorsFound=.true.
Cycle
ENDIF
! See if Material was defined with R only. (No density is defined then and not applicable for EMPD).
! What about materials other than "regular materials" (e.g. Glass, Air, etc)
IF (Material(MaterNum)%Group == RegularMaterial .and. MaterialProps(1) > 0.0d0) THEN
IF (Material(MaterNum)%ROnly) THEN
! CALL ShowSevereError('EMPD base material = "'//TRIM(Material(MaterNum)%Name)// &
! '" was Material:NoMass. It cannot be used for EMPD calculations.')
CALL ShowContinueError('..Only Material base materials are allowed to have EMPD properties.')
CALL ShowSevereError(TRIM(cCurrentModuleObject)// &
': Reference Material is not appropriate type for EMPD properties, material='// &
TRIM(Material(MaterNum)%Name)//', must have regular properties (L,Cp,K,D)')
ErrorsFound=.true.
ENDIF
ENDIF
IF (Material(MaterNum)%Group /= RegularMaterial) THEN
! CALL ShowSevereError('GetMoistureBalanceEMPDInput: Only Material:Regular base materials are allowed '// &
! 'to have EMPD properties, material = '// TRIM(Material(MaterNum)%Name))
CALL ShowSevereError(TRIM(cCurrentModuleObject)// &
': Reference Material is not appropriate type for EMPD properties, material='// &
TRIM(Material(MaterNum)%Name)//', must have regular properties (L,Cp,K,D)')
ErrorsFound=.true.
ENDIF
! Once the material derived type number is found then load the additional moisture material properties
Material(MaterNum)%EMPDMaterialProps = .true.
Material(MaterNum)%EMPDValue = MaterialProps(1)
Material(MaterNum)%MoistACoeff = MaterialProps(2)
Material(MaterNum)%MoistBCoeff = MaterialProps(3)
Material(MaterNum)%MoistCCoeff = MaterialProps(4)
Material(MaterNum)%MoistDCoeff = MaterialProps(5)
ENDDO
! Ensure at least one interior EMPD surface for each zone
ALLOCATE(EMPDzone(NumOfZones))
EMPDzone = .False.
Do SurfNum=1,TotSurfaces
if (.NOT. Surface(SurfNum)%HeatTransSurf .OR. &
Surface(SurfNum)%Class .EQ. SurfaceClass_Window) Cycle ! Heat transfer surface only and not a window
IF (Surface(SurfNum)%HeatTransferAlgorithm /= HeatTransferModel_EMPD) CYCLE
ConstrNum = Surface(SurfNum)%Construction
MatNum = Construct(ConstrNum)%LayerPoint(Construct(ConstrNum)%TotLayers)
If (Material(MatNum)%EMPDValue .GT. 0.0d0 .AND. Surface(SurfNum)%Zone .gt. 0) then
EMPDzone(Surface(SurfNum)%Zone) = .True.
else
ErrCount=ErrCount+1
IF (ErrCount == 1 .and. .not. DisplayExtraWarnings) THEN
Call ShowMessage('GetMoistureBalanceEMPDInput: EMPD properties are not assigned to the inside layer of Surfaces')
CALL ShowContinueError('...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual surfaces.')
ENDIF
IF (DisplayExtraWarnings) THEN
Call ShowMessage('GetMoistureBalanceEMPDInput: EMPD properties are not assigned to the '// &
'inside layer in Surface='// TRIM(Surface(SurfNum)%Name))
CALL ShowContinueError('with Construction='//TRIM(Construct(ConstrNum)%Name))
End if
end if
IF (Construct(ConstrNum)%TotLayers .eq. 1) then ! One layer construction
Cycle
else ! Multiple layer construction
IF (Material(Construct(ConstrNum)%LayerPoint(1))%EMPDMaterialProps .AND. & ! The external layer is not exposed to zone
Surface(SurfNum)%ExtBoundCond <= 0) THEN
CALL ShowSevereError('GetMoistureBalanceEMPDInput: EMPD properties are assigned to the '// &
'outside layer in Construction='// &
TRIM(Construct(ConstrNum)%Name))
CALL ShowContinueError('..Outside layer material with EMPD properties = '// &
TRIM(Material(Construct(ConstrNum)%LayerPoint(1))%Name))
CALL ShowContinueError('..A material with EMPD properties must be assigned to the inside layer of a construction.')
ErrorsFound=.true.
ENDIF
DO Layer=2,Construct(ConstrNum)%TotLayers-1
IF (Material(Construct(ConstrNum)%LayerPoint(Layer))%EMPDMaterialProps) THEN
CALL ShowSevereError('GetMoistureBalanceEMPDInput: EMPD properties are assigned to a '// &
'middle layer in Construction='// &
TRIM(Construct(ConstrNum)%Name))
CALL ShowContinueError('..Middle layer material with EMPD properties = '// &
TRIM(Material(Construct(ConstrNum)%LayerPoint(Layer))%Name))
CALL ShowContinueError('..A material with EMPD properties must be assigned to the inside layer of a construction.')
ErrorsFound=.true.
ENDIF
ENDDO
end if
End Do
Do Loop=1, NumOfZones
If (.NOT. EMPDZone(Loop)) then
CALL ShowSevereError('GetMoistureBalanceEMPDInput: None of the constructions for zone = '// &
TRIM(Zone(Loop)%Name)//' has an inside layer with EMPD properties')
CALL ShowContinueError('..For each zone, the inside layer of at least one construction must have EMPD properties')
ErrorsFound=.true.
End if
End Do
DEALLOCATE(EMPDzone)
Call ReportMoistureBalanceEMPD
IF (ErrorsFound) THEN
CALL ShowFatalError('GetMoistureBalanceEMPDInput: Errors found getting EMPD material properties, program terminated.')
ENDIF
RETURN
END SUBROUTINE GetMoistureBalanceEMPDInput