Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Geometry Shading:Building Bug #242

Closed
mldichter opened this issue Sep 27, 2020 · 8 comments
Closed

Geometry Shading:Building Bug #242

mldichter opened this issue Sep 27, 2020 · 8 comments
Labels
OpenStudio SDK Issue An issue that is not related to OpenStudioApplication but to NREL/OpenStudio SDK Triage Issue needs to be assessed and labeled, further information on reported might be needed

Comments

@mldichter
Copy link

mldichter commented Sep 27, 2020

Issue overview

OpenStudio Application v1.0.0 Geometry tab does not render Shading:Building objects in the correct location. The Shading:Building object has been rotated while the building geometry has not. As stated in the Input Output Reference, this should never be the case.
shading site relative world

Current Behavior

Here is a screenshot of the Geometry tab for the below linked IDF.
OS geometry

Expected Behavior

Here is a screenshot of the DXF generated by EnergyPlus 9.3 for the below linked IDF.
dxf geometry

Steps to Reproduce

Link to modified Example File

  1. Start with Exercise1A.idf from the Example Files folder of EnergyPlus 9.3
  2. Add these two objects to the model
Shading:Site,
    Shading Site,            !- Name
    0,                       !- Azimuth Angle {deg}
    0,                       !- Tilt Angle {deg}
    0,                       !- Starting X Coordinate {m}
    0,                       !- Starting Y Coordinate {m}
    10,                      !- Starting Z Coordinate {m}
    7,                       !- Length {m}
    3;                       !- Height {m}

Shading:Building,
    Shading Building,        !- Name
    0,                       !- Azimuth Angle {deg}
    0,                       !- Tilt Angle {deg}
    0,                       !- Starting X Coordinate {m}
    0,                       !- Starting Y Coordinate {m}
    5,                       !- Starting Z Coordinate {m}
    7,                       !- Length {m}
    3;                       !- Height {m}
  1. Change the field of the following object
  Building,
    Exercise 1A,             !- Name
    20,                     !- North Axis {deg}
  1. Simulate the IDF and view the DXF generated for the building geometry

Possible Solution

Work with EnergyPlus developers to verify consistent agreement between source code and documentation across all IDF geometry viewers. Link to EnergyPlus github issue.

Details

Environment

  • Platform (Operating system, version): Windows 10
  • Version of OpenStudio Application (if using an intermediate build, include SHA): v1.0.0

Context

Shading:Building objects displayed in the OpenStudio Geometry tab are inconsistent with the modeled position of Shading:Building objects in EnergyPlus, which has drastically changed results of PV systems referencing the Shading:Building objects.

@mldichter mldichter added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label Sep 27, 2020
@macumber
Copy link
Collaborator

Thanks @mldichter , would you be able to check if this issue is fixed in this release preview: https://github.com/openstudiocoalition/OpenStudioApplication/releases/tag/v1.0.1

We fixed #214 which I think was the same issue as this

@mldichter
Copy link
Author

Looks like the bug is still there.
shading bug v1 0 1

The rotation specified in

Building,
    20,                      !- North Axis {deg}

is being applied to the Shading:Building object even though

GlobalGeometryRules,
    World;                   !- Coordinate System

and the North Axis field should be ignored. You can also see the orange North line 20 degrees to the left of the green y-axis line. But the building hasn't rotated, which is correct.

@macumber
Copy link
Collaborator

Thanks for checking. I looked into it further and agree that there could be a misunderstanding of these objects in the OpenStudio translation from IDF to OSM here: https://github.com/NREL/OpenStudio/blob/e42fde8aa21cf78bc8d961dcbc8480448f50e102/src/energyplus/GeometryTranslator.cpp#L414

@mldichter
Copy link
Author

Looks like the GlobalGeometryRules doesn't translate from IDF to OSM. I imported the IDF into OpenStudio Application v1.0.1 and found these. These are the World coordinates case.

OS:Building,
  {51e37a02-2c98-40bf-94da-e8fb2a5f1760}, !- Handle
  Exercise 1A,                            !- Name
  ,                                       !- Building Sector Type
  20,                                     !- North Axis {deg}
  ,                                       !- Nominal Floor to Floor Height {m}
  ,                                       !- Space Type Name
  ,                                       !- Default Construction Set Name
  ;                                       !- Default Schedule Set Name

OS:Space,
  {06e7ded6-5ecc-481a-9f48-6f6d6b620760}, !- Handle
  ZONE ONE,                               !- Name
  ,                                       !- Space Type Name
  ,                                       !- Default Construction Set Name
  ,                                       !- Default Schedule Set Name
  0,                                      !- Direction of Relative North {deg}
  0,                                      !- X Origin {m}
  0,                                      !- Y Origin {m}
  0,                                      !- Z Origin {m}
  ,                                       !- Building Story Name
  {9570a3a9-8543-4371-80f9-b27feb1f5d85}; !- Thermal Zone Name

OS:ShadingSurface,
  {7045a3b3-1796-446a-930e-a27eb0b64200}, !- Handle
  Shading Site,                           !- Name
  ,                                       !- Construction Name
  {392e581a-420a-40b9-a211-b71630583ec6}, !- Shading Surface Group Name
  ,                                       !- Transmittance Schedule Name
  ,                                       !- Number of Vertices
  0, -3, 10,                              !- X,Y,Z Vertex 1 {m}
  0, 0, 10,                               !- X,Y,Z Vertex 2 {m}
  -7, 0, 10,                              !- X,Y,Z Vertex 3 {m}
  -7, -3, 10;                             !- X,Y,Z Vertex 4 {m}

