Grasshopper

algorithmic modeling for Rhino

Hi Mostapha, Chris and Abram

Having read Kimia's comment, I made a new potential component that finds sunrise, sunset for anyplace on earth using equations from Astronomical Algorithms, by Jean Meeus.
Besides these two output, it calculates the solar position (elevation angle and azimut) considering the atmospheric refraction.
I saw the difference between solInitOutput (based on Radiance) and the script that I wrote (based on NOAA). Some formulas are the same, while others are different. for example "Julian day", "solar altitude"..
Anyway, they are two different models.
At the moment the imputs are:
1) location
2) analysis period
3) year
and the outputs are:
1) civil twilight
2) official sunrise/sunset
3) solar elevation angle
4) solar azimut
This is an example where I used data of a real place.

and these are two photos that I took in this place.

SUNRISE (Civil Twilight) 06:44 AM

SUNRISE (Official) 07:14 AM
Note that in the first photo the street lights are on, while in the second are off because of the good level of luminous energy.
I hope that it could be useful.


Bests
Antonello

Views: 2679

Attachments:

Replies are closed for this discussion.

Replies to This Discussion

Cool, are you going to put it on github?

Hi Anton

Certainly! Thank you! The good thing is that you can change the year from -1000 to 3000.
I was thinking to use some outputs of it to make artificial light schedules for Honeybee. But I don't know if it is a good idea. What do you think about?

Bests
Antonello

This is nice Antonello.

Can you elaborate what is the additional value from this component comparing with the LB_sunpath? I'm curious about the light schedules you mention.

-A.

Antonello,
This component should definitely be integrated into the code base and you should feel free to send a pull request when you get the chance. I think it might be better to have this component as separate from the sunpath as the sunrise/sunset is at a higher temporal resolution than the typical hourly logic of the sunpath. If anyone has an argument to the contrary, please post here.

Along the lines of what Abrahm mentions, the current sunpath code is the same as the NOAA code and we verified it in this old github issue:

https://github.com/mostaphaRoudsari/ladybug/issues/73
I know that the comments around the solinitoutput code say that the code is from the radiance sunpath but this is outdated and we should erase that comment. Accordingly, it would be great, Antonello, if your component could reference this NOAA function in Ladybug_Ladybug if it is possible. This way, we can avoid having several copies of the same code and together improve the same sunpath function instead of separate incompatible copies.

Also, I should note that the LB_LB NOAA function has an input for "year" but we always set this to the current year as the solar position is fairly constant from year to year and we have yet to encounter someone wanting to see the sun position a millenuim I to the future/past.

-Chris

Chris and Abraham,

Thank you for your reply. I have to do the latest checks so I can send my pull request.

I have made other two component, I have studied a method to make HB schedules faster than the actual method.

Below, I descibe how they work:

1) drag "scheduleDay" onto the canvas

2) drag some Gene Pool lists onto the canvas and connect a number slider - from 0 to 3.

3) connect the Gene Pool list to _genePool input. The component change some important features of the Gene Pool list automatically. Now you have LB_GenePool!!

4) choose the template that it's suitable for you.

5) disconnect LB_GenePool and if templates are not good, you can change them manually

6) drag "Ladybug annual schedule" onto the canvas

7) Connect LB_GenePools to inputs for the days of the week, Epw file and if you want to "_holiday" (in this way you consider holidays). Now you have your simple schedule.

8) a small workflow to visualize it into Rhino..

9) Connect "Ladybug annual schedule" to "Honeybee_Create CSV Schedule" to make your csv Schedule

You could make a schedule more complex than the one in the example above.

You can do that with _analysisPeriod input.

Bests

Antonello

Hi Antonello,

Looks very nice. Like to test myself.

Thanks,

-A.

Hi Abraham

Thanks! It works well, but I have to improve the first component, as I wrote to Mostapha.

Bests
Antonello

Hi Antonello,

I see that  the components are already in the github. Thanks and good work.

Just a small remark: aren't they supposed to be in the HB tab instead of LB?

And one suggestion: i would add in the DailySchedule component a couple of inputs more with minimum/maximum values of the schedule since not all of them are in the 0-1 range.

-A.

you're welcome Abraham,


some changes are necessary:
1) move the components to HB, as you and Chris suggest me
2) do a small reseach about holidays and find a system to change them based on country. It's almost impossible do that for each country. I have to make a couple of avarage-holidays data.
3) Optimize two components, perhaps combine the their functionality into one component.
4) Maybe, insert a "shift function". For example I want my schedules start with Monday, or Tuesday and so on.

Bests
Antonello

Thanks for your suggestion,

I'm going to make all changes as soon as possible.
Meanwhile, here for you an example to understand how it works.

Bests

Antonello

Attachments:

Thanks Antonello for creating this component. It's great! I have a small suggestion for the component inputs. I suggest to change the input from AnalysisPeriod to DOYs. User can input values between 1-356. In this case user can match the number of inputs for days to number of output values. As you probably know Ladybug has a component to calculate DOY for any date.

Hi Mostapha

Thanks for your reply! I put _HOY input instead _Analysis period. Please, let me know if it is better than the old one.

It is possible to do analysis in different ways, as you can see on images below:

I had seen the problem of the leap year and I wrote this piece of script:

if (year_ % 4 == 0 and year_ %100 != 0) or year_ %400 == 0:

.......

........

But, then I didn't write it inside LB_infoSun because EnergyPlus doesn't use leap years, is it right?

About the other two components, is it possible to move this discussion to github?

I need to improve the "scheduleDay" component and I need some help to arrange template schedules. Thanks.

Bests

Antonello

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2021   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service