Solar diagrams

A forum dedicated to the Arch module development
User avatar
yorik
Site Admin
Posts: 8661
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Solar diagrams

Postby yorik » Fri Nov 18, 2016 6:01 pm

Arch Sites can now display a solar diagram:

freecad-solar-diagram.jpg
freecad-solar-diagram.jpg (79.55 KiB) Viewed 2641 times


To this purpose, the Arch Site object has gained a couple of properties. Longitude and Latitude were there already, I added a couple more to set the North direction, and to set the diagram size and color.

For this to work, pysolar must be installed on the system.

For now this is it, it's just informative, but later on we can extend this to do all kinds of fancy things, shadow calculations, etc.

The functionality is also available from python:

Code: Select all

import ArchSite
node = ArchSite.makeSolarDiagram(-46.38,-23.33) # longitude, latitude, [scale]
FreeCADGui.ActiveDocument.ActiveView.getSceneGraph().addChild(node)
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: Solar diagrams

Postby triplus » Fri Nov 18, 2016 7:01 pm

Looking good.

P.S. I guess it could also be useful for solar plants:

Image

;)
Jee-Bee
Posts: 627
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Solar diagrams

Postby Jee-Bee » Fri Nov 18, 2016 8:39 pm

or simple task... how is the sunlight in the new garden ;)
User avatar
yorik
Site Admin
Posts: 8661
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Solar diagrams

Postby yorik » Fri Nov 18, 2016 11:33 pm

pysolar can give the sun intensity too, so there are many possible interesting calculations to do
User avatar
yorik
Site Admin
Posts: 8661
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Solar diagrams

Postby yorik » Sat Nov 19, 2016 2:37 pm

btw the ladybug plugin for grasshopper is written in python, and contains an awful lot of interesting things, some of which we could reuse...
https://github.com/mostaphaRoudsari/ladybug
damian
Posts: 200
Joined: Sun May 31, 2015 6:16 pm

Re: Solar diagrams

Postby damian » Sat Nov 19, 2016 3:05 pm

and SAM (https://sam.nrel.gov/node/69515) always has SDK in Python, and PVLIB (https://github.com/pvlib/pvlib-python), and ...
chakkree
Posts: 140
Joined: Tue Jun 30, 2015 12:58 am
Location: Bangkok Thailand

Re: Solar diagrams

Postby chakkree » Tue Nov 22, 2016 9:57 am

Wow! Beautiful
SolarDiagram2.png
SolarDiagram2.png (83.9 KiB) Viewed 2143 times


install Pysolar 0.6 (Not pysolar 0.7)

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8972 (Git)
Build type: Release
Branch: master
Hash: 14594dde32d3af23d496a0b630db18480e618249
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
pablogil
Posts: 518
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Solar diagrams

Postby pablogil » Wed Nov 23, 2016 8:02 am

Really nice new feature.

It would be really handy for shadow studies... when FreeCAD supports casting shadows on 3D view, of course, hehehe

Thanks!
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
saso
Posts: 624
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Solar diagrams

Postby saso » Wed Nov 23, 2016 11:05 am

did someone say shadows ?! viewtopic.php?t=9663 ;)