OS:ShadingSurface,
  {7b35aaf0-6032-4307-bf5f-9bcc34d7f91f}, !- Handle
  Shading Building,                       !- Name
  ,                                       !- Construction Name
  {e5b793c9-82a7-4dbe-8184-78dfd7e69007}, !- Shading Surface Group Name
  ,                                       !- Transmittance Schedule Name
  ,                                       !- Number of Vertices
  0, -3, 5,                               !- X,Y,Z Vertex 1 {m}
  0, 0, 5,                                !- X,Y,Z Vertex 2 {m}
  -7, 0, 5,                               !- X,Y,Z Vertex 3 {m}
  -7, -3, 5;                              !- X,Y,Z Vertex 4 {m}

I didn't find an equivalent OSM object for the GlobalGeometryRules IDF object.

With Relative coordinates, those four OSM objects are the same. The difference is in the building surfaces.

World

OS:Surface,
  {4636ed9d-5356-4a42-aeb5-67f732bdcd22}, !- Handle
  ZONE SURFACE FLOOR,                     !- Name
  Floor,                                  !- Surface Type
  {b70a7336-d0dc-47c5-9869-8d243a4429a8}, !- Construction Name
  {06e7ded6-5ecc-481a-9f48-6f6d6b620760}, !- Space Name
  Ground,                                 !- Outside Boundary Condition
  ,                                       !- Outside Boundary Condition Object
  NoSun,                                  !- Sun Exposure
  NoWind,                                 !- Wind Exposure
  0,                                      !- View Factor to Ground
  ,                                       !- Number of Vertices
  5.46542010633326, 8.3743168713208, 0,   !- X,Y,Z Vertex 1 {m}
  7.51754096628727, 2.73616114660535, 0,  !- X,Y,Z Vertex 2 {m}
  0, 0, 0,                                !- X,Y,Z Vertex 3 {m}
  -2.05212085995401, 5.63815572471545, 0; !- X,Y,Z Vertex 4 {m}

Relative

OS:Surface,
  {d7f9e9be-d2d7-4f74-b82f-94686de97f0c}, !- Handle
  ZONE SURFACE FLOOR,                     !- Name
  Floor,                                  !- Surface Type
  {5c6c3c84-448f-4336-91dc-9bd2142827f9}, !- Construction Name
  {91379494-d4b7-4608-a091-8954b18bfa5e}, !- Space Name
  Ground,                                 !- Outside Boundary Condition
  ,                                       !- Outside Boundary Condition Object
  NoSun,                                  !- Sun Exposure
  NoWind,                                 !- Wind Exposure
  0,                                      !- View Factor to Ground
  ,                                       !- Number of Vertices
  8, 6, 0,                                !- X,Y,Z Vertex 1 {m}
  8, 0, 0,                                !- X,Y,Z Vertex 2 {m}
  0, 0, 0,                                !- X,Y,Z Vertex 3 {m}
  0, 6, 0;                                !- X,Y,Z Vertex 4 {m}

Looks like the building surfaces are being pre-rotated, then the OS:Building North Axis {deg} field is being used to rotate axes and the

OS:ShadingSurfaceGroup,
  {93622d36-2d53-48b3-acdf-fc2c9141d9f3}, !- Handle
  Shading Surface Group 1,                !- Name
  Site;                                   !- Shading Surface Type

OS:ShadingSurfaceGroup,
  {cb7992b0-d6f1-4739-a737-df28842df57a}, !- Handle
  Shading Surface Group 2,                !- Name
  Building;                               !- Shading Surface Type

control which shading objects are being rotated based on the Shading Surface Type, maybe?... It's getting a little confusing.

The OpenStudio Geometry tab doesn't have enough information in the OSM on whether or not to rotate the Shading:Building objects. You could fix the problem by having the IDF import pre-rotate the Shading object vertices based on the GlobalGeometryRules IDF object, but then OpenStudio further ingrains this hybrid of rotating some objects based on the OS:Building fields and relying on pre-rotating other objects on IDF import.

@mldichter
Copy link
Author

There is also

OS:Space,
  0,                                      !- Direction of Relative North {deg}

which was 0 in the World and Relative cases since the building surface vertices were pre-rotated. I changed the value in the OSM with a text editor and the OSM field does indeed rotate the zone.

@jmarrec
Copy link
Collaborator

jmarrec commented Oct 6, 2020

Seems like this is an OpenStudio SDK issue no? @macumber

@jmarrec jmarrec added the OpenStudio SDK Issue An issue that is not related to OpenStudioApplication but to NREL/OpenStudio SDK label Oct 6, 2020
@macumber
Copy link
Collaborator

macumber commented Oct 7, 2020

OpenStudio purposefully has only one way to define coordinate systems. Allowing multiple definitions in IDF was a choice made to support users when they were entering coordinates one by one in text, it's not as useful anymore.

I agree this is an OpenStudio SDK bug in the import of Shading:Building and Shading:Site objects from IDF. Filed here: NREL/OpenStudio#4111

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 8, 2021

Will be fixed in NREL/OpenStudio#4235

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
OpenStudio SDK Issue An issue that is not related to OpenStudioApplication but to NREL/OpenStudio SDK Triage Issue needs to be assessed and labeled, further information on reported might be needed
Projects
None yet
Development

No branches or pull requests

3 participants