ladybug-tools / ladybug-legacy

:beetle: Ladybug is an environmental plugin for Grasshopper.
http://ladybug.tools
Other
194 stars 82 forks source link

Plot data by month #68

Closed ayezioro closed 10 years ago

ayezioro commented 10 years ago

Hi Mostapha and Chris, I'm trying to plot climatic data by month, but i'm getting at the output something like "IronPython.Runtime.List". I know that those lists are ok but they don't show the circles for the months. Connecting a Geometry component to the output i get a "1. Data conversion failed 'from Goo to Geometry" error. Having the point as only one full list works fine. I'm collecting the points for the months at line 142. At line 106 i'm appending all points into one list. Can you shed some light on this? The file can be downloaded at https://www.dropbox.com/s/y2anz569lhaauho/CircleByMonth.gh Thanks, -A.

mostaphaRoudsari commented 10 years ago

Hi @ayezioro, Good to see you here. You are right. They are lists of lists and Grasshopper outputs are not capable of serializing lists of lists. There are two solutions for that:

  1. Flatten the data. You can put all the data in a single list if that is fine.Ladybug Preparation class has a method that can help you with that. Here is an example: https://github.com/mostaphaRoudsari/ladybug/blob/28dfb647e6f27d723f92cf83d77e4ec4b677edbc/src/Ladybug_View%20Analysis.py#L120
  2. Graft the data in branches. This probably fits your purpose the best. You need to iterate through the list and put them in different branches. Here is an example: https://github.com/mostaphaRoudsari/ladybug/blob/aa12a1e16555d9c2c149c84c8cf82da4088efd44/src/Ladybug_3D%20Chart.py#L645-L663
ayezioro commented 10 years ago

Hi Mostapha, Thanks. You throw me into deep water here :) The first option (Flatten) is not needed. I have already all of the circles plotted fine (the whole year). So I went with the second (List to Tree), which I also found something in the forum. I (think) manage to get the tree for each list. It took me a while to understand why the month plot showed only 12 points, until I tried the FlipMatrix component. Then it worked “well”. If you can, please look at the routine raggedListToDataTree and see if you see something suspicious. Or have any suggestions to improve performance.

-A.

mostaphaRoudsari commented 10 years ago

@ayezioro it looks all good. Your data tree looks good. The only thing that you need to do is to use a Tree Branch instead of item selector and then you will see what you are looking for. My only question is about the point that 0,0 is. Looks like X and Y axis are inverted. I also suggest you to check the trick that @chriswmackey is using to "Color Zones by EP results". It will let you to feel the points with transparent colors. chart

chriswmackey commented 10 years ago

It looks awesome, Abraham!

That trick would be in the images below. I just output the colors with some transparency next to the Rhino geometry (in your case, it would be the circles).

On Tue, Jul 8, 2014 at 11:03 PM, Mostapha Sadeghipour Roudsari < notifications@github.com> wrote:

@ayezioro https://github.com/ayezioro it looks all good. Your data tree looks good. The only thing that you need to do is to use a Tree Branch instead of item selector and then you will see what you are looking for. My only question is about the point that 0,0 is. Looks like X and Y axis are inverted. I also suggest you to check the trick that @chriswmackey https://github.com/chriswmackey is using to "Color Zones by EP results". It will let you to feel the points with transparent colors. [image: chart] https://cloud.githubusercontent.com/assets/2915573/3519384/9032cbe2-0715-11e4-9ae6-f906bbc51d3e.png

— Reply to this email directly or view it on GitHub https://github.com/mostaphaRoudsari/ladybug/issues/68#issuecomment-48424923 .

ayezioro commented 10 years ago

Hi Chris, There were supposed to be some images in your message? They don't show ... The last version can be downloaded from https://www.dropbox.com/s/ntqwxw0abmcsyry/bioclimatic_chart_Strategies_10.gh I've plenty of ideas to implement here. I'll need to write text in the screen. Any pointers: More than welcome. Thanks, -A.

chriswmackey commented 10 years ago

Hi Abraham,

Here are my comments:

  1. I realized that we can get the frequency mesh to be generated really fast just by using < and > statements. I have re-written the function that does this inside the create mesh function. You can see it in the attached file. I know that it's not the most elegantly looking thing but it's SOO much faster.
  2. We are going to have to extend the range of the frequency mesh eventually as climates like New York's are falling off of the chart right now (see first attached image).
  3. I think we should try to coordinate the strategies that work for the Bioclimactic chart and the psych char that I am currently coding. In the attached GH file, there is a value list that I think we should just make a standard Ladybug component for inputting passive strategies. I looked through the climate consultant polygons on the psych chart (see attached 2nd image) and I don't think that we need to do all of them but I do think that we should add to our current list of 4 strategies the following: internal heat gain (in order to distinguish this from passive solar) and just humidifcation/ just dehumidifcation. Let me know what you think about including these as polygons on the chart.
  4. I added a suggested output of colors for the circles. If you get the month colors to come out here, we wouldn't need to generate the colored diamond-shaped meshes and we can get rid of that boolean option on the inputs.

-Chris

On Wed, Jul 9, 2014 at 6:47 AM, ayezioro notifications@github.com wrote:

Hi Chris, There were supposed to be some images in your message? They don't show ... The last version can be downloaded from https://www.dropbox.com/s/ntqwxw0abmcsyry/bioclimatic_chart_Strategies_10.gh I've plenty of ideas to implement here. I'll need to write text in the screen. Any pointers: More than welcome. Thanks, -A.

— Reply to this email directly or view it on GitHub https://github.com/mostaphaRoudsari/ladybug/issues/68#issuecomment-48455129 .

chriswmackey commented 10 years ago

Woops. I forgot to attach the GH file.

On Wed, Jul 9, 2014 at 3:33 PM, Chris Mackey chris@mackeyarchitecture.com wrote:

Hi Abraham,

