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 InitEMSControlledSurfaceProperties
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN April 2011
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! initialize material and construction surface properties if being overriden by EMS
! METHODOLOGY EMPLOYED:
! update solar, thermal and visible absorptance values when actuated by EMS
! REFERENCES:
! na
! USE STATEMENTS:
! na
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:
LOGICAL, SAVE :: SurfPropOverridesPresent = .FALSE. ! detect if EMS ever used for this and inits need to execute
INTEGER :: MaterNum ! do loop counter over materials
INTEGER :: ConstrNum ! do loop counter over constructions
INTEGER :: TotLayers ! count of material layers in a construction
INTEGER :: InsideMaterNum ! integer pointer for inside face's material layer
INTEGER :: OutsideMaterNum ! integer pointer for outside face's material layer
! first determine if anything needs to be done, once yes, then always init
IF (ANY(Material%AbsorpSolarEMSOverrideOn)) SurfPropOverridesPresent = .TRUE.
IF (ANY(Material%AbsorpThermalEMSOverrideOn)) SurfPropOverridesPresent = .TRUE.
IF (ANY(Material%AbsorpVisibleEMSOverrideOn)) SurfPropOverridesPresent = .TRUE.
IF ( .NOT. SurfPropOverridesPresent) RETURN ! quick return if nothing has ever needed to be done
! first, loop over materials
DO MaterNum=1,TotMaterials
IF (Material(MaterNum)%AbsorpSolarEMSOverrideOn) THEN
Material(MaterNum)%AbsorpSolar = MAX(MIN(Material(MaterNum)%AbsorpSolarEMSOverride, 0.9999d0), 0.0001d0)
ELSE
Material(MaterNum)%AbsorpSolar = Material(MaterNum)%AbsorpSolarInput
ENDIF
IF (Material(MaterNum)%AbsorpThermalEMSOverrideOn) THEN
Material(MaterNum)%AbsorpThermal = MAX(MIN(Material(MaterNum)%AbsorpThermalEMSOverride, 0.9999d0), 0.0001d0)
ELSE
Material(MaterNum)%AbsorpThermal = Material(MaterNum)%AbsorpThermalInput
ENDIF
IF (Material(MaterNum)%AbsorpVisibleEMSOverrideOn) THEN
Material(MaterNum)%AbsorpVisible = MAX(MIN(Material(MaterNum)%AbsorpVisibleEMSOverride, 0.9999d0), 0.0001d0)
ELSE
Material(MaterNum)%AbsorpVisible = Material(MaterNum)%AbsorpVisibleInput
ENDIF
ENDDO ! loop over materials
! second, loop over constructions
DO ConstrNum = 1, TotConstructs
IF (Construct(ConstrNum)%TypeIsWindow) CYCLE ! only override opaque constructions
TotLayers = Construct(ConstrNum)%TotLayers
IF (TotLayers == 0) CYCLE ! error condition
InsideMaterNum=Construct(ConstrNum)%LayerPoint(TotLayers)
IF (InsideMaterNum /= 0) THEN
Construct(ConstrNum)%InsideAbsorpVis = Material(InsideMaterNum)%AbsorpVisible
Construct(ConstrNum)%InsideAbsorpSolar = Material(InsideMaterNum)%AbsorpSolar
Construct(ConstrNum)%InsideAbsorpThermal = Material(InsideMaterNum)%AbsorpThermal
END IF
OutsideMaterNum=Construct(ConstrNum)%LayerPoint(1)
IF (OutsideMaterNum /= 0) THEN
Construct(ConstrNum)%OutsideAbsorpVis = Material(OutsideMaterNum)%AbsorpVisible
Construct(ConstrNum)%OutsideAbsorpSolar = Material(OutsideMaterNum)%AbsorpSolar
Construct(ConstrNum)%OutsideAbsorpThermal = Material(OutsideMaterNum)%AbsorpThermal
END IF
ENDDO
RETURN
END SUBROUTINE InitEMSControlledSurfaceProperties