Skip to content

Commit

Permalink
Add source for version 8.0.0.008
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed May 8, 2015
1 parent f5c5ac2 commit a3981b5
Show file tree
Hide file tree
Showing 17 changed files with 3,846 additions and 3,738 deletions.
5 changes: 3 additions & 2 deletions SourceCode/DataHeatBalance.f90
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ MODULE DataHeatBalance ! EnergyPlus Data-Only Module

!Parameters for checking surface heat transfer models
REAL(r64), PARAMETER :: HighDiffusivityThreshold = 1.d-5 ! used to check if Material properties are out of line.
REAL(r64), PARAMETER :: ThinMaterialLayerThreshold = 0.003d0 ! 3 mm lower limit to expected material layers
REAL(r64), PARAMETER :: ThinMaterialLayerThreshold = 0.003d0 ! 3 mm lower limit to expected material layers

! DERIVED TYPE DEFINITIONS:

Expand Down Expand Up @@ -696,7 +696,8 @@ MODULE DataHeatBalance ! EnergyPlus Data-Only Module
REAL(r64) :: CalcFloorArea =0.0 ! Calculated floor area used for this zone
LOGICAL :: HasFloor =.false. ! Has "Floor" surface
LOGICAL :: HasRoof =.false. ! Has "Roof" or "Ceiling" Surface
LOGICAL :: IntZWindow =.false. ! Interzone Window present in this zone
LOGICAL :: HasInterZoneWindow =.false. ! Interzone Window(s) present in this zone
LOGICAL :: HasWindow =.false. ! Window(s) present in this zone
REAL(r64) :: AirCapacity =0.0
REAL(r64) :: ExtWindowArea =0.0 ! Exterior Window Area for Zone
REAL(r64) :: ExtGrossWallArea =0.0 ! Exterior Wall Area for Zone (Gross)
Expand Down
62 changes: 37 additions & 25 deletions SourceCode/DaylightingManager.f90
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,14 @@ SUBROUTINE CalcDayltgCoeffsRefMapPoints(ZoneNum)

