Autodesk

architecture, sustainability, building performance, environmental design, architectural science...


RADcomponents script

Hi oliver,

I feel I am pretty close to finishing the script that calculates radiation components on selected surface for each month and export it to Excel.

i am hitting a snag though: the month are cycling through each rows of Excel, so we end up with only december data. I think I may need to incorporate the Excel row # to each month in the array.

Also, the cmd to get the components acts funny with some surfaces: sometimes the number look good, but with some other surfaces, the diffuse component gets out of range, with some huge numbers. I don't know what causes this.

I will try to figure things out and finish the script tomorrow. I have tried a few times to attach the script (zipped) to this post, but I get an error message and crash...Puzzled so the script may not show on this one.

I'll email it to you. Have a look at what I have thus far.

If anyone has feedbacks, it would be welcome.

Cheers,
Olivier

AttachmentSize
RADcomponents.zip969 bytes
Solar Access and Inter-Zonal Adjacencies
Sunshine hours script for v5.5

RAD Component Script

comment posted by Olivier :: 21 July 2006 - 4:44am

So...i have fixed my issue quite simply in fact.
The problem remains that the on some selected objects, the diffuse radiation redults are way out of range, using the command totalDirect, totalDiffuse, totalHours = get("shading.range", 1, 365).

Has anyone played with this script command before?
interestingly, it does seem to work fine on some objects.

Any feedback welcome!

Olivier

AttachmentSize
RADcomponents.zip1014 bytes

Hi Olivier,I found that

comment posted by Oliver H :: 22 July 2006 - 8:48am

Hi Olivier,

I found that there was no difference in results with or without shading and added following lines:

-- Create shading mask --

add("mask", selected_objects)

-- Calculation of radiation values on selected object for single months

cmd("calc.shading.total")

Greetings,
Oliver

AttachmentSize
RADcomponents.scr2.85 KB

New addition

comment posted by Oliver H :: 22 July 2006 - 1:48pm

Hi Olivier, I found this in an older thread.

Olivier wrote:
I do not have that script nor do I know what it does exactly, but it looks as if it calculates monthly total insolation and the number of hour the surface has collected radiation. Thus, for the month of January, your surface collected a total of 28828.2 Watts/m2, in 255 hours of insolation. Dividing 28828.2 per 255 = 113Wh/m2. This is called a monthly hourly average insolation.
If you were to divide the number of insolation hours in that month per the number of days in the month: 255/31 = 8.22 hours / day and ultiply this by 113Wh/m2 = 930Wh/m2 per day. That is called the monthly daily average insolation, which, for January at your location might be correct. I get 4,840 Wh/m2 per day for July which look reasonable.

It seems correct, but if I compare the direct values of the script and the values calculated on the solar exposure page of ecotect, the values are closer in their immediate W/m² output.
This is strange. Any ideas why this is so?

I've attached my comparison as an excel sheet.

AttachmentSize
Insolation comparison.xls26 KB

RAD script

comment posted by Olivier :: 22 July 2006 - 4:54pm

Hi Oliver,

Good! I guess the scipt wasn't refreshing the mask without that command.
As to my old post, I need to look more into it. I know for sure that at the time it was written, the script command we use now was not available, so we may have used another command (which?).
I am away for most of the weekend, but I'll have a look at all this shortly.

So, does the script now works okay for you? Do you get these weird long radiation value for the diffuse component on some surfaces?

Olivier

RAD Script

comment posted by Oliver H :: 22 July 2006 - 5:05pm

I found that the outcome of my unorthodox approach delivers the same results as your smarter array. I still doubt the outcome as W/m².
The long outcomes are simply a format problem in Excel as far as i can see at the moment.

I hope someone can explain the W/m²-Wh/m² problem.

Greets,
Oliver

RAD script

comment posted by Olivier :: 26 July 2006 - 5:53am

I have ran a few tests with the script, comparing the results with the Solar Exposure Total Monthly Calculation straight from Ecotect.
Indeed, i think that the script definately gives units in Wh/m2, instead of W/m2 as noted.

I used the Thermal Intro model (my favorite testing model) to run the tests, with the weather file from San Francisco. I used high accuracy for both the Solar Exposure and the Script (at line 44 of the script, changed the value 3 to 1).

The direct radiation in Ecotect has a difference of -1.01%, while the total (global) radiation % difference was -1.61%.
So it appears that the script already accounts for the shading - which was expected as it derives the data from the shading mask; I would want to say that the minimal difference is due to the randomness of the rays, but I can't say for sure, as it seems rather consistently lower in Ecotect than with the script. Also, I am not entirely sure of the feature "Use Shadow Data From" in the Solar Exposure. I used the Sun-path option instead of the Each Object.

I would like to add to the script the amount of shading, which could be done with the command "get.shading.percentage.datetime".

Any thoughts?

