Git Product home page Git Product logo

solmap's Introduction

Solar Map

A command line tool to evaluate the best placement position of solar panels, given a 3-D model of the place, the latitude and longitude.

All file formats for 3-D models supported by Assimp can be used. I conventioned +Y axis as up, and -Z as north, using a right hand coordinate system, which gives +X as east (see 3-D model reference.obj). An execution example for a floating cube over a flat surface replacing Uberlândia's town hall is given by:

$ ./build/solmap -18.9118465 -48.2560091 sample-models/hover-box.stl

The command will output the optimal angle for solar panel placement, as well as a solar incidence map overlayed to the 3-D model, in a file named incidence.vtk. This file can be opened by scientific visualization tools like Paraview and VisIt, both which are free software.

The program works by computing the sun's position for every 5 minutes of daytime over the year of 2017. For each calculated position, it accumulates the solar incidence over every exposed vertex of the 3-D model, considering the surface direction (given by normal vector of the point) and the shadows cast by the model.

Most of the work is performed by the GPU, using the Vulkan API. By using GPU's specialized hardware for graphics rendering and massively parallel computation, the results can be computed very quickly in a cheap computer.

You may notice the azimuth suggested by the program for solar panel placement is not exactly the theoretical value expected for your latitude (it should be either 0° or 180°, depending whether the place is in the southern or northern hemisphere), but there is a small error of less than a tenth of a degree. This seems to be due the time discretization error, because a day is not necessarily started with sun's altitude at zero, but at anywhere from zero to 5 minutes from that point.

Dependencies

To build, you need:

  • Python 3 with CFFI, for Python interface;
  • GLM library, for linear algebra;
  • glslc command line tool, from shaderc package, to compile GLSL shaders into Vulkan's SPIR-V bytecode;
  • Boost.Functional/Hash, for hash combining.

To run, you need:

  • Python 3 with CFFI;
  • PyEphem on your Python path, for astronomical sun positioning;
  • Vulkan library, for GPU access;
  • Assimp library, to load 3D models.

solmap's People

Contributors

lvella avatar

Stargazers

Enrique Fynn avatar

Watchers

James Cloos avatar  avatar

solmap's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.