!Calc for daylighting reference points
CALL CalcDayltgCoeffsRefPoints(ZoneNum)
IF (.not. DoingSizing) THEN
IF (.not. DoingSizing .and. .not. KickOffSimulation) THEN
!Calc for illuminance map
! IF (DeveloperFlag .and. WarmUpFlag) THEN
IF (WarmUpFlag) THEN
CALL DisplayString('Calculating Daylighting Coefficients (Map Points), Zone='//trim(Zone(ZoneNum)%Name))
ELSE
CALL DisplayString('Updating Daylighting Coefficients (Map Points), Zone='//trim(Zone(ZoneNum)%Name))
END IF
CALL CalcDayltgCoeffsMapPoints(ZoneNum)
ENDIF

Expand Down Expand Up @@ -1193,22 +1199,22 @@ SUBROUTINE CalcDayltgCoeffsMapPoints(ZoneNum)

! SUBROUTINE LOCAL VARIABLE DECLARATIONS:

REAL(r64), DIMENSION(3) :: W2 ! Second vertex of window
REAL(r64), DIMENSION(3) :: W3 ! Third vertex of window
REAL(r64), DIMENSION(3) :: U2 ! Second vertex of window for TDD:DOME (if exists)
REAL(r64), DIMENSION(3) :: RREF ! Location of a reference point in absolute coordinate system
REAL(r64), DIMENSION(3) :: RREF2 ! Location of virtual reference point in absolute coordinate system
REAL(r64), DIMENSION(3) :: RWIN ! Center of a window element in absolute coordinate system
REAL(r64), DIMENSION(3) :: RWIN2 ! Center of a window element for TDD:DOME (if exists) in abs coord sys
REAL(r64), DIMENSION(3) :: RAY ! Unit vector along ray from reference point to window element
REAL(r64), DIMENSION(3) :: W21 ! Vector from window vertex 2 to window vertex 1
REAL(r64), DIMENSION(3) :: W23 ! Vector from window vertex 2 to window vertex 3
REAL(r64), DIMENSION(3) :: U21 ! Vector from window vertex 2 to window vertex 1 for TDD:DOME (if exists)
REAL(r64), DIMENSION(3) :: U23 ! Vector from window vertex 2 to window vertex 3 for TDD:DOME (if exists)
REAL(r64), DIMENSION(3) :: WNORM2 ! Unit vector normal to TDD:DOME (if exists)
REAL(r64), DIMENSION(3) :: VIEWVC ! View vector in absolute coordinate system
REAL(r64), DIMENSION(3) :: VIEWVC2 ! Virtual view vector in absolute coordinate system
REAL(r64), DIMENSION(2) :: ZF ! Fraction of zone controlled by each reference point
REAL(r64), DIMENSION(3) :: W2 ! Second vertex of window
REAL(r64), DIMENSION(3) :: W3 ! Third vertex of window
REAL(r64), DIMENSION(3) :: U2 ! Second vertex of window for TDD:DOME (if exists)
REAL(r64), DIMENSION(3) :: RREF ! Location of a reference point in absolute coordinate system
REAL(r64), DIMENSION(3) :: RREF2 ! Location of virtual reference point in absolute coordinate system
REAL(r64), DIMENSION(3) :: RWIN ! Center of a window element in absolute coordinate system
REAL(r64), DIMENSION(3) :: RWIN2 ! Center of a window element for TDD:DOME (if exists) in abs coord sys
REAL(r64), DIMENSION(3) :: RAY ! Unit vector along ray from reference point to window element
REAL(r64), DIMENSION(3) :: W21 ! Vector from window vertex 2 to window vertex 1
REAL(r64), DIMENSION(3) :: W23 ! Vector from window vertex 2 to window vertex 3
REAL(r64), DIMENSION(3) :: U21 ! Vector from window vertex 2 to window vertex 1 for TDD:DOME (if exists)
REAL(r64), DIMENSION(3) :: U23 ! Vector from window vertex 2 to window vertex 3 for TDD:DOME (if exists)
REAL(r64), DIMENSION(3) :: WNORM2 ! Unit vector normal to TDD:DOME (if exists)
REAL(r64), DIMENSION(3) :: VIEWVC ! View vector in absolute coordinate system
REAL(r64), DIMENSION(3) :: VIEWVC2 ! Virtual view vector in absolute coordinate system
REAL(r64), DIMENSION(2) :: ZF ! Fraction of zone controlled by each reference point
! In the following four variables, I=1 for clear sky, 2 for overcast.
INTEGER :: IHR ! Hour of day counter
INTEGER :: NRF ! Number of daylighting reference points in a zone
Expand Down Expand Up @@ -1319,6 +1325,9 @@ SUBROUTINE CalcDayltgCoeffsMapPoints(ZoneNum)
NRF = IllumMapCalc(MapNum)%TotalMapRefPoints
ZF=0.d0

ALLOCATE(MapWindowSolidAngAtRefPt(ZoneDaylight(ZoneNum)%NumOfDayltgExtWins,NRF))
ALLOCATE(MapWindowSolidAngAtRefPtWtd(ZoneDaylight(ZoneNum)%NumOfDayltgExtWins,NRF))

DO IL = 1,NRF

RREF(1:3) = IllumMapCalc(MapNum)%MapRefPtAbsCoord(IL,1:3) ! (x, y, z)
Expand All @@ -1327,9 +1336,7 @@ SUBROUTINE CalcDayltgCoeffsMapPoints(ZoneNum)
! ---------- WINDOW LOOP ----------
! -------------

ALLOCATE(MapWindowSolidAngAtRefPt(ZoneDaylight(ZoneNum)%NumOfDayltgExtWins,NRF))
MapWindowSolidAngAtRefPt=0.d0
ALLOCATE(MapWindowSolidAngAtRefPtWtd(ZoneDaylight(ZoneNum)%NumOfDayltgExtWins,NRF))
MapWindowSolidAngAtRefPtWtd=0.d0

DO loopwin = 1,ZoneDaylight(ZoneNum)%NumOfDayltgExtWins
Expand Down Expand Up @@ -1420,11 +1427,11 @@ SUBROUTINE CalcDayltgCoeffsMapPoints(ZoneNum)

END DO ! End of window loop, loopwin - IWin

DEALLOCATE(MapWindowSolidAngAtRefPt)
DEALLOCATE(MapWindowSolidAngAtRefPtWtd)

END DO ! End of reference point loop, IL

DEALLOCATE(MapWindowSolidAngAtRefPt)
DEALLOCATE(MapWindowSolidAngAtRefPtWtd)

END DO ! MapNum

RETURN
Expand Down Expand Up @@ -4201,7 +4208,8 @@ SUBROUTINE GetDaylightingParametersDetaild(TotDaylightingDetailed,ErrorsFound)

DO SurfLoop = 1,TotSurfaces
IF(Surface(SurfLoop)%Class == SurfaceClass_Window .AND. Surface(SurfLoop)%ExtSolar) THEN
IF(ZoneDaylight(Surface(SurfLoop)%Zone)%TotalDaylRefPoints > 0 .AND. .NOT. Zone(Surface(SurfLoop)%Zone)%IntZWindow) THEN
IF(ZoneDaylight(Surface(SurfLoop)%Zone)%TotalDaylRefPoints > 0 .AND. &
.NOT. Zone(Surface(SurfLoop)%Zone)%HasInterZoneWindow) THEN
CALL SetupOutputVariable('Daylighting Window Reference Point 1 Illuminance [lux]', &
SurfaceWindow(SurfLoop)%IllumFromWinAtRefPt1Rep, &
'Zone', 'Average',Surface(SurfLoop)%Name)
Expand Down Expand Up @@ -6033,7 +6041,7 @@ SUBROUTINE DayltgInteriorIllum(ZoneNum)
END DO

! The following report variables are valid only for daylit zones without interior windows
IF(.NOT.Zone(ZoneNum)%IntZWindow) THEN
IF(.NOT.Zone(ZoneNum)%HasInterZoneWindow) THEN
DO loop = 1,ZoneDaylight(ZoneNum)%NumOfDayltgExtWins
IWin = ZoneDaylight(ZoneNum)%DayltgExtWinSurfNums(loop)
IS = 1
Expand Down Expand Up @@ -6278,6 +6286,7 @@ SUBROUTINE DayltgElecLightingControl(ZoneNum)
ENDIF
ZoneDaylight(ZoneNum)%ZonePowerReductionFactor = TotReduction

! IF(TotIllumMaps > 0 .and. .not. DoingSizing .and. .not. WarmupFlag .and. .not. KickoffSimulation) THEN
IF(TotIllumMaps > 0 .and. .not. DoingSizing .and. .not. WarmupFlag) THEN
! If an illuminance map is associated with this zone, generate the map
IF (TimeStep == 1) mapResultsToReport=.false.
Expand Down Expand Up @@ -7829,7 +7838,10 @@ SUBROUTINE DayltgInteriorMapIllum(ZoneNum)
! Initialize reference point illuminance and window background luminance

DO ILM=1,ZoneDaylight(ZoneNum)%MapCount

MapNum=ZoneDaylight(ZoneNum)%ZoneToMap(ILM)
! IllumMapCalc(MapNum)%DaylIllumAtMapPt = 0.0
! IllumMapCalc(MapNum)%GlareIndexAtMapPt = 0.0
NREFPT = IllumMapCalc(MapNum)%TotalMapRefPoints

DaylIllum = 0.
Expand Down Expand Up @@ -8156,7 +8168,7 @@ SUBROUTINE DayltgInteriorMapIllum(ZoneNum)

! Variables for reporting
DO IL = 1,NREFPT
IllumMapCalc(MapNum)%DaylIllumAtMapPt(IL) = DaylIllum(IL)
IllumMapCalc(MapNum)%DaylIllumAtMapPt(IL) = MAX(DaylIllum(IL),0.0d0)
IllumMapCalc(MapNum)%GlareIndexAtMapPt(IL) = GLRNDX(IL)
ENDDO
ENDDO
Expand Down
9 changes: 5 additions & 4 deletions SourceCode/EMSManager.f90
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,10 @@ SUBROUTINE GetEMSInput
CALL GetObjectDefMaxArgs(cCurrentModuleObject,TotalArgs,NumAlphas,NumNums)
MaxNumNumbers=MAX(MaxNumNumbers,NumNums)
MaxNumAlphas=MAX(MaxNumAlphas,NumAlphas)
cCurrentModuleObject = 'EnergyManagementSystem:Sensor'
CALL GetObjectDefMaxArgs(cCurrentModuleObject,TotalArgs,NumAlphas,NumNums)
MaxNumNumbers=MAX(MaxNumNumbers,NumNums)
MaxNumAlphas=MAX(MaxNumAlphas,NumAlphas)
! cCurrentModuleObject = 'EnergyManagementSystem:Sensor'
! CALL GetObjectDefMaxArgs(cCurrentModuleObject,TotalArgs,NumAlphas,NumNums)
! MaxNumNumbers=MAX(MaxNumNumbers,NumNums)
! MaxNumAlphas=MAX(MaxNumAlphas,NumAlphas)
cCurrentModuleObject = 'EnergyManagementSystem:GlobalVariable'
CALL GetObjectDefMaxArgs(cCurrentModuleObject,TotalArgs,NumAlphas,NumNums)
MaxNumNumbers=MAX(MaxNumNumbers,NumNums)
Expand Down Expand Up @@ -662,6 +662,7 @@ SUBROUTINE GetEMSInput
END IF
END IF

IF (cAlphaArgs(2) == '*') cAlphaArgs(2)=blank
Sensor(SensorNum)%UniqueKeyName = cAlphaArgs(2)
Sensor(SensorNum)%OutputVarName = cAlphaArgs(3)

Expand Down
Loading

0 comments on commit a3981b5

Please sign in to comment.