GithubHelp home page GithubHelp logo

mitsustainabledesignlab / daysim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nrel/radiance

18.0 11.0 9.0 24.01 MB

DAYSIM is a validated, RADIANCE-based daylighting analysis software that models the annual amount of daylight in and around buildings.

Home Page: http://daysim.ning.com/

License: Other

CMake 1.85% Python 2.06% Shell 1.68% C 88.08% C++ 1.84% PostScript 1.94% Perl 1.21% Tcl 1.25% Batchfile 0.01% Gnuplot 0.08%

daysim's Introduction

DAYSIM

This repository is a fork of the RADIANCE mirror repository maintained by NREL and includes the source code for the DAYSIM suite. Programs in this repository compile on Windows (VS2013) and Mac (XCode), but testing is not complete. The following DAYSIM programs are part of this repository:

Programs maintained here (in src/daysim):

  • ds_el_lighting
  • ds_illum
  • ds_shortterm
  • gen_dc
  • gen_dgp_profile
  • gen_directsunlight
  • gen_reindl
  • gen_single_office
  • gencumulativesky
  • radfiles2daysim
  • rotate_scene
  • scale_dc

Programs maintained here that require manual intervention to compile (in src/rt):

  • rtrace_dc
  • rtrace_dc_2305

Programs maintained on the main RADIANCE repository and included here:

  • epw2wea
  • evalglare
  • gendaylit
  • all the original RADIANCE programs

How to Compile DAYSIM

Clone the repository to your own computer

  1. Open cmd (Windows) or Terminal (Mac) and navigate to the folder you would like to add the source code to using the cd command. Mine is D:/myname for Windows and Users/myname for Mac.
  2. Clone the repository to your local machine. The command is: git clone https://github.com/MITSustainableDesignLab/Daysim.git
  3. Navigate into the repository folder that was just created. The command is: cd Daysim
  4. Check out the combined branch of the repository to make it current. The command is: git checkout combined
  5. Add an upstream reference to RADIANCE. The command is: git remote add upstream https://github.com/NREL/Radiance.git

Create the DAYSIM project

  1. Open CMake. You can download CMake from https://cmake.org/.
  2. Enter the location of the DAYSIM project folder in the line "Where is the source code:". In the example above, mine is D:/myname/Daysim for Windows and Users/myname/Daysim for Mac.
  3. Enter a different location in the line "Where to build the binaries:". Using a different location prevents your built project (which is specific to your operating system) from being committed to the repository. The location you select could be a folder that doesn’t exist yet. Mine is D:/myname/Daysim64 for Windows because I compile 64-bit programs and Users/myname/DS_Build for Mac.
  4. Click Configure and select the generator for the project. I use Visual Studio 12 2013 Win64. For Mac, I use XCode.
    • Optional: After the project configures, you may see some errors related to Qt5, which is used to build Radiance’s rvu program. If you have Qt5 installed, you can enter its location at the entry for Qt5Widgets_DIR, which currently says Qt5Widgets_DIR-NOTFOUND. For Windows, mine is C:\Qt\5.5\msvc2013_64\lib\cmake\Qt5Widgets. Then click Configure again.
  5. Click Generate to build the project for your operating system.

Compile DAYSIM

Windows

  1. Open the Visual Studio project file, which is located in your build folder. Mine is D:/myname/Daysim64/daysim.sln.
  2. In the toolbar, you may choose either "Debug" or "Release" settings. Debug (the default) will take longer to compile and run, but will allow you to step through running code using the debugger. Use Release settings for creating distributable packages.
  3. Choose Build > Build Solution from the menus.
    • Optional: You may see errors related to the normtiff and ra_tiff projects. To fix these, select the BUILD_LIBTIFF option in CMake and repeat steps 4 and 5 from Create the DAYSIM project.
  4. Check that the executables have been built to your bin folder. Mine are in D:\myname\Daysim64\bin\Debug or D:\myname\Daysim64\bin\Release.

Mac

  1. Open the XCode project generated by CMake, located in your build folder. Mine is Users/myname/DS_Build/daysim.xcodeproj.
  2. In the top left corner, choose ALL_BUILD (default) to build all executables, or select certain programs from the drop-down menu. Press the play button to build the project according to specifications.
  3. View any warnings or errors in the navigation panel on the left. Even if XCode indicates "Build Failed", errors that caused the failure may not have occurred in crucial programs.
  4. Check that the executables have been built to your bin folder. Mine are in Users/myname/DS_Build/bin/Debug.

