NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.
https://energyplus.net
Other
1.14k stars 392 forks source link

Shading:Fin:Projection and Shading:Fin left and right fins produce the same azimuth angle #5550

Open rraustad opened 8 years ago

rraustad commented 8 years ago

Issue overview

The left and right fin shading surfaces have the same azimuth and can lead to inaccurate solar to the space if DoNotMirrorAttachedShade is used. DXF drawing shows the fin location and can be used to validate any corrective action. A simulation of DoNotMirrorAttachedShade compared to the original file should show similar results for Zone Exterior Windows Total Transmitted Beam/Diffuse Solar Radiation Rate.

Details

Some additional details for this issue (if relevant):

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

rraustad commented 8 years ago

A few issues were discovered while correcting the surface shape type for #5507. Pull request #5543 has the initial discussion.

Issue 1 - the surface shape type is set incorrectly for shape type = RectangularOverhang, RectangularLeftFin, and RectangularRightFin. This is due to the BaseSurfNum = 0 when ProcessSurfaceVertices is called. This can be corrected by looping through the surfaces and finding the base surface as was done with the SurfaceTmp array. This cannot be done where the SurfaceTmp array is set since the surfaces are re-ordered and the BaseSurfNum would point to the wrong base surface.

Line 1270 of SurfaceGeometry is one place this might be done as:

// find base surface for overhangs and fins
for ( SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum ) {
    if ( Surface( SurfNum ).Class != SurfaceClass_Shading ) continue;
    Surface( SurfNum ).BaseSurf = FindItemInList( Surface( SurfNum ).BaseSurfName, Surface, TotSurfaces );
}

Issue 2 - The azimuth for the left and right fins are the same. This is OK when mirrored surfaces are used, however, when DoNotMirrorAttachedShade is used, the results are different.

donotmirrorattachedshading

At line 5203 and 5299, the azimuth of the left and right fin are calculated using the same equation:

SurfaceTmp( SurfNum ).Azimuth = SurfaceTmp( Found ).Azimuth - ( 180.0 - rNumericArgs( 9 ) );

however, when changing this equation to yield the correct azimuth (Azimuth + (180-...)) the fin is rotated about the base surface so that the fin is inside the space.

Changing the azimuth equation also causes the shading surfaces to be different. Here's one example with V8.4 shown first:

==================================
Surface=ZN001:WALL001:SHADE003 Right is used as Receiving Surface in calculations and is convex.
Number of general casting surfaces=4
..Surface=ZN001:WALL001:WIN001:SHADE001
..Surface=Mir-ZN001:WALL001:SHADE003 Left
..Surface=ZN001:WALL001
..Surface=ZN003:WALL001
Number of back surfaces=0
Number of receiving sub surfaces=0
==================================

==================================
Surface=Mir-ZN001:WALL001:SHADE003 Right is used as Receiving Surface in calculations and is convex.
Number of general casting surfaces=2
..Surface=ZN001:WALL001:WIN001:SHADE001
..Surface=Mir-ZN001:WALL001:SHADE003 Left
Number of back surfaces=0
Number of receiving sub surfaces=0
==================================

flippedfin

This may be due to something in the calculation of vertices in MakeRelativeRectangularVertices.

rraustad commented 8 years ago

Note also that the IDD does not include DoNotMirrorAttachedShading although it is allowed in the simulation. See line 983 of SimulationManager.cc

Output:Diagnostics,
  \memo Special keys to produce certain warning messages or effect certain simulation characteristics.
A1 , \field Key 1
   \type choice
   \key DisplayAllWarnings
   \key DisplayExtraWarnings
   \key DisplayUnusedSchedules
   \key DisplayUnusedObjects
   \key DisplayAdvancedReportVariables
   \key DisplayZoneAirHeatBalanceOffBalance
   \key DoNotMirrorDetachedShading
   \key DisplayWeatherMissingDataWarnings
   \key ReportDuringWarmup
   \key ReportDetailedWarmupConvergence
   \key ReportDuringHVACSizingSimulation

DoNotMirrorAttachedShading added to IDD and I/O Ref in #5817.