Here are my comments:

  1. I realized that we can get the frequency mesh to be generated really fast just by using < and > statements. I have re-written the function that does this inside the create mesh function. You can see it in the attached file. I know that it's not the most elegantly looking thing but it's SOO much faster.
  2. We are going to have to extend the range of the frequency mesh eventually as climates like New York's are falling off of the chart right now (see first attached image).
  3. I think we should try to coordinate the strategies that work for the Bioclimactic chart and the psych char that I am currently coding. In the attached GH file, there is a value list that I think we should just make a standard Ladybug component for inputting passive strategies. I looked through the climate consultant polygons on the psych chart (see attached 2nd image) and I don't think that we need to do all of them but I do think that we should add to our current list of 4 strategies the following: internal heat gain (in order to distinguish this from passive solar) and just humidifcation/ just dehumidifcation. Let me know what you think about including these as polygons on the chart.
  4. I added a suggested output of colors for the circles. If you get the month colors to come out here, we wouldn't need to generate the colored diamond-shaped meshes and we can get rid of that boolean option on the inputs.

-Chris

On Wed, Jul 9, 2014 at 6:47 AM, ayezioro notifications@github.com wrote:

Hi Chris, There were supposed to be some images in your message? They don't show ... The last version can be downloaded from https://www.dropbox.com/s/ntqwxw0abmcsyry/bioclimatic_chart_Strategies_10.gh I've plenty of ideas to implement here. I'll need to write text in the screen. Any pointers: More than welcome. Thanks, -A.

— Reply to this email directly or view it on GitHub https://github.com/mostaphaRoudsari/ladybug/issues/68#issuecomment-48455129 .

mostaphaRoudsari commented 10 years ago

@chriswmackey you can't send attached file with email to github! You need to send a link. Also for the images you need to come to github and upload it here.

chriswmackey commented 10 years ago

Ah. Thank you, Mostapha. I forgot that I was on a github thread.

On Wed, Jul 9, 2014 at 3:42 PM, Mostapha Sadeghipour Roudsari < notifications@github.com> wrote:

@chriswmackey https://github.com/chriswmackey you can't send attached file with email to github! You need to send a link. Also for the images you need to come to github and upload it here.

— Reply to this email directly or view it on GitHub https://github.com/mostaphaRoudsari/ladybug/issues/68#issuecomment-48524315 .

chriswmackey commented 10 years ago

Here are the images bioclimactic chart for nyc climate consultant polygons

chriswmackey commented 10 years ago

And here is a link to the GH file. https://www.dropbox.com/s/v0xq9zhnviozsx2/bioclimatic_chart_Strategies_10_CWM.gh

ayezioro commented 10 years ago

Hi Chris, Check the last version: https://www.dropbox.com/s/kocnzp5h90ka5pg/bioclimatic_chart_Strategies_11.gh Now you can plot colored points by month. Still have the input boolean since i'm not sure colors are fast enough. You tell me ... Also added a check for negative temperatures. In such cases the grid is extended to fit. The issue is with the colored mesh. You tailored it to specific ranges, starting from 0. Now, when you don't know what the minimal temperature will be, what you suggest to approach this? I'm thinking in all other points you suggested and i think it will be fine to implement them. I will send tomorrow (hope so) a sketch of some of the results i want to show and how. So far i have totals for each strategy. I want to calculate the same for each month. So far, so good ...? -A.

mostaphaRoudsari commented 10 years ago

Hi @ayezioro, This is sooo cool! I can see how powerful this tool can be. I have couple of suggestions and a questions.

First the question: What is the chart mesh?

Suggestions:

  1. Is it possible to use Ladybug standard analysisPeriod component for summer and winterAnalysisPeriod inputs? I assume you can do the conversion from an standard input to the string that you are using as the input.
  2. How can we expose your assumptions for the strategies to the user and let them change it in case they want to? I think that will change the component to a very strong teaching/learning tool.

Thanks and welcome to the development team! :)

ayezioro commented 10 years ago

Thanks Mostapha (so weird you call me @ayezioro), The chart mesh shows the amount of points that fell inside, so you can get an idea where most of them are. There is a need to have a legend for this. As for your suggestions:

  1. Indeed. I'll try to get there tomorrow. We were discussing with Chris having 4 inputs, as per seasons .. let's see.
  2. Not sure i get the question. What do you mean by assumptions and changing them? Can be the MET and CLO levels? If so, definitely they can be changed, even today.

I still owe to send the "road map" for the outputs i want to show. Any pointers to addapt the legend will be welcomed. Also to just write some text will be appreciated (for instance the grid values for humidity and temperature). Thanks again to you and to Chris, -A.

mostaphaRoudsari commented 10 years ago

Hi Abraham,

I use @ayezioro as you can set up the setting to be only notified if someone mention you in the discussion. Also it will let you to filter the issues and find the ones that you are mentioned in! I will both after this. ;)

Thanks. That makes sense.

  1. Done!
  2. For example as the user I have no idea what are your assumption to decide the effectiveness of Natural Ventilation. I would like to be able to now what are your assumptions and then ideally being able to change them.
  3. I have a new wish. I want to be able to color the points based on other hourly data, and also apply conditional statement (similar to sunpath). For example I want to color them based on wind speed and wind direction so I can see what is the range of wind speed for the hours that natural ventilation is effective, and where they are coming from. I know this might be a little bit challenging so you can consider this for next version of the component.
  4. As item 3 may take a long time to be applied it would be great to output the HOY when each technique is effective (so it is not only a percentage) so I can take care of number see myself by analyzing data.
  5. I don't want you stop the development so I leave this for later ;)

For lines and text you can check multiple components but I think the most recent one is what Chris added to 3D Chart. There are some methods in Ladybug to help make it easier but for some reason Chris copy-pasted the function into the component. Nevertheless you can see the process there. Here is 3DChart: https://github.com/mostaphaRoudsari/ladybug/blob/master/src/Ladybug_3D%20Chart.py#L238-L327

I think I should write some clean functions to make this easier.

ayezioro commented 10 years ago