Compile rtrace_dc and rtrace_dc_2305

  1. In src/rt/CMakeLists.txt, uncomment the line add_definitions(-DDAYSIM) and build rtrace. Rename the resulting rtrace program to rtrace_dc.
  2. In src/rt/CMakeLists.txt, uncomment the lines add_definitions(-DDAYSIM) and add_definitions(-DDDS) and build rtrace. Rename the resulting rtrace program to rtrace_dc_2305.
  3. Comment both lines from src/rt/CMakeLists.txt before building the other programs.

Pull updates from RADIANCE

  1. Download updates from the upstream RADIANCE branch. The command is: git fetch upstream
  2. Merge the changes into your working set. The command is: git merge upstream/combined

You can do the same to pull updates from this repository by replacing upstream with origin.

License

DAYSIM

SOFTWARE END-USER LICENSE AGREEMENT

Copyright (c) 2012 National Research Council Canada, Ottawa, Canada

Copyright (c) 2012 Fraunhofer Institute for Solar Energy Systems, Freiburg, Germany

IMPORTANT READ CAREFULLY:

This end user license agreement is a legal agreement between you, in your capacity as an individual and/or as an agent for your company, institution or other entity (called herein the "User") and the NATIONAL RESEARCH COUNCIL OF CANADA and the FRAUNHOFER INSTITUTE FOR SOLAR ENERGY SYSTEMS (collectively called herein "NRC/ISE").

The User desires to use the computer software, in source code form, developed by NRC/ISE and identified as DAYSIM (called herein the "Software", a term which includes both original and modified versions of computer programs and computer data, and also includes printed matter intended to explain or assist the use of parts of the Software). Downloading, installing, using or copying the software by the User or a third party indicates that the User agrees to be bound by the terms and conditions that follow:

  1. TITLE AND GRANT

    NRC/ISE grant to the User, and the User accepts, a non-transferable, non-exclusive licence to install and use the version of the computer software program noted above, without any licence fee, only in the manner described under the heading "USAGE". All proprietary interest, right, title, and copyright in the Software which are not explicitly granted to you herein remain with NRC/ISE.

  2. USAGE

    2.1 The User may install and use the Software.

    2.2 The User may copy the Software for backup or archival purposes provided that the user reproduces all copyright notices and other proprietary notices on any copies of the Software.

    2.3 The User may create computer programs which incorporate or modify the Software. These programs may be made available to other persons under the following conditions:

    (a) the new software shall include a statement giving appropriate credit to NRC/ISE for the development of DAYSIM

    (b) NRC/ISE will both receive one free copy of the new software that will allow NRC/ISE to verify that requirement (a) has been fully satisfied. Failure to provide NRC/ISE with a new software later than 10 working days before its original release will terminate this User Licence Agreement.

    2.4 Materials generated through the use of the Software and/or data collected from using the Software (e.g. publications, web pages, presentation) shall include a statement giving appropriate credit to NRC/ISE.

  3. NO MAINTENANCE SUPPORT

    NRC/ISE shall be under no obligation whatsoever to provide maintenance or support for the Software; or to notify the User of bug fixes, patches, or upgrades to the Software (if any). If, in its sole discretion, NRC/ISE makes a Software bug fix, patch or upgrade available to the User and NRC/ISE does not separately enter into a written license agreement with the User relating to such bug fix, patch or upgrade, then it shall be deemed incorporated into the Software and subject to this Agreement.

WARRANTY DISCLAIMER

THE SOFTWARE IS SUPPLIED "AS IS". NRC/ISE DISCLAIM ANY WARRANTIES, EXPRESSED, IMPLIED, OR STATUTORY, OF ANY KIND OR NATURE WITH RESPECT TO THE SOFTWARE, INCLUDING WITHOUT LIMITATION ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. NRC/ISE SHALL NOT BE LIABLE IN ANY EVENT FOR ANY DAMAGES, WHETHER DIRECT OR INDIRECT, SPECIAL OR GENERAL, CONSEQUENTIAL OR INCIDENTAL, ARISING FROM THE USE OF THE SOFTWARE.

NRC/ISE DO:

(1) NOT ASSUME ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE SOFTWARE,

(2) NOT WARRANT THAT THE SOFTWARE WILL FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED.

If you have any questions concerning this license, contact Dr. Christoph Reinhart, National Research Council, Montreal Road, Ottawa, Ontario, K1A 0R6, Canada.

BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE YOU ARE INDICATING YOUR ACCEPTANCE OF THE TERMS AND CONDITIONS HEREIN.

RADIANCE 5.0

The Radiance Software License, Version 1.0

Copyright (c) 1990 - 2015 The Regents of the University of California, through Lawrence Berkeley National Laboratory. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment:

    "This product includes Radiance software (http://radsite.lbl.gov/) developed by the Lawrence Berkeley National Laboratory (http://www.lbl.gov/)."

    Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear.

  4. The names "Radiance," "Lawrence Berkeley National Laboratory" and "The Regents of the University of California" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [email protected].

  5. Products derived from this software may not be called "Radiance", nor may "Radiance" appear in their name, without prior written permission of Lawrence Berkeley National Laboratory.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This software consists of voluntary contributions made by many individuals on behalf of Lawrence Berkeley National Laboratory. For more information on Lawrence Berkeley National Laboratory, please see <http://www.lbl.gov/>.

EvalGlare 1.0

Evalglare Software License, Version 1.0

Copyright (c) 1995 - 2012 Fraunhofer ISE.

All rights reserved.

Redistribution and use in source and binary forms, WITHOUT modification, are permitted provided that the following all conditions are met:

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Fraunhofer ISE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

GenCumulativeSky

SOFTWARE END-USER BSD LICENSE AGREEMENT

Copyright (c) 2012, Darren Robinson and Andy Stone

All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

daysim's People

Contributors

gregungory avatar gmischler avatar rschregle avatar nljones avatar reyery avatar christophreinhart avatar

Stargazers

Guo Xiang avatar lllly avatar Nananan avatar Sergey Taramaly avatar Shih-Chi Liu avatar  avatar  avatar  avatar Amedeo Ceruti avatar  avatar  avatar Sylvain avatar  avatar  avatar ANDhitecture avatar  avatar  avatar Patrick Kastner avatar

Watchers

James Cloos avatar  avatar  avatar German Molina avatar Cody Rose avatar  avatar  avatar Alstan avatar  avatar  avatar Dave Nix avatar

daysim's Issues

windows compile

I'm trying to compile daysim with VisualStudio 2107. I compiled the project using 64 and 32 bits. The project compile correctly, but when I try to run it the progrmas crash.
If compiled using 64bit rtrace_dc crashes. I identified the problem in fropen.c line 259

