ladybug icon indicating copy to clipboard operation
ladybug copied to clipboard

Solar vector discrepancy

Open ParametricMonkey opened this issue 6 years ago • 5 comments

Further to this issue and the forum post, there appears to be a discrepancy between how Ladybug, Revit and NOAA calculate sun vectors.

In Revit you cannot specify a location by defining lat/long - you need to drag and drop a pin. So I am using the existing location in Revit to create a Ladybug location rather than trying to match an epw file.

1

Then I create views from the sun and enable the sun settings. As you can see, the altitude and azimuth of the sun vector is different.

2

3

I appreciate that this might be a rounding error, but it is enough to ‘see’ shadows when creating views from the sun.

4

Can this be fixed or are we dealing with rounding issues?

Attached files are Revit 2019 and Dynamo 2.0.3 with the latest Ladybug version (0.2.1?)

Ladybug issue.zip

ParametricMonkey avatar Oct 10 '19 01:10 ParametricMonkey

@ParametricMonkey , One suggestion I have is to use 2016 for the year in Revit instead of 2019. This is what ladybug is using under the hood: https://github.com/ladybug-tools/ladybug/blob/master/ladybug/dt.py#L37 If you still see shadows at that point, I have a feeling that it might well be a rounding error.

chriswmackey avatar Oct 10 '19 04:10 chriswmackey

@chriswmackey I updated the sun settings in Revit to use the year 2016. Didn't make a difference so I guess it is a rounding error. You don't happen to know which algorithm Revit is using under the hood to get its sun vectors?

ParametricMonkey avatar Oct 15 '19 00:10 ParametricMonkey

I can't say that I know anything about the Revit sun position algorithm. Maybe it's worth a post to one of the Autodesk forums?

chriswmackey avatar Oct 15 '19 15:10 chriswmackey

I think our approach should be to ensure ladybug calculation matches NREL's output.

@ParametricMonkey, back to Revit why don't you just Revit generated vectors as input for your study?

mostaphaRoudsari avatar Oct 15 '19 22:10 mostaphaRoudsari

I can verify with some recent tests that I did that the ladybug Sunpath is perfectly in line with the NOAA solar calculator when you ensure that the years are matching. It looks like Revit is still off from the NOAA calculator by a hundredth of a degree so I don't know if it's still going to give you visible shadows but it might be worth re-testing this after we merge in this PR: https://github.com/ladybug-tools/ladybug/pull/214

chriswmackey avatar Mar 18 '20 18:03 chriswmackey