Chris: Can you draw the limits of the humidification and dehumidification areas? My eyes are not good enough to see the difference. Or there is something i don't get? Mostapha: for your point 3 above i have already identified for each hour what strategy (or strategies) fell in there. I'm trying to think how to show and differentiate those hours having more than one strategy. If any of you have any suggestion ... please do. -A.

ayezioro commented 10 years ago

OK. I get the Humid/Dehumid. I'll try to use the ASHRAE HoF Comfort Model up through 2005. The standard 55 is more dedicated to HVAC conditions and the Humidify is always 0 (the comfort area extends to 0 % RH). -A.

chriswmackey commented 10 years ago

Hey Guys,

I'm sorry that I was out of the discussion for a couple of days. As you may have guessed, I spent most of it pulling together the psychrometric chart and this has made me much more knowledgeable on the stuff that you are going through, Abraham, while making the bioclimatic chart. Hopefully some of the code that I wrote for the psych chart is relevant to you and you can copy/paste some stuff. To go down the list of your comments, Mostapha:

  1. My description for the psych chart is already 3 paragraphs long and there isn't much room to fit the assumptions of the strategies. In my case, they are all the same as Climate Consultant's defaults and I do mention this fact in the description. However, I don't give detailed numbers and climate consultant lets you change these default numbers so it would be cool if we described them and allowed users to change them in our workflow. This would require a new component for setting up the strategies since the psych chart now is about the size of the sunpath and I think that the biochart is going to be big too. I'm not sure what this strategy component will look like but we should coordinate, Abraham, and we should discuss it here before making it. I'll start by writing out the assumptions of the psych chart polygons at the end of this email and then we can discuss what we might like to change about them.
  2. Mostapha, I knew that you were going to request this as soon as I put the psych chart out. It makes sense since all of the other LB components have this and it would be easy to implement since you already wrote most of the functions for it. This does mean that the psych chart is going to get pretty humungous with two extra inputs for annualHourlyData and conditional statement but we can probably do that without reaching Mr. Comfy's level of size and confusingness. Still, if you have recommendations for inputs that I could consolidate, please pass them along. Abraham, most of the functions to do this are in Ladybug_Ladybug (like the functions that I showed you to color the mesh) and you can copy the code to summon these functions from the LB_3D Chart or from the psych chart once I add in this capability.
  3. HOY output is really easy since we are already making the "comfortOrNot" and "strategyOrNot" outputs. Come to think of it, you can use this stream of boolean values to select out data for the strategies and I like it because you can also plot it on the 3D chart and see when a certain strategy is applicable (unlike the HOY). Abraham, I think that this is what you are asking in your second-to-last email. What do you think, Mostapha? Should we make both a "comfortOrNot" and "comfortHOY" output or is it redundant?
  4. I copy/pasted the tex2srf function from LB_LB into the 3D chart because the one in Ladybug_Ladybug did not let me change the text height and I thought that this was important to distinguish axis labels from the chart title. I considered editing the function in LB_LB but I wasn't sure how many components rely on it and I didn't want to mess everything up. Mostapha, if you can tell me why the function auto-sets font size and font, I can consolidate the code. In the meantime, Abraham, feel free to have a look at how it's applied.
  5. You can see what I mean by "humidification only" and "dehumidification only" if you hook up those strategies to my psych chart. For you, it would just be those areas immediately to the left and the right of your comfort polygon, where you only need to change the humidity and not the temperature.
  6. Abraham, you will notice that the current strategy list component that I just uploaded does not have passive solar and I did this because I realized that recommendations for passive solar really should include some analysis of radiation (this is what climate consultant does). However, for "internal heat gain" all that you need is an assumed building balance point and I think that this better describes what you are doing with your "Passive Solar" polygon. Let me know what your thoughts are on possibly changing the name of your polygon and leaving a passive solar polygon to include radiation. I have an idea for how to do this if the user hooks up radiation to a future "annualHourlyData" input.

I look forward to hearing your thoughts and find the strategy polygon assumptions below. -Chris

Evaporative Cooling - The polygon represents the conditions under which direct evaporative cooling would be helpful. As such, it takes as its upper limit the line of constant enthalpy from the edge of the comfort polygon and includes all warm temperatures below it. If the user has set a minimum humidity tolerance, the polygon will also grab the points beneath the comfort polygon it is assumed that the evaporation of water will both humidify and cool the air. The polygon would be slightly different for 2-stage evaporative cooling and we may be able to implement this in the future.