Olivier

RAD script

comment posted by Olivier :: 26 July 2006 - 5:54am

I have ran a few tests with the script, comparing the results with the Solar Exposure Total Monthly Calculation straight from Ecotect.
Indeed, i think that the script definately gives units in Wh/m2, instead of W/m2 as noted.

I used the Thermal Intro model (my favorite testing model) to run the tests, with the weather file from San Francisco. I used high accuracy for both the Solar Exposure and the Script (at line 44 of the script, changed the value 3 to 1).

The direct radiation in Ecotect has a difference of -1.01%, while the total (global) radiation % difference was -1.61%.
So it appears that the script already accounts for the shading - which was expected as it derives the data from the shading mask; I would want to say that the minimal difference is due to the randomness of the rays, but I can't say for sure, as it seems rather consistently lower in Ecotect than with the script. Also, I am not entirely sure of the feature "Use Shadow Data From" in the Solar Exposure. I used the Sun-path option instead of the Each Object.

I would like to add to the script the amount of shading, which could be done via the command "get.shading.percentage.datetime".

Any thoughts?

Olivier

Hello Olivier,ther is

comment posted by Oliver H :: 8 September 2006 - 10:48pm

Hello Olivier,

ther is still a problem with the script. It needs to use the shading data from each object as in the analysis settings dialog. Otherwise it does not account for added shading devices correctly.

I have no idea how this can be incorporated.

Oliver

I think I've solved it.

comment posted by Oliver H :: 10 September 2006 - 11:27am

Hi Olivier,

I think I've solved the last issue.
When testing a window that should have had 100% shading all day between April and August, the script was showing direct radiation on the plane in June! Less than without shading, but no where near where it was supposed to be.

The probelm is, there has to be an inter-zonal adjacency calcuation beforehand to create a mask from each object.

I do this by hand, before running the script.
Maybe someone knows the lines to integrate this into the script itself?

Oliver

AttachmentSize
RADcomponents_Updated.scr3 KB

IZA cmd

comment posted by Olivier :: 10 September 2006 - 11:10pm

Hi Oliver,

There is the command cmd("calc.adjacencies") that should perform the iza calculations when I put it at the top of the script, but for some reasons, the calculation hang at arounf 3.5% complete. I do not know why.
If this command was to work, then the other commands such as "clear mask" etc should not be there.
My understanding is that iza calculation do create a shading mask for each objects on a thermal zone. But the script command does not ask for an accuracy value either.
Let me try to get my head around this.

I'll post when I get enlighten....

Olivier

Similar problems

comment posted by Oliver H :: 11 September 2006 - 8:12am

Yes Olivier,

I was having similar problems with the iza command. Hope we get the mask topic sorted.

Oliver

Hi Olivier,I've gotten

comment posted by Oliver H :: 12 August 2007 - 10:55am

Hi Olivier,

I've gotten back to working on the script. I have the need to get the results for each hour now. Do you have a tip or a fitting snippet for me to start with?

Thanks

Oliver

Any progress on the in-script IZA

comment posted by CFC :: 19 September 2007 - 10:22pm

Hello Oliver and Olivier -

I am wondering if you have made any progress on the interzonal adjacency calculation within a script.

I am working on a script to calculate the effectiveness of multiple shades (swapping them out one at a time), and my understanding is I need to perform an IZA for each shade. I'm having a similar problem, where it seems to hang up after 9.4%.

- Chris

IZA and accuracy

comment posted by CFC :: 19 September 2007 - 10:44pm

So I just tested something and it seems to work. I noticed that after I ran a simple script that only calc'd adjacencies (ran the IZA), and then aborted because it hung up at 9.4%, when I manually ran the IZA it defaulted to a sampling grid size of 0'-0". Without doing the math, I figure it will take approximately forever to finish at that level of precision.

So, a shot in the dark was to specify a level of precision (similar to other scripting commands) like this:

cmd("calc.adjacencies", precision, overshadowing)

where precision might be a value from 0 (forever) to some number higher than 0 (less than forever). This value seems to be inputted into the IZA grid size, so "0.5" for me works out to be 6 inches (in King George's system of measurements).

The second number seems to leave toggled (and therefore presumably calculates) overshadowing. I am not sure yet how to specify the adjacency tolerance; this variable seems to remain as whatever was manually entered in the IZA box.

It would be good to get some confirmation on this from Square One and or Oliver or Olivier.

IZA + RAD Script

comment posted by Olivier :: 21 September 2007 - 4:48am

Chris and Oliver,

Sorry I have dropped the ball on the script...
I have been very busy.
I will try to go over it this weekend if I can find the time (uhmmm). This script is something I want to nail.
I'll look at various ways to script the IZA Chris.
Can you email me what you've got thus far?

Cheers,
Olivier



Related websites

Translate This Site

User login