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 |
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 CalcExteriorVentedCavity(SurfNum)
! SUBROUTINE INFORMATION:
! AUTHOR B Griffith
! DATE WRITTEN January 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! manages calculating the temperatures of baffle and air cavity for
! multi-skin configuration.
! METHODOLOGY EMPLOYED:
! derived from CalcPassiveTranspiredCollector
! REFERENCES:
! na
! USE STATEMENTS:
USE DataPrecisionGlobals
USE DataGlobals , ONLY: SecInHour
USE DataEnvironment , ONLY: SkyTemp, SunIsUp, OutBaroPress, OutEnthalpy, IsRain
USE Psychrometrics , ONLY: PsyRhoAirFnPbTdbW, PsyCpAirFnWTdb, PsyWFnTdbTwbPb
USE DataSurfaces , ONLY: Surface, ExtVentedCavity, TotExtVentCav, OSCM
!unused0909 USE DataHVACGlobals , ONLY: TimeStepSys
USE ConvectionCoefficients, ONLY: InitExteriorConvectionCoeff
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SurfNum ! index of surface
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS:
INTERFACE
SUBROUTINE CalcPassiveExteriorBaffleGap(SurfPtrARR, VentArea, Cv, Cd, HdeltaNPL, SolAbs, AbsExt, Tilt, AspRat, GapThick, &
Roughness,QdotSource, TsBaffle, TaGap, HcGapRpt, HrGapRpt,IscRpt , MdotVentRpt, &
VdotWindRpt, VdotBouyRpt)
USE DataPrecisionGlobals
INTEGER, INTENT(IN), DIMENSION(:) :: SurfPtrARR ! Array of indexes pointing to Surface structure in DataSurfaces
REAL(r64), INTENT(IN) :: VentArea ! Area available for venting the gap [m2]
REAL(r64), INTENT(IN) :: Cv ! Oriface coefficient for volume-based discharge, wind-driven [--]
REAL(r64), INTENT(IN) :: Cd ! oriface coefficient for discharge, bouyancy-driven [--]
REAL(r64), INTENT(IN) :: HdeltaNPL ! Height difference from neutral pressure level [m]
REAL(r64), INTENT(IN) :: SolAbs ! solar absorptivity of baffle [--]
REAL(r64), INTENT(IN) :: AbsExt ! thermal absorptance/emittance of baffle material [--]
REAL(r64), INTENT(IN) :: Tilt ! Tilt of gap [Degrees]
REAL(r64), INTENT(IN) :: AspRat ! aspect ratio of gap Height/gap [--]
REAL(r64), INTENT(IN) :: GapThick ! Thickness of air space between baffle and underlying surface
INTEGER, INTENT(IN) :: Roughness ! Roughness index (1-6), see DataHeatBalance parameters
REAL(r64), INTENT(IN) :: QdotSource ! Source/sink term, e.g. electricity exported from solar cell [W]
REAL(r64), INTENT(INOUT) :: TsBaffle ! Temperature of baffle (both sides) use lagged value on input [C]
REAL(r64), INTENT(INOUT) :: TaGap ! Temperature of air gap (assumed mixed) use lagged value on input [C]
REAL(r64), INTENT(OUT), OPTIONAL :: HcGapRpt !
REAL(r64), INTENT(OUT), OPTIONAL :: HrGapRpt !
REAL(r64), INTENT(OUT), OPTIONAL :: IscRpt
REAL(r64), INTENT(OUT), OPTIONAL :: MdotVentRpt
REAL(r64), INTENT(OUT), OPTIONAL :: VdotWindRpt
REAL(r64), INTENT(OUT), OPTIONAL :: VdotBouyRpt
END SUBROUTINE CalcPassiveExteriorBaffleGap
END INTERFACE
! DERIVED TYPE DEFINITIONS:
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! local working variables
REAL(r64) :: AspRat ! Aspect Ratio of gap
REAL(r64) :: TmpTscoll
REAL(r64) :: TmpTaplen
REAL(r64) :: RhoAir
REAL(r64) :: holeArea
REAL(r64) :: HrPlen
REAL(r64) :: HcPlen
REAL(r64) :: Isc
REAL(r64) :: MdotVent
REAL(r64) :: VdotWind
REAL(r64) :: VdotThermal
INTEGER :: CavNum ! do loop counter
INTEGER :: iter ! do loop counter
INTEGER :: thisOSCM
REAL(r64) :: TempExt
REAL(r64) :: OutHumRatExt
CavNum = Surface(SurfNum)%ExtCavNum
TempExt = Surface(SurfNum)%OutDryBulbTemp
OutHumRatExt = PsyWFnTdbTwbPb(Surface(SurfNum)%OutDryBulbTemp, Surface(SurfNum)%OutWetBulbTemp, OutBaroPress)
RhoAir = PsyRhoAirFnPbTdbW(OutBaroPress,TempExt,OutHumRatExt)
holeArea = ExtVentedCavity(CavNum)%ActualArea*ExtVentedCavity(CavNum)%Porosity
AspRat = ExtVentedCavity(CavNum)%HdeltaNPL * 2.0d0 / ExtVentedCavity(CavNum)%PlenGapThick
TmpTscoll = ExtVentedCavity(CavNum)%TbaffleLast
TmpTaplen = ExtVentedCavity(CavNum)%TairLast
! all the work is done in this routine located in GeneralRoutines.f90
DO iter =1, 3 ! this is a sequential solution approach.
CALL CalcPassiveExteriorBaffleGap(ExtVentedCavity(CavNum)%SurfPtrs,holeArea, ExtVentedCavity(CavNum)%Cv, &
ExtVentedCavity(CavNum)%Cd, ExtVentedCavity(CavNum)%HdeltaNPL, &
ExtVentedCavity(CavNum)%SolAbsorp, ExtVentedCavity(CavNum)%LWEmitt, &
ExtVentedCavity(CavNum)%Tilt, AspRat, ExtVentedCavity(CavNum)%PlenGapThick, &
ExtVentedCavity(CavNum)%BaffleRoughness, ExtVentedCavity(CavNum)%QdotSource, &
TmpTscoll, TmpTaPlen, HcPlen , HrPlen , Isc, MdotVent,VdotWind,VdotThermal )
ENDDO ! sequential solution
!now fill results into derived types
ExtVentedCavity(CavNum)%Isc = Isc
ExtVentedCavity(CavNum)%TAirCav = TmpTaPlen
ExtVentedCavity(CavNum)%Tbaffle = TmpTscoll
ExtVentedCavity(CavNum)%HrPlen = HrPlen
ExtVentedCavity(CavNum)%HcPlen = HcPlen
ExtVentedCavity(CavNum)%PassiveACH = (MdotVent/RhoAir) *(1.0d0/(ExtVentedCavity(CavNum)%ProjArea &
*ExtVentedCavity(CavNum)%PlenGapThick))*SecInHour
ExtVentedCavity(CavNum)%PassiveMdotVent = MdotVent
ExtVentedCavity(CavNum)%PassiveMdotWind = VdotWind * RhoAir
ExtVentedCavity(CavNum)%PassiveMdotTherm = VdotThermal * RhoAir
! now do some updates
ExtVentedCavity(CavNum)%TairLast = ExtVentedCavity(CavNum)%TAirCav
ExtVentedCavity(CavNum)%TbaffleLast = ExtVentedCavity(CavNum)%Tbaffle
! update the OtherSideConditionsModel coefficients.
thisOSCM = ExtVentedCavity(CavNum)%OSCMPtr
OSCM(thisOSCM)%TConv = ExtVentedCavity(CavNum)%TAirCav
OSCM(thisOSCM)%HConv = ExtVentedCavity(CavNum)%HcPlen
OSCM(thisOSCM)%TRad = ExtVentedCavity(CavNum)%Tbaffle
OSCM(thisOSCM)%HRad = ExtVentedCavity(CavNum)%HrPlen
RETURN
END SUBROUTINE CalcExteriorVentedCavity