Thermal Mass + Night Flush - The polygon represents the conditions under which shaded thermal mass can keep occupants cool, which has no theoretical limit in terms of temperature since, arguably, you can keep going further underground until it gets cooler like they do in Coober Peedy, Australia ( http://video.nationalgeographic.com/video/australia_cooberpedy). However, it is limited in terms of humidity in that it obeys any limits on absolute humidity set by the user and will not include any conditions that are more humid than the comfort polygon.

Natural Ventilation - The polygon is made by assuming that a wind speed of 1.5 m/s is the maximum speed tolerable before it becomes annoying to users and runs a PMV model with this wind speed and the input conditions. This then defines the right-most boundary of the polygon. The left-most boundary is the same as that of the comfort polygon and the top and bottom boundaries are set by the max and min humidity input by the user or the maximum humidity of the comfort polygon.

Internal Heat Gain - The component assumes a minimum building balance point of 12.8 C and any conditions that are warmer than that (up to the comfort polygon) will keep occupants comfortable. Climate consultant allows you to change this balance point if you so desire and I feel that we should allow it too.

Humidification Only - This is only relevant if the user has set a minimum acceptable humidity and includes the area directly underneath the comfort polygon.

Dehumidification Only - This is only relevant if the user has set a maximum acceptable humidity and includes the area directly above the comfort polygon.

On Mon, Jul 14, 2014 at 1:36 AM, ayezioro notifications@github.com wrote:

OK. I get the Humid/Dehumid. I'll try to use the ASHRAE HoF Comfort Model up through 2005. The standard 55 is more dedicated to HVAC conditions and the Humidify is always 0 (the comfort area extends to 0 % RH). -A.

— Reply to this email directly or view it on GitHub https://github.com/mostaphaRoudsari/ladybug/issues/68#issuecomment-48866875 .

mostaphaRoudsari commented 10 years ago

Hi Chris,

  1. Let me check your component first and then I will update this issue. I assume it will be something similar to other XXXParameters components.
  2. For this one again I need to check the component but I think this will change the component from a visualization tool to an analysis tool.
  3. Great! That should be good enough for now.
  4. You can add the input that the function lacking with an extra input at the end of the function with default value. Look for the keyword Overload. In case of text2srf it is already written like that and has textHeight as an input: https://github.com/mostaphaRoudsari/ladybug/blob/master/src/ladybug_ladybug.py#L1823

Generally speaking I think we shouldn't copy paste functions. If there is a function that will be used in more than one component let's copy it to Ladybug_Ladybug and call it from there so we don't end up having very similar functions in several components. It would be great if you can move the functions that are going to be useful for Abraham to Ladybug_ladybug.

mostaphaRoudsari commented 10 years ago

Hi Abraham, I have been thinking about this for awhile, and I really don't know the answer. Maybe they should be color coded differently or should have a different shape. I was thinking that there should be a percentage indicator like a bar graph for each strategy and then the part which is shared with other strategies can be identified with a separate color.

mostaphaRoudsari commented 10 years ago

Chirs, Back to natural ventilation does the component only checks for the wind speed? I can argue that putting a maximum values of 1.5 is not the best way to tell the designers about the potentials. In many cases there are design solutions to control the wind speed.

I should also add that I'm so happy that you didn't apply to passive solar without checking radiation. What is stopping you from getting the radiation values?

chriswmackey commented 10 years ago

Mostapha, here are my thoughts:

  1. Ok. I'm cool with moving it around in the tabs and I just put it next to the 3D chart now because it is also a chart.
  2. Conditional statement is now on my to-do list.
  3. Oh man, I feel so dumb. I just misunderstood what that notation of 'font = "Verdana"' meant in the function definition. It just means that you don't have to send the function a font if you do not want to. I just went through and replaced all of the situations where I copy-pasted this function into my components. Luckily, it's only in 3 components and this was the only time I copy-pasted from LB_LB. However, I did copy-paste something from the sunpath once and I also just moved this function to LB_LB to. I will try to be better about this and not copy-paste stuff in the future and, if I realize that a function is particularly useful to Abraham, I will put it there.

....

  1. I think coloring points based on other annualHourlyData could be cool. What if the "colored mesh" is, by default, an indicator of the frequency of certain conditions but, if a user hooks up annualHourlyData, the mesh switches to be a bunch of colored points? A bar graph for strategies sounds cool. I really don't know if it's a good idea to use color for the strategies, though, if we already use it for frequency and for annualHourlyData. What if we tried outlining the strategies and the bars of the future graph with different line weights instead?
  2. I guess the strategy name for this polygon would be better termed "Occupant Use of Fans" rather than "Natural Ventilation" (Climate consultant is really being misleading by calling this polygon "Natural Ventilation"). The reality of an analysis like this is that it assumes that your will do natural ventilation from the start since your comfort polygon is essentially your natural ventilation polygon. I changed the name of this strategy as per above and I re-write the assumption of this polygon to be as follows:

Occupant Use of Fans - The polygon is made by assuming that a wind speed of 1.5 m/s is the maximum speed tolerable before it starts blowing papers around and becomes annoying to users. Accordingly, to generate the polygon, the component runs a PMV model with this wind speed and the input conditions of the comfort polygon. It therefore assumes that, any time occupants feel hot, they will turn on fans blowing wind at 1.5 m/s and point them at themselves. This wind-driven PMV then defines the right-most boundary of the polygon. The left-most boundary is the same as that of the comfort polygon and the top and bottom boundaries are set by the max and min humidity input by the user or the maximum humidity of the comfort polygon.

  1. Yea, we really need to check radiation to give any kind of solar recommendation. Nothing is stopping me except time commitment. I would need to add in an annualHourlyData input first to allow users to connect up solar radiation to the component.

-Chris

On Tue, Jul 15, 2014 at 12:17 AM, Mostapha Sadeghipour Roudsari < notifications@github.com> wrote:

Chirs, Back to natural ventilation does the component only checks for the wind speed? I can argue that putting a maximum values of 1.5 is not the best way to tell the designers about the potentials. In many cases there are design solutions to control the wind speed.

I should also add that I'm so happy that you didn't apply to passive solar without checking radiation. What is stopping you from getting the radiation values?

— Reply to this email directly or view it on GitHub https://github.com/mostaphaRoudsari/ladybug/issues/68#issuecomment-48988891 .

chriswmackey commented 10 years ago

Also, @ayezioro, I have to remember to include your name in my posts here so that you get an email. Check out the last two things that I posted to this github discussion.

-Chris

On Tue, Jul 15, 2014 at 2:37 PM, Chris Mackey chris@mackeyarchitecture.com wrote:

Mostapha, here are my thoughts:

  1. Ok. I'm cool with moving it around in the tabs and I just put it next to the 3D chart now because it is also a chart.
  2. Conditional statement is now on my to-do list.
  3. Oh man, I feel so dumb. I just misunderstood what that notation of 'font = "Verdana"' meant in the function definition. It just means that you don't have to send the function a font if you do not want to. I just went through and replaced all of the situations where I copy-pasted this function into my components. Luckily, it's only in 3 components and this was the only time I copy-pasted from LB_LB. However, I did copy-paste something from the sunpath once and I also just moved this function to LB_LB to. I will try to be better about this and not copy-paste stuff in the future and, if I realize that a function is particularly useful to Abraham, I will put it there.

....

  1. I think coloring points based on other annualHourlyData could be cool. What if the "colored mesh" is, by default, an indicator of the frequency of certain conditions but, if a user hooks up annualHourlyData, the mesh switches to be a bunch of colored points? A bar graph for strategies sounds cool. I really don't know if it's a good idea to use color for the strategies, though, if we already use it for frequency and for annualHourlyData. What if we tried outlining the strategies and the bars of the future graph with different line weights instead?
  2. I guess the strategy name for this polygon would be better termed "Occupant Use of Fans" rather than "Natural Ventilation" (Climate consultant is really being misleading by calling this polygon "Natural Ventilation"). The reality of an analysis like this is that it assumes that your will do natural ventilation from the start since your comfort polygon is essentially your natural ventilation polygon. I changed the name of this strategy as per above and I re-write the assumption of this polygon to be as follows:

Occupant Use of Fans - The polygon is made by assuming that a wind speed of 1.5 m/s is the maximum speed tolerable before it starts blowing papers around and becomes annoying to users. Accordingly, to generate the polygon, the component runs a PMV model with this wind speed and the input conditions of the comfort polygon. It therefore assumes that, any time occupants feel hot, they will turn on fans blowing wind at 1.5 m/s and point them at themselves. This wind-driven PMV then defines the right-most boundary of the polygon. The left-most boundary is the same as that of the comfort polygon and the top and bottom boundaries are set by the max and min humidity input by the user or the maximum humidity of the comfort polygon.

  1. Yea, we really need to check radiation to give any kind of solar recommendation. Nothing is stopping me except time commitment. I would need to add in an annualHourlyData input first to allow users to connect up solar radiation to the component.

-Chris

On Tue, Jul 15, 2014 at 12:17 AM, Mostapha Sadeghipour Roudsari < notifications@github.com> wrote:

Chirs, Back to natural ventilation does the component only checks for the wind speed? I can argue that putting a maximum values of 1.5 is not the best way to tell the designers about the potentials. In many cases there are design solutions to control the wind speed.

I should also add that I'm so happy that you didn't apply to passive solar without checking radiation. What is stopping you from getting the radiation values?

— Reply to this email directly or view it on GitHub https://github.com/mostaphaRoudsari/ladybug/issues/68#issuecomment-48988891 .

ayezioro commented 10 years ago

Hi guys, Moving. Slowly but moving. The last version is in: https://www.dropbox.com/s/kocnzp5h90ka5pg/bioclimatic_chart_Strategies_11.gh I succeeded adding legend and axes titles. I'm struggling with technicalities, so sorry if my questions will be so silly for you both.

I'm trying now to have the color legend for the grid. I copied some line from the Psychrometric code. Look at my line 589, which is commented now. I get an error that can't get how to solve. Similar thing happened when i did the titles/axis . See lines 83-86. I tried to pass the parameters when calling the routine, but get an error. In ths case i defined the font size and name manually. I'm sure i'm missing something basic here. Chris, if you can please take a look at the createFrequencyMesh routine. It is not calculating the grid when temperatures are lower than 0. I checked the routine in the Psychrometric component. There you changes the code. I think i quite understand what is going on there. What is the 19.5 in line 702: index = int(round(airTemp[hour] +19.5))?

For tomorrow i want to summarize, and plot, the results i have so far. So i can see the complete picture of what i have. This before i get into your questions and suggestions Chris.

So to summarize this post: Advice in implementing the color legend and coloring negative temperatures grid. Thanks, -A.

mostaphaRoudsari commented 10 years ago

Hi Abraham, Before I check your file createLegend should be a good reference for what you are trying to do: https://github.com/mostaphaRoudsari/ladybug/blob/master/src/Ladybug_Create%20Legend.py

mostaphaRoudsari commented 10 years ago

Abraham, Just change the access for legendPar_ input to list and it will work fine.

Chris, I will get to your comments later.

ayezioro commented 10 years ago

Hi, Some progress. So messy and dirty the code i did, but what works works. I need to clean it, but later. Have the new version: https://www.dropbox.com/s/p4yr5g70jw66jxp/bioclimatic_chart_Strategies_12.gh I get the legend and the total comfort plotted in the 3DChart, as Chris did. I commented line 595 to leave only the CZ. I tried, hardly, to solve the calculations for temperatures below 0 but no success so far. If you have any ideas, please tell me. It happens in routine createFrequencyMesh, starting at line 398. The variable orgY gives the lower grid value in order to include the lowest temperature value. Since it doesn't work i commented the respective lines and leave the limits between 0 and 50. I'll keep trying but maybe one of you could find the light. "Magically" i succeded with the legend of the chart, though i don't feel i'm in full control of it. I'll be glad to discuss the implementation of wind speed and radiation for better assesment of the PSH and NV influence. I have to say that even though is is taking some time i'm enjoying this. Please be patient. I want to understand each step i'm doing. Tell me what do you think ... -A.

ayezioro commented 10 years ago

Hi, problem solved for temperatures below 0. Same link as above. -A.

mostaphaRoudsari commented 10 years ago

Hi Abraham. Great to hear that. Sorry that I couldn't be that much of an assistant. When I tried the component last time I noticed that changing the basePt from 0,0,0 will make some parts to be relocated. I'm not sure if you are aware of it but in case you are not this should be an easy fix.

ayezioro commented 10 years ago

OK. Take: https://www.dropbox.com/s/6l6uoy5j46yvdol/bioclimatic_chart_Strategies_13.gh But ... in this one you can help for sure. Lines 913 and 925 are commented since the transformation is giving me an error. it is related with the variable which is a Tree (i think). The coloredPoints can be circles or polygons (depending on the input choice). Any solution? Thanks, -A.

mostaphaRoudsari commented 10 years ago

Hi Abraham.

  1. Generally speaking you don't want to deal with dataTrees in your script unless you have no other solution. I moved list to data tree conversion after transformation.
  2. You can actually add up transform matrix together and apply it once. I didn't apply this but just FYI.
  3. Check the file here: https://www.dropbox.com/s/en9fsfcy363n3f0/bioclimatic_chart_Strategies_13_msr.gh
ayezioro commented 10 years ago

Thanks Mostapha, Feel free to give a sample of adding up multiple transformations.

mostaphaRoudsari commented 10 years ago

Hi Abraham, Here you go:

import Rhino as rc

scale = rc.Geometry.Transform.Scale(rc.Geometry.Point3d.Origin, 5)

move = rc.Geometry.Transform.Translation(10,20, 30)

b.Transform(move * scale)
ayezioro commented 10 years ago

Great! Implemented. Same link as before. It makes a difference the order of the transformation: move_scale != scale_move

There is an old saying (translating from spanish, so just get the idea): The only thing i know is that i don't know anything, and i hope to know a bit more.

mostaphaRoudsari commented 10 years ago

Nice! So what are the next steps? When do you think we should add it to the rest of the components? Who do you want to test and double check? Should we close this issue and start some new ones for reminded issues that came up from this issue? Back to the expression, I think I get it. We have a similar expression.

ayezioro commented 10 years ago

Oh. I have a list of 8-9 points "to do". Tomorrow i want to plot min/max values per month. But more important is to plot graphs for the results. Having the 3DChart working for all chosen strategies. I'm escaping this but i need to input analysis periods for 4 seasons. I'm not sure about the best way to do this. Same for met/clo ... By the end of next week i'll be off for a couple of weeks. I really want to have all this done by then. I'll be glad and happy to hear your comments so far.

It is ok to close this one. At the "worst" case i'll open a new one :-) Thanks, -A.

ayezioro commented 10 years ago

Updated version at same link. Min/Max lines per month. From your experience, having so many outputs (and more to come), how do both of you recommend to deal with that? -A.

ayezioro commented 10 years ago

Both of you are so silent ... Well. A new version (14): https://www.dropbox.com/s/8b6wxjxmy6mp9x4/bioclimatic_chart_Strategies_14.gh Please look at the resultsChart output. I intend to do the same for each month (or similar to that). I think is cool, but will be glad to hear your comments/suggestions (technical, aesthetical/etc). Some advice: If you look at the commented lines from 357 to 373 i tried to collect all meshes into one list. But i get an error. So i created different variables for the mesh that came from the lb_visualization. I also asked your advice before about the way you see how the outputs should be presented. As you see, there are many, and more to come. Right now it looks a bit messy. -A.

mostaphaRoudsari commented 10 years ago

Hi Abraham, Sorry for not being responsive. I'm moving back to New York at the end of this month and things are quite busy. I will sure to have a long list for you when you are back from your vacation. First of all the result chart is so beautiful. I think we can still work on colors but even as what it is right now it looks great. Back to your question you are making a minor mistake in line 358. You should use parentheses instead of brackets.

Try this:

        #  use ladybug functions to color the circle
        colMesh = lb_visualization.colorMesh(repeatedColors, meshedC)
        #if count == 0 :   colMesh1 = lb_visualization.colorMesh(repeatedColors, meshedC)
        #elif count == 1 : colMesh2 = lb_visualization.colorMesh(repeatedColors, meshedC)
        #elif count == 2 : colMesh3 = lb_visualization.colorMesh(repeatedColors, meshedC)

        colResMesh.append(colMesh)
        #colResMesh[count] = colMesh
        #print count, colMesh

    #Bring all legend and text together in one list.
    ##colMeshGGraph = []
    #for item in colResMesh:
    #for item in colMesh:
        #colMeshGGraph.append(item)
    return colResMesh
    #return colMesh1, colMesh2, colMesh3
    ##return colMeshGGraph

Back to your question

ayezioro commented 10 years ago

Thanks Mostapha., Didn't know you moved FROM NY. Feel free to change colors. I'm not in full control of those definitions. So anything, that will look more on LB aesthetics will be welcome. Your code fix worked for that routine but it dragged errors on the calling one, so i left this as is. Just in case you are interested in the error, it says: Runtime error (MissingMemberException): 'list' object has no attribute 'Transform' Traceback: line 1198, in main, "" line 1259, in script line 488, in showResults, ""

Since i'm leaving by the end of NEXT week i hope to finish a couple of more things. Then we can think of beta-testing before first release. I still hope for Chris's comments for that. I know he suggested some ideas tat i didn't get to them (yet), but hopefully i will. One of the things i want/need to do asap is the explanation/documentation of the component.

-A.

chriswmackey commented 10 years ago

@ayezioro ,

I am sorry that I have been so silent. I have been working hard on a few components that should compliment both of our tools and they have been ruling my life the last few days.

The chart looks fricking amazing! It has really come a long way. I like the bar graph of strategies and I'm happy to see how you have handled the cases where temperatures drop below zero. I have made a few updates to my psychrometric chart based on some of the things that you have done. They are as follows:

1) I have started putting together a component that will make your bar graph based on the strategyNames and strategyPercentOfTime outputs of the Psych chart. I had been working on putting it in the psychrometric chart but realized that this can increase the component run time and the psych chart is already very large. Accordingly, I decided to put it in another component that accepts the output of our charts (and possibly other data that users might want to display on a bar chart). What are your thoughts on having this bar chart be an extra component?