while( sscanf( str + offset, "%s%n", token, &n ) == 1 ) {
offset+= n;
n= strlen( token );

when sscanf is called the value "&n" is not correctly read in (it should be the number of character read) so when it is colled again the value "offset" is an undefined high number and sscanf can't read the memory correctly. If compiled using 32 bit the code runs smootly, &n is correctly read and rtrace_dc runs smootly generating the daylight coefficients.
However when I run ds_illum.exe it crashes
the code crashes in file ds_illum.c line 298

/* alloc memory if dc file is given */
process_dc_shading(number_direct_coefficients);

with stack overflow error

Are there some compile issues I haven't taken into account?

Thanks

Linux install?

Hi, I'm interested in running daysim on linux for the purposes of putting it in a docker container. Very happy to contribute set up and image once done but was wondering how I should go about installing Daysim for linux (ubuntu preferably)? I've seen the question asked on forums and have seen some discussions about using linux to run some parametric studies but not seen any information concerning how to go about this. Any help much appreciated!

Antoine

how to compile rtrace_dc_2305?

Hello,

I am looking for information on how to compile rtrace_dc_2305.

I am running Daysim's gen_dc program with the -dds option and it is falling over because it cannot find rtrace_dc_2305. See https://github.com/MITSustainableDesignLab/Daysim/blob/master/src/daysim/gen_dc.c#L625

This project's README file says "Programs maintained here that require manual intervention to compile (in src/rt): rtrace_dc, rtrace_dc_2305"

I need to build rtrace_dc_2305 for Linux, is that possible? The README says 'Programs in this repository compile on Windows (VS2013) and Mac (XCode)'. Is it possible to compile them on Linux?

I have a slightly modified copy of Daysim 4.0 which allows building for Linux, and when I build it, it produces an executable for rtrace_dc, but not one for rtrace_dc_2305 (just like your version, it does not contain source code for rtrace_dc_2305).

Any information you may have that could help me figure out how to provide rtrace_dc_2305 to gen_dc (on Linux), will be greatly appreciated.

Thank you in advance for your help,

Philip Schwarz

P.S. to be more precise, when I say that gen_dc cannot find rtrace_dc_2305 I mean that gen_dc generates a file called static_system.dir-dir.ab0.dc cotaining the following command referencing rtrace_dc_2305:

# RADIANCE 4.1a; with Photon Map Extension 4.3.1, Daysim Extension
# /usr/local/bin/daysim-radiance/rtrace_dc_2305  -h -I+ -oc -aa 0.150000 -ab 0 -ad 256 -ar 32 -as 20 -dj 0.700000 -dr 0 -ds 0.000000 

When the command gets executed the following error occurs: sh: 1: /usr/local/bin/daysim-radiance/rtrace_dc_2305: not found

Cannot get Mac builds to run

Hi!

I'm part of the City Energy Analyst team. Our software uses Daysim for radiation calculations, but so far we only have builds for Windows and Linux. I've created Daysim builds on my Mac following the instructions in the README file (and some help from @nljones, #8).

For reference, our code first runs epw2wea, which seems to work as expected. Then we run radfiles2daysim, which produces the following warning: warning - in number_of_lines_in_file(): cannot open file. Not sure if this warning might have something to do with the problem... We then run gen_dc followed by ds_illum, which gives the following error:

IN CASE YOU ARE USING DAYSIM UNDER WINDOWS, THE "RAPYPATH" VARIALBE MIGHT NOT HAVE BEEN SET CORRECTLY. TO TEST THIS, OPEN A DOS PROMPT AND TYPE 'set'. AMONG THE VARIALBLES DISPLAYED SHOULD BE 'Raypath c:\Daysim\lib'.
PLEASE REFER TO THE DAYSIM TUTORIAL FOR MORE INFORMATION...fatal - file /var/folders/fj/jhstllfn1n9cmkpr9bnqypkc0000gq/T/cea_radiation/projects/chunk_0/chunk_0.dc does not contain any uncommented lines

I checked the RAYPATH and it seems to be set correctly. The dc file does appear to be missing all lines compared to the file generated on a Windows computer (see attached). I compared the hea file on my Mac and on a Windows system and they essentially look the same. I tried checking whether this was a problem with the binaries by using the same files generated on a Windows computer and manually editing the paths they included so they would match the path on my Mac. After running ds_illum with thesei input files I get a different error:

fatal - the number of daylight coefficients in file /Users/martin/Downloads/cea_radiation_2/projects/chunk_0/chunk_0.dc is 214 and should be 213 according to the latitude given in the header file

I am unfortunately not sure what each of these scripts does, so I am not sure how to test this any further. Do you have any advice on whether this is a binary problem or some other kind of issue?
chunk_0_hea_mac.txt
chunk_0_hea_win.txt
chunk_0_dc_mac.txt
chunk_0_dc_win.txt

Installing error

Hi, I have cloned the repo and tried to configure using CMake. Unfortunately, I get the following error:

CMake Error at CMakeLists.txt:8 (project): Failed to run MSBuild command: MSBuild.exe to get the value of VCTargetsPath: Impossible to find the specified file Configuring incomplete, errors occurred!

Maybe is because VisualStudio is missing?
Can you please tell us all the software requirements the program needs to compile?

Thank you in advance
Andrea

rtrace_dc

I am trying to compile Daysim on windows, I followed the instructions and the project compiles without errors. However, when I run rtrace under bin/Debug it doesn't understands option -L introduced in Daysim, so I suspect I'm running a RADIANCE version. I tried to compile with option -DDAYSIM but in this case I obtain a number of errors about unsatisfied symbols.
Have I to complete some additional configuration?
Thankyou
Marco

install files

I'm sorry, I inadvertently closed my previous issue. I solved the link problems by adding “daysim.c” to src/rt/CmaleLists.txt it appeared the file was not compiled at all, so the references to routines were missing and errors at link time issued.
I have an additional question to formulate, how I install the programs in the desired location, in my case “Program Files”/DAYSIM ? Is there the corresponding action of a Linux “make install”?
Thanks

Issue running ds_illum

Hi,

I have been having some issues with running ds_illum command on windows. I think it has something to do with the way I am naming my files. The error I get is that ds_illum just crashes.

I have dumped the files here, the top folder works and the one underneath does not. I have made parametric run of 800 odd options and only the folders ending in "HorizontalShade_0" seem to work. Any clues as to what might be causing this issue?

Cheers,

Antoine

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.