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 | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | SurfNum | |||
real(kind=r64), | intent(in), | DIMENSION(:) | :: | SurfaceTemperatures | ||
real(kind=r64), | intent(inout), | DIMENSION(:) | :: | HcIn | ||
real(kind=r64), | intent(in), | optional | DIMENSION(:) | :: | Vhc |
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 CalcDetailedHcInForDVModel(SurfNum,SurfaceTemperatures,HcIn,Vhc)
!SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN August 2000
! MODIFIED Used for DV model; Feb 2004, LKL
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This subroutine calculates the interior convection coefficient for a surface.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHeatBalFanSys, ONLY: MAT
USE DataRoomAirModel, ONLY: AirModel, RoomAirModel_UCSDDV, RoomAirModel_UCSDCV, RoomAirModel_UCSDUFI, RoomAirModel_UCSDUFE
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SurfNum ! surface number for which coefficients are being calculated
REAL(r64), DIMENSION(:), INTENT(IN) :: SurfaceTemperatures ! Temperature of surfaces for evaluation of HcIn
REAL(r64), DIMENSION(:), INTENT(INOUT) :: HcIn ! Interior Convection Coeff Array
REAL(r64), DIMENSION(:), INTENT(IN), OPTIONAL :: Vhc !Velocity array for forced convection coeff calculation
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: OneThird = (1.d0/3.d0) ! 1/3 in highest precision
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: DeltaTemp ! Temperature difference between the zone air and the surface
REAL(r64) :: TAirConv
REAL(r64) :: Hf
! FLOW:
IF (Surface(SurfNum)%HeatTransSurf) THEN ! Only treat heat transfer surfaces
! UCSD
SELECT CASE (Surface(SurfNum)%TAirRef)
CASE (AdjacentAirTemp)
TAirConv = TempEffBulkAir(SurfNum)
CASE DEFAULT
! currently set to mean air temp but should add error warning here
TAirConv = MAT(Surface(SurfNum)%Zone)
END SELECT
DeltaTemp = SurfaceTemperatures(SurfNum) - TAirConv
IF (AirModel(Surface(SurfNum)%Zone)%AirModelType == RoomAirModel_UCSDDV .or. &
AirModel(Surface(SurfNum)%Zone)%AirModelType == RoomAirModel_UCSDUFI .or. &
AirModel(Surface(SurfNum)%Zone)%AirModelType == RoomAirModel_UCSDUFE) THEN
! Set HConvIn using the proper correlation based on DeltaTemp and CosTiltSurf
IF (Surface(SurfNum)%IntConvCoeff /= 0) THEN
HcIn(SurfNum)=SetIntConvectionCoeff(SurfNum)
ELSEIF ((DeltaTemp == 0.0d0) .OR. (Surface(surfnum)%CosTilt == 0.0d0)) THEN ! Vertical Surface
HcIn(SurfNum) = 1.31d0*((ABS(DeltaTemp))**OneThird)
ELSEIF ( ((DeltaTemp < 0.0d0) .AND. (Surface(SurfNum)%CosTilt > 0.0d0)) .OR. &
((DeltaTemp > 0.0d0) .AND. (Surface(SurfNum)%CosTilt < 0.0d0)) ) THEN ! Enhanced Convection
HcIn(SurfNum) = 9.482d0*((ABS(DeltaTemp))**OneThird) &
/(7.283d0 - ABS(Surface(SurfNum)%CosTilt))
ELSEIF ( ((DeltaTemp > 0.0d0) .AND. (Surface(SurfNum)%CosTilt > 0.0d0)) .OR. &
((DeltaTemp < 0.0d0) .AND. (Surface(SurfNum)%CosTilt < 0.0d0)) ) THEN ! Reduced Convection
HcIn(SurfNum) = 1.810d0*((ABS(DeltaTemp))**OneThird) &
/(1.382d0 + ABS(Surface(SurfNum)%CosTilt))
END IF ! ...end of IF-THEN block to set HConvIn
ELSEIF (AirModel(Surface(SurfNum)%Zone)%AirModelType == RoomAirModel_UCSDCV) THEN
Hf=4.3d0*Vhc(Surface(SurfNum)%Zone)
! Set HConvIn using the proper correlation based on DeltaTemp and CosTiltSurf
IF (Surface(SurfNum)%IntConvCoeff /= 0) THEN
HcIn(SurfNum)=SetIntConvectionCoeff(SurfNum)
ELSEIF ((DeltaTemp == 0.0d0) .OR. (Surface(SurfNum)%CosTilt == 0.0d0)) THEN ! Vertical Surface
HcIn(SurfNum) = 1.31d0*((ABS(DeltaTemp))**OneThird)
HcIn(SurfNum)= (HcIn(SurfNum)**3.2d0+Hf**3.2d0)**(1.d0/3.2d0)
ELSEIF ( ((DeltaTemp < 0.0d0) .AND. (Surface(SurfNum)%CosTilt > 0.0d0)) .OR. &
((DeltaTemp > 0.0d0) .AND. (Surface(SurfNum)%CosTilt < 0.0d0)) ) THEN ! Enhanced Convection
HcIn(SurfNum) = 9.482d0*((ABS(DeltaTemp))**(1.d0/3.d0)) &
/(7.283 - ABS(Surface(SurfNum)%CosTilt))
HcIn(SurfNum)= (HcIn(SurfNum)**3.2d0+Hf**3.2d0)**(1.d0/3.2d0)
ELSEIF ( ((DeltaTemp > 0.0d0) .AND. (Surface(SurfNum)%CosTilt > 0.0d0)) .OR. &
((DeltaTemp < 0.0d0) .AND. (Surface(SurfNum)%CosTilt < 0.0d0)) ) THEN ! Reduced Convection
HcIn(SurfNum) = 1.810d0*((ABS(DeltaTemp))**OneThird) &
/(1.382d0 + ABS(Surface(SurfNum)%CosTilt))
HcIn(SurfNum)= (HcIn(SurfNum)**3.2d0+Hf**3.2d0)**(1.d0/3.2d0)
END IF ! ...end of IF-THEN block to set HConvIn
END IF
END IF
! Establish some lower limit to avoid a zero convection coefficient (and potential divide by zero problems)
IF (HcIn(SurfNum) < LowHConvLimit) HcIn(SurfNum) = LowHConvLimit
RETURN
END SUBROUTINE CalcDetailedHcInForDVModel