2) I realized that humidification only and dehumidification only were not really that helpful of polygons and that they were not really passive strategies. Accordingly, I took them out although I did put in a desiccant dehumidification polygon as this is less intuitive and closer to being a passive strategy.

3) I put an output of colors, which can be used to color the hour points of the psych chart with either comfortOrNot or annualHourlyData. I know that you wanted to color the points and let me know what you think of this strategy, which should be much faster than creating colored mesh.

The following things need to be edited with your current version before we release it:

1) Of primary concern is the fact that I do not know your assumptions about the strategy polygons and that your passive solar polygon is so large without consideration of radiation in the weather file. I can partially understand it from the perspective of a passivhaus, which can have a balance point as low as 5 C or maybe because sitting in intense sunlight can cause operative temperature deltas as high as 20C. In the case of the former, you should label the polygon "internal heat gain" and probably have a balance point that is higher than 5C around 12-13C (perhaps users can adjust it down to 5 with a new strategyPar component I made if they have the meter-thick walls of the passivhaus). It is also a bit confusing to me why the natural ventilation polyon does not have any limit to the maximum humidity and yet the comfort polygon and all of the other cooling strategies have such a limit. Perhaps it might be better to allow users to set humidity limits on the comfort polygon if they feel that this is necessary and have the other cooling polygons build off of this? I had always tended to see the comfort polygon as representative of natural ventilation and perhaps your natural ventilation polygon is just representative of a situation where users are allowed to adjust their clothing and turn on fans. Lastly, your thermal mass and night flush hours should probably include an analysis of the previous nighttime temperature and I have just implemented this on the psychrometric chart.

