Closed eringold closed 4 years ago
Another potential issue:
This is converting rad to deg. But isn't primaryDaylightingControl->thetaRotationAroundYAxis()
already in degrees?
@eringold @joseph-robertson
I am not certain the proposed fix is correct. These are Euler angles. Note that I haven't checked in Sketchup so I could be wrong (I'll try to boot windows later)
Perhaps it should actually be phiRotationAroundZAxis
- 90°?
Here's a superb Pinta (opensource linux paint) drawing, in red is what I think OpenStudio does (Phi), and in Blue (Phi') is what I think EnergyPlus might be looking for:
@jmarrec This is what Sketchup shows for a Theta rotation - the daylight object is rotated in the XZ plane, about the Y axis:
My interpretation of the relevant EnergyPlus input is that it should receive what Sketchup shows as the Phi rotation - in the XY plane, about the Z axis:
Cool, thanks!
Where did we land on this?
@jmarrec
@joseph-robertson I don't know where @macumber 's comments went, but I have a trace in my email client, and he confirmed that your fix is good and so did @eringold. So I'm good with that. I approved the PR (which I cannot merge).
OpenStudio only translates the OS:Daylighting:Control input 'theta rotation around the Y-Axis' (the other rotations are ignored), and sets that value to the Daylighting:ReferencePoint input "Glare Calculation Azimuth Angle of View Direction Clockwise from Zone y-Axis". This happens here: https://github.com/NREL/OpenStudio/blob/develop/openstudiocore/src/energyplus/ForwardTranslator/ForwardTranslateThermalZone.cpp#L457-L469
In OpenStudio, 'rotation around the Y-axis' (the zone north axis) is rotation in the vertical plane. This can be seen in Sketchup if you place a daylighting control object and change the theta value. The expected Daylighting:ReferencePoint EnergyPlus input, however, is "the angle, measured clockwise in the horizontal plane, between the zone y-axis and the occupant view direction." (ref: https://bigladdersoftware.com/epx/docs/8-9/input-output-reference/group-daylighting.html#field-glare-calculation-azimuth-angle-of-view-direction-clockwise-from-zone-y-axis).
In aircraft terms, for a body facing north, EnergyPlus is expecting the yaw angle, but OpenStudio is translating the roll angle.
To reflect the expected input, OpenStudio should be translating the phiRotationAroundZAxis value.