diff --git a/docs/tutorials/1 - Fixed Tilt Yearly Results.ipynb b/docs/tutorials/1 - Fixed Tilt Yearly Results.ipynb index 1c950d97..b2adf4e8 100644 --- a/docs/tutorials/1 - Fixed Tilt Yearly Results.ipynb +++ b/docs/tutorials/1 - Fixed Tilt Yearly Results.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -10,9 +10,9 @@ "output_type": "stream", "text": [ "Working on a Windows 10\n", - "Python version 3.11.7 | packaged by Anaconda, Inc. | (main, Dec 15 2023, 18:05:47) [MSC v.1916 64 bit (AMD64)]\n", - "Pandas version 2.1.4\n", - "bifacial_radiance version 0+untagged.1553.g23d2640.dirty\n" + "Python version 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)]\n", + "Pandas version 1.5.3\n", + "bifacial_radiance version 0.4.4.dev\n" ] } ], @@ -95,14 +95,14 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Your simulation will be stored in C:\\Users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\TEMP\\Tutorial_01\n" + "Your simulation will be stored in C:\\Users\\cdeline\\Documents\\Python Scripts\\Bifacial_Radiance\\bifacial_radiance\\TEMP\\Tutorial_01\n" ] } ], @@ -130,7 +130,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -158,20 +158,14 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "path = C:\\Users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\TEMP\\Tutorial_01\n", - "Making path: images\n", - "Making path: objects\n", - "Making path: results\n", - "Making path: skies\n", - "Making path: EPWs\n", - "Making path: materials\n" + "path = C:\\Users\\cdeline\\Documents\\Python Scripts\\Bifacial_Radiance\\bifacial_radiance\\TEMP\\Tutorial_01\n" ] } ], @@ -213,7 +207,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -240,7 +234,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -275,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -303,7 +297,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -341,7 +335,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -400,7 +394,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -410,7 +404,9 @@ "\n", "Module Name: test-module\n", "Module test-module updated in module.json\n", - "{'x': 1.695, 'y': 0.984, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.705, 'sceney': 0.984, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black test-module 1.695 0.984 0.02 | xform -t -0.8475 -0.492 0 -a 1 -t 0 0.984 0', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}\n" + "Pre-existing .rad file objects\\test-module.rad will be overwritten\n", + "\n", + " : {'x': 1.695, 'y': 0.984, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.705, 'sceney': 0.984, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black test-module 1.695 0.984 0.02 | xform -t -0.8475 -0.492 0 -a 1 -t 0 0.984 0', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}\n" ] } ], @@ -430,7 +426,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -466,7 +462,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -483,7 +479,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -510,7 +506,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -535,7 +531,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -543,10 +539,10 @@ "text/plain": [ "['materials\\\\ground.rad',\n", " 'skies\\\\cumulative.rad',\n", - " 'objects\\\\test-module_C_0.20000_rtr_3.00000_tilt_10.00000_20modsx7rows_origin0,0.rad']" + " 'objects\\\\test-module_C_0.20_rtr_3.00_tilt_10_20modsx7rows_origin0,0.rad']" ] }, - "execution_count": 14, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -581,7 +577,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -598,7 +594,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -618,7 +614,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -645,7 +641,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -683,141 +679,141 @@ " \n", " \n", " 0\n", - " 4.791638e-17\n", - " -0.391267\n", - " 0.237768\n", - " 0.216102\n", + " 0.0\n", + " -0.391\n", + " 0.238\n", + " 0.216\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1630504.0\n", - " 458830.5\n", - " 0.281404\n", + " 1630394.0\n", + " 435239.3\n", + " 0.267\n", " \n", " \n", " 1\n", - " 3.604893e-17\n", - " -0.294362\n", - " 0.254855\n", - " 0.233189\n", + " 0.0\n", + " -0.294\n", + " 0.255\n", + " 0.233\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1630508.0\n", - " 333521.6\n", - " 0.204551\n", + " 1630987.0\n", + " 330362.8\n", + " 0.203\n", " \n", " \n", " 2\n", - " 2.418148e-17\n", - " -0.197457\n", - " 0.271942\n", - " 0.250276\n", + " 0.0\n", + " -0.197\n", + " 0.272\n", + " 0.250\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1630530.0\n", - " 257268.7\n", - " 0.157782\n", + " 1631598.0\n", + " 260892.0\n", + " 0.160\n", " \n", " \n", " 3\n", - " 1.231403e-17\n", - " -0.100552\n", - " 0.289029\n", - " 0.267363\n", + " 0.0\n", + " -0.101\n", + " 0.289\n", + " 0.267\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1630552.0\n", - " 214210.7\n", - " 0.131373\n", + " 1632208.0\n", + " 218605.1\n", + " 0.134\n", " \n", " \n", " 4\n", - " 4.465811e-19\n", - " -0.003647\n", - " 0.306116\n", - " 0.284450\n", + " 0.0\n", + " -0.004\n", + " 0.306\n", + " 0.284\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1630574.0\n", - " 201831.5\n", - " 0.123779\n", + " 1632819.0\n", + " 206471.0\n", + " 0.126\n", " \n", " \n", " 5\n", - " -1.142087e-17\n", - " 0.093258\n", - " 0.323203\n", - " 0.301537\n", + " -0.0\n", + " 0.093\n", + " 0.323\n", + " 0.302\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1630597.0\n", - " 207844.9\n", - " 0.127466\n", + " 1633430.0\n", + " 212833.6\n", + " 0.130\n", " \n", " \n", " 6\n", - " -2.328832e-17\n", - " 0.190164\n", - " 0.340290\n", - " 0.318624\n", + " -0.0\n", + " 0.190\n", + " 0.340\n", + " 0.319\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1630619.0\n", - " 229892.0\n", - " 0.140984\n", + " 1634041.0\n", + " 233727.4\n", + " 0.143\n", " \n", " \n", " 7\n", - " -3.515577e-17\n", - " 0.287069\n", - " 0.357377\n", - " 0.335711\n", + " -0.0\n", + " 0.287\n", + " 0.357\n", + " 0.336\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1630641.0\n", - " 273866.3\n", - " 0.167950\n", + " 1635704.0\n", + " 277579.4\n", + " 0.170\n", " \n", " \n", " 8\n", - " -4.702322e-17\n", - " 0.383974\n", - " 0.374464\n", - " 0.352798\n", + " -0.0\n", + " 0.384\n", + " 0.374\n", + " 0.353\n", " a9.3.a0.test-module.6457\n", " a9.3.a0.test-module.2310\n", - " 1639338.0\n", - " 328478.5\n", - " 0.200373\n", + " 1635450.0\n", + " 327750.6\n", + " 0.200\n", " \n", " \n", "\n", "" ], "text/plain": [ - " x y z rearZ mattype \\\n", - "0 4.791638e-17 -0.391267 0.237768 0.216102 a9.3.a0.test-module.6457 \n", - "1 3.604893e-17 -0.294362 0.254855 0.233189 a9.3.a0.test-module.6457 \n", - "2 2.418148e-17 -0.197457 0.271942 0.250276 a9.3.a0.test-module.6457 \n", - "3 1.231403e-17 -0.100552 0.289029 0.267363 a9.3.a0.test-module.6457 \n", - "4 4.465811e-19 -0.003647 0.306116 0.284450 a9.3.a0.test-module.6457 \n", - "5 -1.142087e-17 0.093258 0.323203 0.301537 a9.3.a0.test-module.6457 \n", - "6 -2.328832e-17 0.190164 0.340290 0.318624 a9.3.a0.test-module.6457 \n", - "7 -3.515577e-17 0.287069 0.357377 0.335711 a9.3.a0.test-module.6457 \n", - "8 -4.702322e-17 0.383974 0.374464 0.352798 a9.3.a0.test-module.6457 \n", + " x y z rearZ mattype \\\n", + "0 0.0 -0.391 0.238 0.216 a9.3.a0.test-module.6457 \n", + "1 0.0 -0.294 0.255 0.233 a9.3.a0.test-module.6457 \n", + "2 0.0 -0.197 0.272 0.250 a9.3.a0.test-module.6457 \n", + "3 0.0 -0.101 0.289 0.267 a9.3.a0.test-module.6457 \n", + "4 0.0 -0.004 0.306 0.284 a9.3.a0.test-module.6457 \n", + "5 -0.0 0.093 0.323 0.302 a9.3.a0.test-module.6457 \n", + "6 -0.0 0.190 0.340 0.319 a9.3.a0.test-module.6457 \n", + "7 -0.0 0.287 0.357 0.336 a9.3.a0.test-module.6457 \n", + "8 -0.0 0.384 0.374 0.353 a9.3.a0.test-module.6457 \n", "\n", " rearMat Wm2Front Wm2Back Back/FrontRatio \n", - "0 a9.3.a0.test-module.2310 1630504.0 458830.5 0.281404 \n", - "1 a9.3.a0.test-module.2310 1630508.0 333521.6 0.204551 \n", - "2 a9.3.a0.test-module.2310 1630530.0 257268.7 0.157782 \n", - "3 a9.3.a0.test-module.2310 1630552.0 214210.7 0.131373 \n", - "4 a9.3.a0.test-module.2310 1630574.0 201831.5 0.123779 \n", - "5 a9.3.a0.test-module.2310 1630597.0 207844.9 0.127466 \n", - "6 a9.3.a0.test-module.2310 1630619.0 229892.0 0.140984 \n", - "7 a9.3.a0.test-module.2310 1630641.0 273866.3 0.167950 \n", - "8 a9.3.a0.test-module.2310 1639338.0 328478.5 0.200373 " + "0 a9.3.a0.test-module.2310 1630394.0 435239.3 0.267 \n", + "1 a9.3.a0.test-module.2310 1630987.0 330362.8 0.203 \n", + "2 a9.3.a0.test-module.2310 1631598.0 260892.0 0.160 \n", + "3 a9.3.a0.test-module.2310 1632208.0 218605.1 0.134 \n", + "4 a9.3.a0.test-module.2310 1632819.0 206471.0 0.126 \n", + "5 a9.3.a0.test-module.2310 1633430.0 212833.6 0.130 \n", + "6 a9.3.a0.test-module.2310 1634041.0 233727.4 0.143 \n", + "7 a9.3.a0.test-module.2310 1635704.0 277579.4 0.170 \n", + "8 a9.3.a0.test-module.2310 1635450.0 327750.6 0.200 " ] }, - "execution_count": 18, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -840,7 +836,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -983,7 +979,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.9.13" } }, "nbformat": 4, diff --git a/docs/tutorials/1 - Fixed Tilt Yearly Results.py b/docs/tutorials/1 - Fixed Tilt Yearly Results.py index 779404da..f1524af8 100644 --- a/docs/tutorials/1 - Fixed Tilt Yearly Results.py +++ b/docs/tutorials/1 - Fixed Tilt Yearly Results.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# In[2]: +# In[1]: # This information helps with debugging and getting support :) @@ -67,7 +67,7 @@ # # -# In[1]: +# In[2]: import os @@ -86,7 +86,7 @@ # This will load bifacial_radiance and other libraries from python that will be useful for this Jupyter Journal: -# In[2]: +# In[3]: try: @@ -101,7 +101,7 @@ # ## 2. Create a Radiance Object -# In[3]: +# In[4]: # Create a RadianceObj 'object' named bifacial_example. no whitespace allowed @@ -119,7 +119,7 @@ # To see more options of ground materials available (located on ground.rad), run this function without any input. -# In[4]: +# In[5]: # Input albedo number or material name like 'concrete'. @@ -128,7 +128,7 @@ # If a number between 0 and 1 is passed, it assumes it's an albedo value. For this example, we want a high-reflectivity rooftop albedo surface, so we will set the albedo to 0.62 -# In[5]: +# In[6]: albedo = 0.62 @@ -141,7 +141,7 @@ # # There are various options provided in bifacial_radiance to load weatherfiles. getEPW is useful because you just set the latitude and longitude of the location and it donwloads the meteorologicla data for any location. -# In[6]: +# In[7]: # Pull in meteorological data using pyEPW for any global lat/lon @@ -152,7 +152,7 @@ # # To load the data, use readWeatherFile. This reads EPWs, TMY meterological data, or even your own data as long as it follows TMY data format (With any time resoultion). -# In[7]: +# In[8]: # Read in the weather data pulled in above. @@ -167,7 +167,7 @@ # or using gencumulativesky to generate a cumulativesky for the entire year. # -# In[8]: +# In[9]: fullYear = True @@ -196,7 +196,8 @@ # # -# In[9]: +# In[10]: + module_type = 'test-module' @@ -206,7 +207,8 @@ # In case you want to use a pre-defined module or a module you've created previously, they are stored in a JSON format in data/module.json, and the options available can be called with printModules: -# In[10]: +# In[11]: + availableModules = demo.printModules() @@ -221,7 +223,8 @@ # Azimuth gets measured from N = 0, so for South facing modules azimuth should equal 180 degrees # -# In[11]: +# In[12]: + sceneDict = {'tilt':10,'pitch':3,'clearance_height':0.2,'azimuth':180, 'nMods': 20, 'nRows': 7} @@ -229,7 +232,8 @@ # To make the scene we have to create a Scene Object through the method makeScene. This method will create a .rad file in the objects folder, with the parameters specified in sceneDict and the module created above. You can alternatively pass a string with the name of the `moduletype`. -# In[12]: +# In[13]: + scene = demo.makeScene(module,sceneDict) @@ -242,7 +246,8 @@ # Radiance requires an "Oct" file that combines the ground, sky and the scene object into it. # The method makeOct does this for us. -# In[13]: +# In[14]: + octfile = demo.makeOct(demo.getfilelist()) @@ -250,7 +255,8 @@ # To see what files got merged into the octfile, you can use the helper method getfilelist. This is useful for advanced simulations too, specially when you want to have different Scene objects in the same simulation, or if you want to add other custom elements to your scene (like a building, for example) -# In[14]: +# In[15]: + demo.getfilelist() @@ -265,7 +271,8 @@ # First let's create the Analysis Object -# In[15]: +# In[16]: + analysis = AnalysisObj(octfile, demo.basename) @@ -273,7 +280,8 @@ # Then let's specify the sensor location. If no parameters are passed to moduleAnalysis, it will scan the center module of the center row: -# In[16]: +# In[17]: + frontscan, backscan = analysis.moduleAnalysis(scene) @@ -284,7 +292,8 @@ # ![Simple example for south facing module](../images_wiki/Journal1Pics/frontscan_backscan.png) # Analysis saves the measured irradiances in the front and in the back on the results folder. Prints out the ratio of the average of the rear and front irradiance values along a chord of the module. -# In[17]: +# In[18]: + results = analysis.analysis(octfile, demo.basename, frontscan, backscan) @@ -292,7 +301,8 @@ # The results are also automatically saved in the results folder. Some of our input/output functions can be used to read the results and work with them, for example: -# In[18]: +# In[19]: + load.read1Result('results\irr_tutorial_1.csv') @@ -304,7 +314,8 @@ # # Assuming that our module has a bifaciality factor (rear to front performance) of 90%, our bifacial gain is of: -# In[19]: +# In[20]: + bifacialityfactor = 0.9 @@ -323,6 +334,7 @@ # In[20]: + ## Comment the ! line below to run rvu from the Jupyter notebook instead of your terminal. ## Simulation will stop until you close the rvu window @@ -338,6 +350,7 @@ # In[21]: + ## Comment the line below to run rvu from the Jupyter notebook instead of your terminal. ## Simulation will stop until you close the rvu window diff --git a/docs/tutorials/11 - AgriPV Systems.py b/docs/tutorials/11 - AgriPV Systems.py index 050585f2..18d18359 100644 --- a/docs/tutorials/11 - AgriPV Systems.py +++ b/docs/tutorials/11 - AgriPV Systems.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# In[ ]: +# In[1]: # This information helps with debugging and getting support :) @@ -56,7 +56,7 @@ # # The magic is that, for doing the carport we see in the figure, we are going to do a 4-up configuration of modules (**numpanels**), and we are going to repeat that 3-UP 6 times (**nMods**) -# In[1]: +# In[2]: import os @@ -70,7 +70,7 @@ print ("Your simulation will be stored in %s" % testfolder) -# In[2]: +# In[3]: from bifacial_radiance import * @@ -78,7 +78,7 @@ import pandas as pd -# In[3]: +# In[4]: simulationname = 'tutorial_11' @@ -147,7 +147,8 @@ # # ***rvu -vf views\front.vp -e .01 tutorial_11.oct*** -# In[4]: +# In[5]: + ## Comment the ! line below to run rvu from the Jupyter notebook instead of your terminal. @@ -168,7 +169,7 @@ # # Positions of the piles could be done more programatically, but they are kinda estimated at the moment. -# In[5]: +# In[7]: torquetubelength = module.scenex*(nMods) @@ -192,7 +193,7 @@ demo.appendtoScene(radfile=scene.radfiles, customObject=customObject, text="!xform -rz 0") -# In[6]: +# In[8]: name='Pile' @@ -220,7 +221,8 @@ # # -# In[7]: +# In[9]: + ## Comment the ! line below to run rvu from the Jupyter notebook instead of your terminal. @@ -240,7 +242,7 @@ # # We are also increasign the number of points sampled accross the collector width, with the variable **sensorsy** passed to **moduleanalysis**. We are also increasing the step between sampling points, to be able to sample in between the rows. -# In[8]: +# In[10]: analysis = AnalysisObj(octfile, demo.name) @@ -248,13 +250,13 @@ frontscan, backscan = analysis.moduleAnalysis(scene, sensorsy=sensorsy) -# In[9]: +# In[11]: groundscan = frontscan -# In[10]: +# In[12]: groundscan['zstart'] = 0.05 # setting it 5 cm from the ground. @@ -263,7 +265,7 @@ groundscan -# In[11]: +# In[13]: analysis.analysis(octfile, simulationname+"_groundscan", groundscan, backscan) # compare the back vs front irradiance @@ -281,13 +283,13 @@ # ![AgriPV modeled step 4](../images_wiki/AdvancedJournals/spacing_between_modules.PNG) -# In[12]: +# In[14]: import seaborn as sns -# In[13]: +# In[ ]: sensorsx = 20 @@ -306,7 +308,7 @@ # Read all the files generated into one dataframe -# In[14]: +# In[ ]: filestarter = "irr_tutorial_11_groundscan_" @@ -347,21 +349,21 @@ # Creating a new dataframe where each element in the front irradiance list is a column. Also transpose and reverse so it looks like a top-down view of the ground. -# In[15]: +# In[ ]: df3 = pd.DataFrame(resultsdf['br_Wm2Front'].to_list()) reversed_df = df3.T.iloc[::-1] -# In[16]: +# In[ ]: sns.set(rc={'figure.figsize':(11.7,8.27)}) print(sns) -# In[17]: +# In[ ]: # Plot @@ -381,7 +383,7 @@ # # -# In[18]: +# In[ ]: name='Center_Grass' diff --git a/docs/tutorials/21 - Weather to Module Performance.ipynb b/docs/tutorials/21 - Weather to Module Performance.ipynb index 906000da..bc961476 100644 --- a/docs/tutorials/21 - Weather to Module Performance.ipynb +++ b/docs/tutorials/21 - Weather to Module Performance.ipynb @@ -11,9 +11,9 @@ "output_type": "stream", "text": [ "Working on a Windows 10\n", - "Python version 3.11.7 | packaged by Anaconda, Inc. | (main, Dec 15 2023, 18:05:47) [MSC v.1916 64 bit (AMD64)]\n", - "Pandas version 2.1.4\n", - "bifacial_radiance version 0+untagged.1554.g980a0b9.dirty\n" + "Python version 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)]\n", + "Pandas version 1.5.3\n", + "bifacial_radiance version 0.4.4.dev\n" ] } ], @@ -49,7 +49,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Your simulation will be stored in C:\\Users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\TEMP\\Tutorial_21\n" + "Your simulation will be stored in C:\\Users\\cdeline\\Documents\\Python Scripts\\Bifacial_Radiance\\bifacial_radiance\\TEMP\\Tutorial_21\n" ] } ], @@ -76,7 +76,7 @@ { "data": { "text/plain": [ - "'0+untagged.1554.g980a0b9.dirty'" + "'0.4.4.dev'" ] }, "execution_count": 3, @@ -103,7 +103,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "path = C:\\Users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\TEMP\\Tutorial_21\n", + "path = C:\\Users\\cdeline\\Documents\\Python Scripts\\Bifacial_Radiance\\bifacial_radiance\\TEMP\\Tutorial_21\n", "Getting weather file: USA_VA_Richmond.724010_TMY2.epw\n", " ... OK!\n", "8760 line in WeatherFile. Assuming this is a standard hourly WeatherFile for the year for purposes of saving Gencumulativesky temporary weather files in EPW folder.\n", @@ -131,11 +131,11 @@ "Linescan in process: 1axis_2021-01-13_1100_Front\n", "Linescan in process: 1axis_2021-01-13_1100_Back\n", "Saved: results\\irr_1axis_2021-01-13_1100.csv\n", - "Index: 2021-01-13_1100. Wm2Front: 255.36876666666663. Wm2Back: 45.574796666666664\n", + "Index: 2021-01-13_1100. Wm2Front: 254.41273333333334. Wm2Back: 45.27032666666667\n", "Linescan in process: 1axis_2021-01-13_1200_Front\n", "Linescan in process: 1axis_2021-01-13_1200_Back\n", "Saved: results\\irr_1axis_2021-01-13_1200.csv\n", - "Index: 2021-01-13_1200. Wm2Front: 254.47736666666665. Wm2Back: 43.65842333333333\n", + "Index: 2021-01-13_1200. Wm2Front: 252.79103333333333. Wm2Back: 43.35205333333334\n", "Saving a cumulative-results file in the main simulation folder.This adds up by sensor location the irradiance over all hours or configurations considered.\n", "Warning: This file saving routine does not clean results, so if your setup has ygaps, or 2+modules or torque tubes, doing a deeper cleaning and working with the individual results files in the results folder is highly suggested.\n", "\n", @@ -221,7 +221,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 7, "id": "7bbf6db6", "metadata": {}, "outputs": [ @@ -229,36 +229,16 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'2021-01-13_1100': {'surf_azm': 90.0, 'surf_tilt': 44.14, 'theta': -44.14, 'ghi': 211, 'dhi': 149, 'temp_air': 4.6, 'wind_speed': 3.8, 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-01-13_1100.rad', 'radfile': 'objects\\\\1axis2021-01-13_1100__C_0.80359_rtr_5.00000_tilt_44.14000_3modsx2rows_origin0,0.rad', 'scene': {'module': {'x': 1, 'y': 2, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.01, 'sceney': 2.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 0.9, 'text': '! genbox black test-module 1 2 0.02 | xform -t -0.5 -1.0 0 -a 1 -t 0 2.0 0', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}, 'modulefile': 'objects\\\\test-module.rad', 'hpc': False, 'name': 'Scene0', 'gcr': 0.4, 'text': '!xform -rx 44.14 -t 0 0 1.5 -a 3 -t 1.01 0 0 -a 2 -t 0 5 0 -i 1 -t -1.01 -0.0 0 -rz 90.0 -t 0 0 0 objects\\\\test-module.rad', 'radfiles': 'objects\\\\1axis2021-01-13_1100__C_0.80359_rtr_5.00000_tilt_44.14000_3modsx2rows_origin0,0.rad', 'sceneDict': {'tilt': 0, 'pitch': 5, 'clearance_height': 1.5, 'azimuth': 90.0, 'nMods': 3, 'nRows': 2, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0}}, 'octfile': '1axis_2021-01-13_1100.oct', 'AnalysisObj': {'octfile': '1axis_2021-01-13_1100.oct', 'name': '1axis_2021-01-13_1100', 'hpc': False, 'x': [0.3734448, 0.01462469, -0.3441954], 'y': [2.28669e-17, 8.955042e-19, -2.107589e-17], 'z': [1.166863, 1.51507, 1.863277], 'rearZ': [1.151075, 1.499282, 1.847489], 'mattype': ['a1.0.a0.test-module.6457', 'a1.0.a0.test-module.6457', 'a1.0.a0.test-module.6457'], 'rearMat': ['a1.0.a0.test-module.2310', 'a1.0.a0.test-module.2310', 'a1.0.a0.test-module.2310'], 'Wm2Front': [254.9108, 255.7401, 255.45539999999997], 'Wm2Back': [45.16279, 45.26495, 46.29665], 'Back/FrontRatio': [0.17717026045871553, 0.1769952111725491, 0.1812311220231711], 'backRatio': [0.17717026045871553, 0.1769952111725491, 0.1812311220231711], 'rearX': [0.3581237, -0.000696414, -0.3595166], 'rearY': [2.192875e-17, -4.264306e-20, -2.201404e-17]}, 'Wm2Front': [254.9108, 255.7401, 255.45539999999997], 'Wm2Back': [45.16279, 45.26495, 46.29665], 'backRatio': [0.17717026045871553, 0.1769952111725491, 0.1812311220231711]}, '2021-01-13_1200': {'surf_azm': 90.0, 'surf_tilt': 21.2, 'theta': -21.2, 'ghi': 249, 'dhi': 200, 'temp_air': 6.5, 'wind_speed': 3.9, 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-01-13_1200.rad', 'radfile': 'objects\\\\1axis2021-01-13_1200__C_1.13838_rtr_5.00000_tilt_21.20000_3modsx2rows_origin0,0.rad', 'scene': {'module': {'x': 1, 'y': 2, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.01, 'sceney': 2.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 0.9, 'text': '! genbox black test-module 1 2 0.02 | xform -t -0.5 -1.0 0 -a 1 -t 0 2.0 0', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}, 'modulefile': 'objects\\\\test-module.rad', 'hpc': False, 'name': 'Scene0', 'gcr': 0.4, 'text': '!xform -rx 21.2 -t 0 0 1.5 -a 3 -t 1.01 0 0 -a 2 -t 0 5 0 -i 1 -t -1.01 -0.0 0 -rz 90.0 -t 0 0 0 objects\\\\test-module.rad', 'radfiles': 'objects\\\\1axis2021-01-13_1200__C_1.13838_rtr_5.00000_tilt_21.20000_3modsx2rows_origin0,0.rad', 'sceneDict': {'tilt': 21.2, 'pitch': 5, 'clearance_height': 1.1383754299179079, 'azimuth': 90.0, 'nMods': 3, 'nRows': 2, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0}}, 'octfile': '1axis_2021-01-13_1200.oct', 'AnalysisObj': {'octfile': '1axis_2021-01-13_1200.oct', 'name': '1axis_2021-01-13_1200', 'hpc': False, 'x': [0.473756, 0.007594116, -0.4585678], 'y': [2.900919e-17, 4.650055e-19, -2.807918e-17], 'z': [1.338767, 1.519579, 1.700391], 'rearZ': [1.318255, 1.499068, 1.67988], 'mattype': ['a1.0.a0.test-module.6457', 'a1.0.a0.test-module.6457', 'a1.0.a0.test-module.6457'], 'rearMat': ['a1.0.a0.test-module.2310', 'a1.0.a0.test-module.2310', 'a1.0.a0.test-module.2310'], 'Wm2Front': [254.43140000000002, 254.5634, 254.43729999999996], 'Wm2Back': [43.32023999999999, 43.42238, 44.23265], 'Back/FrontRatio': [0.17026227791743498, 0.1705752257581971, 0.17384430724462474], 'backRatio': [0.17026227791743498, 0.1705752257581971, 0.17384430724462474], 'rearX': [0.4658003, -0.0003616246, -0.4665235], 'rearY': [2.852204e-17, -2.214312e-20, -2.856633e-17]}, 'Wm2Front': [254.43140000000002, 254.5634, 254.43729999999996], 'Wm2Back': [43.32023999999999, 43.42238, 44.23265], 'backRatio': [0.17026227791743498, 0.1705752257581971, 0.17384430724462474]}}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "c:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\performance.py:57: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n", - " alpha_sc=float(CECMod.alpha_sc),\n", - "c:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\performance.py:58: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n", - " a_ref=float(CECMod.a_ref),\n", - "c:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\performance.py:59: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n", - " I_L_ref=float(CECMod.I_L_ref),\n", - "c:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\performance.py:60: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n", - " I_o_ref=float(CECMod.I_o_ref),\n", - "c:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\performance.py:61: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n", - " R_sh_ref=float(CECMod.R_sh_ref),\n", - "c:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\performance.py:62: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n", - " R_s=float(CECMod.R_s),\n", - "c:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\performance.py:63: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead\n", - " Adjust=float(CECMod.Adjust)\n" + "{'2021-01-13_1100': {'surf_azm': 90.0, 'surf_tilt': 44.14, 'theta': -44.14, 'dni': 144, 'ghi': 211, 'dhi': 149, 'temp_air': 4.6, 'wind_speed': 3.8, 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-01-13_1100.rad', 'radfile': 'objects\\\\1axis2021-01-13_1100__C_0.80_rtr_5.00_tilt_44_3modsx2rows_origin0,0.rad', 'scene': : {'gcr': 0.4, 'hpc': False, 'module': : {'x': 1, 'y': 2, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.01, 'sceney': 2.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 0.9, 'text': '! genbox black test-module 1 2 0.02 | xform -t -0.5 -1.0 0 -a 1 -t 0 2.0 0', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-01-13_1100__C_0.80_rtr_5.00_tilt_44_3modsx2rows_origin0,0.rad', 'sceneDict': {'tilt': 0, 'azimuth': 90.0, 'pitch': 5, 'nMods': 3, 'nRows': 2, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': 1.5}, 'text': '!xform -rx 44.14 -t 0 0 1.5 -a 3 -t 1.01 0 0 -a 2 -t 0 5 0 -i 1 -t -1.01 -0.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}, 'octfile': '1axis_2021-01-13_1100.oct', 'AnalysisObj': : {'Back/FrontRatio': [0.176, 0.177, 0.181], 'Wm2Back': [44.704, 45.111, 45.996], 'Wm2Front': [254.061, 254.997, 254.18], 'backRatio': [0.176, 0.177, 0.181], 'hpc': False, 'mattype': ['a1.0.a0.test-module.6457', 'a1.0.a0.test-module.6457', 'a1.0.a0.test-module.6457'], 'name': '1axis_2021-01-13_1100', 'octfile': '1axis_2021-01-13_1100.oct', 'rearMat': ['a1.0.a0.test-module.2310', 'a1.0.a0.test-module.2310', 'a1.0.a0.test-module.2310'], 'rearX': [0.358, -0.001, -0.36], 'rearY': [0.0, -0.0, -0.0], 'rearZ': [1.151, 1.499, 1.847], 'x': [0.373, 0.015, -0.344], 'y': [0.0, 0.0, -0.0], 'z': [1.167, 1.515, 1.863]}, 'Wm2Front': [254.0611, 254.9967, 254.1804], 'Wm2Back': [44.704460000000005, 45.11092, 45.9956], 'backRatio': [0.1759587911774326, 0.17690716426069725, 0.1809558055782209]}, '2021-01-13_1200': {'surf_azm': 90.0, 'surf_tilt': 21.2, 'theta': -21.2, 'dni': 97, 'ghi': 249, 'dhi': 200, 'temp_air': 6.5, 'wind_speed': 3.9, 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-01-13_1200.rad', 'radfile': 'objects\\\\1axis2021-01-13_1200__C_1.14_rtr_5.00_tilt_21_3modsx2rows_origin0,0.rad', 'scene': : {'gcr': 0.4, 'hpc': False, 'module': : {'x': 1, 'y': 2, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.01, 'sceney': 2.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 0.9, 'text': '! genbox black test-module 1 2 0.02 | xform -t -0.5 -1.0 0 -a 1 -t 0 2.0 0', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-01-13_1200__C_1.14_rtr_5.00_tilt_21_3modsx2rows_origin0,0.rad', 'sceneDict': {'tilt': 21.2, 'azimuth': 90.0, 'pitch': 5, 'nMods': 3, 'nRows': 2, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': 1.5}, 'text': '!xform -rx 21.2 -t 0 0 1.5 -a 3 -t 1.01 0 0 -a 2 -t 0 5 0 -i 1 -t -1.01 -0.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}, 'octfile': '1axis_2021-01-13_1200.oct', 'AnalysisObj': : {'Back/FrontRatio': [0.171, 0.171, 0.173], 'Wm2Back': [43.126, 43.227, 43.703], 'Wm2Front': [252.608, 252.791, 252.974], 'backRatio': [0.171, 0.171, 0.173], 'hpc': False, 'mattype': ['a1.0.a0.test-module.6457', 'a1.0.a0.test-module.6457', 'a1.0.a0.test-module.6457'], 'name': '1axis_2021-01-13_1200', 'octfile': '1axis_2021-01-13_1200.oct', 'rearMat': ['a1.0.a0.test-module.2310', 'a1.0.a0.test-module.2310', 'a1.0.a0.test-module.2310'], 'rearX': [0.466, -0.0, -0.467], 'rearY': [0.0, -0.0, -0.0], 'rearZ': [1.318, 1.499, 1.68], 'x': [0.474, 0.008, -0.459], 'y': [0.0, 0.0, -0.0], 'z': [1.339, 1.52, 1.7]}, 'Wm2Front': [252.60800000000003, 252.7909, 252.9742], 'Wm2Back': [43.126380000000005, 43.22666, 43.70311999999999], 'backRatio': [0.17072384594373122, 0.17099701374925386, 0.17275653898089613]}}\n" ] }, { "data": { "text/plain": [ - "73.50428000429895" + "73.25703819145978" ] }, - "execution_count": 16, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -273,7 +253,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 8, "id": "fe18ea62", "metadata": {}, "outputs": [ @@ -327,58 +307,62 @@ " 2021-01-13_1100\n", " 149\n", " 211\n", - " [45.16279, 45.26495, 46.29665]\n", - " [254.9108, 255.7401, 255.45539999999997]\n", + " [44.704460000000005, 45.11092, 45.9956]\n", + " [254.0611, 254.9967, 254.1804]\n", " -44.14\n", " 44.14\n", " 90.0\n", " NaN\n", " NaN\n", " NaN\n", - " 45.574797\n", - " 255.368767\n", - " 0.160620\n", + " 45.270327\n", + " 254.412733\n", + " 0.160146\n", " \n", " \n", " 1\n", " 2021-01-13_1200\n", " 200\n", " 249\n", - " [43.32023999999999, 43.42238, 44.23265]\n", - " [254.43140000000002, 254.5634, 254.43729999999...\n", + " [43.126380000000005, 43.22666, 43.70311999999999]\n", + " [252.60800000000003, 252.7909, 252.9742]\n", " -21.20\n", " 21.20\n", " 90.0\n", " NaN\n", " NaN\n", " NaN\n", - " 43.658423\n", - " 254.477367\n", - " 0.154405\n", + " 43.352053\n", + " 252.791033\n", + " 0.154344\n", " \n", " \n", "\n", "" ], "text/plain": [ - " Unnamed: 0 dhi ghi Wm2Back \\\n", - "0 2021-01-13_1100 149 211 [45.16279, 45.26495, 46.29665] \n", - "1 2021-01-13_1200 200 249 [43.32023999999999, 43.42238, 44.23265] \n", + " Unnamed: 0 dhi ghi \\\n", + "0 2021-01-13_1100 149 211 \n", + "1 2021-01-13_1200 200 249 \n", + "\n", + " Wm2Back \\\n", + "0 [44.704460000000005, 45.11092, 45.9956] \n", + "1 [43.126380000000005, 43.22666, 43.70311999999999] \n", "\n", - " Wm2Front theta surf_tilt \\\n", - "0 [254.9108, 255.7401, 255.45539999999997] -44.14 44.14 \n", - "1 [254.43140000000002, 254.5634, 254.43729999999... -21.20 21.20 \n", + " Wm2Front theta surf_tilt surf_azm \\\n", + "0 [254.0611, 254.9967, 254.1804] -44.14 44.14 90.0 \n", + "1 [252.60800000000003, 252.7909, 252.9742] -21.20 21.20 90.0 \n", "\n", - " surf_azm clearance_height effective_irradiance Pout_module Wm2BackAvg \\\n", - "0 90.0 NaN NaN NaN 45.574797 \n", - "1 90.0 NaN NaN NaN 43.658423 \n", + " clearance_height effective_irradiance Pout_module Wm2BackAvg \\\n", + "0 NaN NaN NaN 45.270327 \n", + "1 NaN NaN NaN 43.352053 \n", "\n", " Wm2FrontAvg BifiRatio \n", - "0 255.368767 0.160620 \n", - "1 254.477367 0.154405 " + "0 254.412733 0.160146 \n", + "1 252.791033 0.154344 " ] }, - "execution_count": 17, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -387,6 +371,14 @@ "demo.exportTrackerDict(savefile=os.path.join('results','Final_Results.csv'),reindex=False)\n", "pd.read_csv(os.path.join('results','Final_Results.csv'))" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6c84aef5", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -405,7 +397,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.9.13" } }, "nbformat": 4, diff --git a/docs/tutorials/21 - Weather to Module Performance.py b/docs/tutorials/21 - Weather to Module Performance.py index 0ae93bfc..f8221a76 100644 --- a/docs/tutorials/21 - Weather to Module Performance.py +++ b/docs/tutorials/21 - Weather to Module Performance.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# In[2]: +# In[1]: # This information helps with debugging and getting support :) @@ -20,7 +20,7 @@ # This tutorial shows how to use the new function on bifacial_radiance calculatePerformanceModule performance, as well as how to find CEC Module parameters. # -# In[3]: +# In[2]: import os @@ -36,7 +36,7 @@ print ("Your simulation will be stored in %s" % testfolder) -# In[4]: +# In[3]: import bifacial_radiance @@ -47,7 +47,7 @@ bifacial_radiance.__version__ -# In[5]: +# In[4]: # Selecting only two times as examples @@ -67,7 +67,7 @@ # ## Geting a CEC Module -# In[ ]: +# In[5]: url = 'https://raw.githubusercontent.com/NREL/SAM/patch/deploy/libraries/CEC%20Modules.csv' @@ -78,7 +78,7 @@ # # Make sure you select only 1 module from the database -- sometimes there are similar names. -# In[ ]: +# In[6]: modfilter2 = db.index.str.startswith('SunPower') & db.index.str.endswith('SPR-E19-310-COM') @@ -89,16 +89,25 @@ # ## Calculating the Performance and Exporting the Results to a CSV -# In[ ]: +# In[7]: -demo.calculateResults(CECMod=CECMod) +print(trackerdict) +tracker_dict_sample = trackerdict['2021-01-13_1100'] +eff_irr = tracker_dict_sample['Wm2Front'] + tracker_dict_sample['Wm2Back'] +bifacial_radiance.performance.calculatePerformance(eff_irr[0],CECMod=CECMod) #calculatePerformanceModule -> calculcateResults() +# In[8]: + + +demo.exportTrackerDict(savefile=os.path.join('results','Final_Results.csv'),reindex=False) +pd.read_csv(os.path.join('results','Final_Results.csv')) + + # In[ ]: -#demo.exportTrackerDict(savefile=os.path.join('results','Final_Results.csv'),reindex=False) -#pd.read_csv(os.path.join('results','Final_Results.csv')) + diff --git a/docs/tutorials/4 - Debugging with Custom Objects.ipynb b/docs/tutorials/4 - Debugging with Custom Objects.ipynb index 66e2f250..93728b97 100644 --- a/docs/tutorials/4 - Debugging with Custom Objects.ipynb +++ b/docs/tutorials/4 - Debugging with Custom Objects.ipynb @@ -857,7 +857,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.9.13" } }, "nbformat": 4, diff --git a/docs/tutorials/4 - Debugging with Custom Objects.py b/docs/tutorials/4 - Debugging with Custom Objects.py index 7e11d24a..224d9435 100644 --- a/docs/tutorials/4 - Debugging with Custom Objects.py +++ b/docs/tutorials/4 - Debugging with Custom Objects.py @@ -188,6 +188,7 @@ # In[6]: + ## Comment the line below to run rvu from the Jupyter notebook instead of your terminal. ## Simulation will stop until you close the rvu window @@ -258,8 +259,7 @@ print('CORRECT Annual bifacial ratio average: %0.3f' %( clean_results['Wm2Back'].sum() / clean_results['Wm2Front'].sum() )) -print ("\n(If we had not done the cleaning routine, the bifacial ratio would have been ", \ - "calculated to %0.3f <-- THIS VALUE IS WRONG)" %( sum(analysis.Wm2Back) / sum(analysis.Wm2Front) )) +print ("\n(If we had not done the cleaning routine, the bifacial ratio would have been ", "calculated to %0.3f <-- THIS VALUE IS WRONG)" %( sum(analysis.Wm2Back) / sum(analysis.Wm2Front) )) # @@ -304,6 +304,7 @@ # In[15]: + ## Comment the line below to run rvu from the Jupyter notebook instead of your terminal. ## Simulation will stop until you close the rvu window diff --git a/docs/tutorials/SAT Reflectors Example.ipynb b/docs/tutorials/SAT Reflectors Example.ipynb index bd489e33..795fff0a 100644 --- a/docs/tutorials/SAT Reflectors Example.ipynb +++ b/docs/tutorials/SAT Reflectors Example.ipynb @@ -2,10 +2,21 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "4e0aa4be-9f97-44a7-bff8-4fedaf4c4179", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Working on a Windows 10\n", + "Python version 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)]\n", + "Pandas version 1.5.3\n", + "bifacial_radiance version 0.4.4.dev\n" + ] + } + ], "source": [ "# This information helps with debugging and getting support :)\n", "import sys, platform\n", @@ -36,7 +47,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "9e16eef3", "metadata": {}, "outputs": [], @@ -47,6 +58,7 @@ "import os\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", + "from pathlib import Path\n", "\n", "#Import bifacial radiance code \n", "try:\n", @@ -65,7 +77,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "2e309b9a", "metadata": {}, "outputs": [ @@ -73,6 +85,7 @@ "name": "stdout", "output_type": "stream", "text": [ + "Your simulation will be stored in C:\\Users\\cdeline\\Documents\\Python Scripts\\Bifacial_Radiance\\bifacial_radiance\\TEMP\\SAT_Reflectors_example\n", "1 modules selected. Name of 1st entry: LONGi Green Energy Technology Co. Ltd. LR6-60HIBD-305M\n", "305.52\n" ] @@ -80,12 +93,12 @@ ], "source": [ "# Define locations within file system\n", - "testfolder = Path().resolve().parent.parent / 'bifacial_radiance' / 'TEMP' / 'SAT_Reflectors_example'\n", + "test_folder = Path().resolve().parent.parent / 'bifacial_radiance' / 'TEMP' / 'SAT_Reflectors_example'\n", "\n", "# Another option using relative address; for some operative systems you might need '/' instead of '\\'\n", "# testfolder = os.path.abspath(r'..\\..\\bifacial_radiance\\TEMP') \n", "\n", - "print (\"Your simulation will be stored in %s\" % testfolder)\n", + "print (\"Your simulation will be stored in %s\" % test_folder)\n", "\n", "if not os.path.exists(test_folder):\n", " os.makedirs(test_folder) \n", @@ -3888,7 +3901,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.9.13" } }, "nbformat": 4, diff --git a/docs/tutorials/SAT Reflectors Example.py b/docs/tutorials/SAT Reflectors Example.py index 357ef69a..ad0f8c34 100644 --- a/docs/tutorials/SAT Reflectors Example.py +++ b/docs/tutorials/SAT Reflectors Example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# In[ ]: +# In[1]: # This information helps with debugging and getting support :) @@ -20,7 +20,7 @@ # # Load packages -# In[1]: +# In[2]: """alewis 2022""" @@ -29,6 +29,7 @@ import os import pandas as pd import matplotlib.pyplot as plt +from pathlib import Path #Import bifacial radiance code try: @@ -39,16 +40,16 @@ # # Inputs for location, PV system, reflectors, etc -# In[3]: +# In[4]: # Define locations within file system -testfolder = Path().resolve().parent.parent / 'bifacial_radiance' / 'TEMP' / 'SAT_Reflectors_example' +test_folder = Path().resolve().parent.parent / 'bifacial_radiance' / 'TEMP' / 'SAT_Reflectors_example' # Another option using relative address; for some operative systems you might need '/' instead of '\' # testfolder = os.path.abspath(r'..\..\bifacial_radiance\TEMP') -print ("Your simulation will be stored in %s" % testfolder) +print ("Your simulation will be stored in %s" % test_folder) if not os.path.exists(test_folder): os.makedirs(test_folder) diff --git a/setup.py b/setup.py index 0b3f99ac..312b5831 100644 --- a/setup.py +++ b/setup.py @@ -75,6 +75,7 @@ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], # What does your project relate to?