2) It might be clearer to have your polygon breps just be thickened lines. I just put a function into LB comfort models class called "outlineCurve" that can do this for your current polygons if you send in the outline of the polygon.

3) I still cannot understand what the separate analysis periods for winter and summer are for. Is there a way that you could provide just a normal analysis period input and have some other type of input for seasonal or monthly analysis?

4) It would be great if you could consolidate your outputs into lists and tree objects. Let me know your thoughts on what I have done with the most recent psych chart outputs.

rnarracci commented 10 years ago

Hi Chris,

I just discovered that you did time in New Haven! If you have the occasion to swing back through please stop up to PCPA and say hi.

Best,

Rob

ayezioro commented 10 years ago

Hi Chris, Good to hear you are alive. I've been following the updates of LB. First of all you two HAVE TO see this new version: https://www.dropbox.com/s/9xv11w8u27swxlp/bioclimatic_chart_Strategies_15.gh See the results chart output. I think is very cool. Let me know what do you think. As for all the points you wrote i'll relate to them shortly. I'm flying tomorrow and i'm swamped with issues to close before that. Started to look at the "outlineCurve". Give me a hint how to call the function (from the sticky definition needed to the implementation). Tried to use but is not recognized (even though i updated LB).

Thanks, -A.

chriswmackey commented 10 years ago

@ayezioro ,

I'm sorry again that I have been so bad at keeping in contact. I didn't want to give you feedback until I had worked through some of the issues myself on the psych chart. I can definitely assist with some of the implementation of my comments in the next few days. I will check out the most recent version shortly and I should say with regard to the strategy polygons, that a coworker showed me a page from "Sun, Wind, and Light" where your polygons were described. I am starting to understand the assumptions much better now but I am still of the opinion that we should pick the names of the polygons carefully. For example, I am interested in hearing your thoughts on whether it might be better to refer to the natural ventilation polygon and passive solar polygon as "wind needed" and "sun needed" as they appear in this olgyay chart on this web page:http://www.tboake.com/carbon-aia/carbon_definition.html.

As for the outline curve, I will check your file in the next few hour and send over a working version.

mostaphaRoudsari commented 10 years ago

@ayezioro I have to pack my stuff right now and I can't check the details but this is beautiful. Way over my expectations for the first component that one put together. Well done.

@chriswmackey I captured a view so you can see the results.

bioclimatic_chart_top

ayezioro commented 10 years ago

Hi, Last version at same link as before. Changes: Added the "outlinecurve" to the polygons. I managed to do this but defining the routine inside the component. Cleaned out many of the outputs that were there for checking. They were not needed anymore. Since Chris's comments are a bit above this one i'm pasting his comments and will try to relate/answer:

"1) I have started putting together a component that will make your bar graph based on the strategyNames and strategyPercentOfTime outputs of the Psych chart. I had been working on putting it in the psychrometric chart but realized that this can increase the component run time and the psych chart is already very large. Accordingly, I decided to put it in another component that accepts the output of our charts (and possibly other data that users might want to display on a bar chart). What are your thoughts on having this bar chart be an extra component?"

Can be cool. We need to sync the format of the output. As you can see, I'm having now monthly graphs and i intend to do one more yearly graph which is the combination of strategies. Basically it will combine the 'Cooling' ones since there is only one for heating. Just a comment: I'm starting to "dislike" such a large amount of components. Sometimes i would rather prefer a bit more running time than dealing to more components.

"3) I put an output of colors, which can be used to color the hour points of the psych chart with either comfortOrNot or annualHourlyData. I know that you wanted to color the points and let me know what you think of this strategy, which should be much faster than creating colored mesh."

Definitely much faster and smart. Nothing to say about this. I would suggest to change the blue color. If you have the chartmesh on, it is difficult to differentiate between both outputs. What i will do is to add 3 outputs: hourly points, comfort points and month points. I will create 3 different arrays for them, each will be associated to the respective output. I'll stick with the hollow circles (i really don't like GH's geometry of the points (in either one of their 3 options).

"The following things need to be edited with your current version before we release it:" "3) I still cannot understand what the separate analysis periods for winter and summer are for. Is there a way that you could provide just a normal analysis period input and have some other type of input for seasonal or monthly analysis?" I don't have any problem providing just one analysis period. My difficulty is how to separate seasonal periods. My only solution is that the user defines the, so that's why i'm using 2 analysis periods. If you have a better way to separate this i'll be glad to implement. Another issue for me will be defining different activities and clothing levels for the day (say "day" and "night", which are not necessarily related to daylight/dark hours, but rather to costumes of use). This point is critical, and i'll be glad if both of you suggest a creative approach.

"4) It would be great if you could consolidate your outputs into lists and tree objects. Let me know your thoughts on what I have done with the most recent psych chart outputs." I think i'm doing this. Didn't i? Your outputs are more than fine and i'm trying to stick with most of them (or will try to do that later on). One think that i really don't like is the double comfort zone. My approach is having only one that dynamically changes according to clo/met levels. One "bug" to fix: the hourPointLegend and the legend are located at the same base point and this can't be separated for each of them.

"I am starting to understand the assumptions much better now but I am still of the opinion that we should pick the names of the polygons carefully. For example, I am interested in hearing your thoughts on whether it might be better to refer to the natural ventilation polygon and passive solar polygon as "wind needed" and "sun needed" as they appear in this olgyay chart" Yes, i took basically Brown's chart. Just took out the HTM+NV and assigned it to the HTM. The reason is that this zone is too much big and doesn't make so much sense to let it make such a big influence. I discussed this point with my thesis advisor at that time and we concluded we did right. I'm also thinking in making the EC thinner to reduce it's influence. I take the case of TelAviv, where the humidity in summer time is high. Seeing the analysis results at some points seems to be that adding moisture is convenient. Doesn't make any sense in this city. As for the names i don't have much trouble with that. I'm just thinking that Olgyay lacks HTM+NV but on the other hand i like his areas a bit more. On one of the next steps i want to input wind speed and radiation and see if the temp/hum really can be comfortable. I have somewhere a chart showing the divisions of PSH and NV according to levels of radiation and wind speed. I'll post this when i find it.

-A.

mostaphaRoudsari commented 10 years ago

Hi Abraham, I leave your comments to be answered by Chris, but maybe I can help with this one. What do you mean by: One "bug" to fix: the hourPointLegend and the legend are located at the same base point and this can't be separated for each of them?

mostaphaRoudsari commented 10 years ago

Also @arkdanielnielsen can you check this component and give us your comments. Abraham has been working on this for few months now and I personally think the result is impressive. Here is the file: https://www.dropbox.com/s/9xv11w8u27swxlp/bioclimatic_chart_Strategies_15.gh

ayezioro commented 10 years ago

Hi Mostapha and Chris, Last version here: https://www.dropbox.com/s/pnsv820c2ze10r6/bioclimatic_chart_Strategies_16.gh I cleaned a lot of inputs/outputs. Now the hourly points can be colored by comfort or month, choosing at the output. Also started to document it, but not finished ...

As for the "bug" see attached picture. You see that both legends are located at the same place (the legend, and the hourPointLegend).

I'll be back by the start of next week to give this a "final" push, but i indeed will be happy to hear comments.

Thanks, -A.

canvas

chriswmackey commented 10 years ago

Glad to have you back, Abraham! I hope that your break was swell.

The component is looking awesome and, if I had not said it earlier, it is very impressive for your first GHPython component. I would say that you are very close to working out the last bugs and committing it. The code is looking pretty organized and the inputs/outputs are making sense. There are maybe just a few last tweaks that I might recommend. I think I can cover all of them as a response to the comments:

1) I am sensing that you are not as excited about a separate bar chart component as I am and we definitely don't have to go down that route. I only recommended a separate bar chart component as there is a bunch of stuff that I have been wanting to plot on a bar chart easily in the Rhino scene (ie. average monthly temperatures or average energy use) and it could be nice if we had one bar chart component for all everything. I can make this component separate, though, and this might make sense as the way the data is formatted here is different than a monthly energy use chart. I will still plan to sync the output of the psych chart to yours with a "resultsChart" output and you are right that it's not a big deal if the component becomes larger. Still, I will say that making the chart adds 4.1 seconds to your component's calculation time (nearly doubling it) and this made it a bit hard to play around with the different inputs of wind speed, etc without waiting a long time. Accordingly, I would really suggest us having boolean input that we can switch off if we do not want to generate the chart. Also, I wanted to make the psych chart compatible with viewing EnergyPlus results and these are not always for a full year so I may not adhere strictly to your classification by month (I will definitely do a full year chart). I noticed that your chart fails if I hook up E+ data because you organize the data by month (see file below) and perhaps you could have the chart do something different in this case. For now, we don't have to worry about it, though.

https://www.dropbox.com/s/p56821wrrj44gc6/bioclimatic_chart_Strategies_16_with%20Energy%20Sim.gh

On another note, I am curious to know what it is about more components that you dislike as I realize that I am probably biased because I have gotten familiar with most of them. Is it that you find you have more components on your grasshopper canvas and this makes it hard to follow or is it that there are more components in the top bar that you are unfamiliar with? (the latter is easy to fix by putting some infrequently used components below the tab).

3) I'm glad that you like the color points idea. I can switch over to generating circle breps instead of points since I realize that users are really not going to use the point data for anything. As for the blue, I was imagining that users would look at the points separately from the mesh by previewing them separately. This is why I hide the points by default. Still, other colors are a good idea and Mostapha and I were talking about color schemes today. Perhaps I will come up with one for points later.

3) It seems that you left out the most important part of your response: "My only solution is that the user defines the, so that's why i'm using 2 analysis periods." I will wait for you to finish before giving feedback here. As for a creative approach to night/day and changing activities, maybe you could make a bio chart calculator component that is similar to my PMV or adaptive calculator components and allows you to take a stream of hourly activities and clothing and apply them in relation to hourly wind speed, temperature, and humidity. I just know that, if I tried to do what the the PMV calculator component does with the psych chart, it would be a huge mess and this was my creative solution to the problem you describe.

4) I'd say that things are really nicely consolidated now and I should clarify that you don't need to follow to all of my outputs. Multiple comfort zones are just an option on mine since this is done on a lof of other psych chart tools but, if a user doesn't want it, they don't have to put in multiple comfort variables (or they can merge the comfort polygons together). Similarly, if you don't want users having multiple values on the bio chart, you don't have to allow it. Still, be aware that, if I do plug multiple values into wind or clothing on your chart, it will generate 2 charts.

I am glad that you are on board with re-phrasing some of the strategies. I feel the same way about the PSH as you do about the large NatVent. Occupants sitting in sunlight is definitely different than passive solar heating and I am curious about the reference you cite.

So, in summary, I have the following things on my to-do list: 1) Make psych chart points into circles. 2) Move the psych legends of different point colors over. I hadn't really thought of this as a bug since I imagined viewing the points separately from the mesh but I agree that it's a good idea. 3). Make a strategy bar chart like the one you have, Abraham. 4) I like that your strategy lineweights are thinner than mine and I will change this too.