diff --git a/docs/sphinx/source/user_guide/installation.rst b/docs/sphinx/source/user_guide/installation.rst index 646f45f3..d1c11045 100644 --- a/docs/sphinx/source/user_guide/installation.rst +++ b/docs/sphinx/source/user_guide/installation.rst @@ -39,7 +39,7 @@ Linux/Mac OSX: 4. Make directories where you want to install radiance, for example ``~/.local/opt/radiance``. Some users have reported that the installer for MacOS isn't descriptive about where it installs, and they have an easier time just choosing a location by pressing the "Change Install Location..." button in the "Installation Type" stage of the install. Then they source it in the bash/zsh_profile like so:: export PATH=$HOME/bin/radiance/bin:$PATH - export RAYPATH=$HOME/bin/radiance/lib + export RAYPATH=.:$HOME/bin/radiance/lib export MANPATH=$HOME/bin/radiance/man export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/bin/radiance/lib export MDIR=$HOME/bin/radiance/lib diff --git a/docs/tutorials/3 - Single Axis Tracking Hourly.ipynb b/docs/tutorials/3 - Single Axis Tracking Hourly.ipynb index 7bdc365c..698864a7 100644 --- a/docs/tutorials/3 - Single Axis Tracking Hourly.ipynb +++ b/docs/tutorials/3 - Single Axis Tracking Hourly.ipynb @@ -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.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]\n", + "Pandas version 1.4.2\n", + "bifacial_radiance version 0.4.4.dev26+ge667a7c\n" ] } ], @@ -82,7 +82,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -111,7 +111,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -176,20 +176,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_03\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 = F:\\Documents\\Python Scripts\\bifacial_radiance\\bifacial_radiance\\TEMP\\Tutorial_03\n", "Loading albedo, 1 value(s), 0.213 avg\n", "1 nonzero albedo values.\n", "Getting weather file: USA_VA_Richmond.724010_TMY2.epw\n", @@ -235,7 +229,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -245,6 +239,8 @@ "\n", "Module Name: test-module\n", "Module test-module updated in module.json\n", + "Pre-existing .rad file objects\\test-module.rad will be overwritten\n", + "\n", "Module test-module updated in module.json\n", "Pre-existing .rad file objects\\test-module.rad will be overwritten\n", "\n", @@ -305,7 +301,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -314,7 +310,7 @@ "text": [ "The GCR is : 0.4284\n", "\n", - "ModuleObj data keys: ['x', 'y', 'z', 'modulematerial', 'scenex', 'sceney', 'scenez', 'numpanels', 'bifi', 'text', 'modulefile', 'glass', 'offsetfromaxis', 'xgap', 'ygap', 'zgap']\n" + "ModuleObj data keys: ['x', 'y', 'z', 'modulematerial', 'scenex', 'sceney', 'scenez', 'numpanels', 'bifi', 'text', 'modulefile', 'glass', 'glassEdge', 'offsetfromaxis', 'xgap', 'ygap', 'zgap']\n" ] } ], @@ -347,7 +343,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -357,7 +353,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": { "scrolled": true }, @@ -383,7 +379,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -391,6 +387,7 @@ "output_type": "stream", "text": [ "{'dhi': 200,\n", + " 'dni': 97,\n", " 'ghi': 249,\n", " 'surf_azm': 90.0,\n", " 'surf_tilt': 21.2,\n", @@ -432,7 +429,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -440,7 +437,7 @@ "output_type": "stream", "text": [ "Creating ~20 skyfiles. \n", - "Created 19 skyfiles in /skies/\n" + "Created 20 skyfiles in /skies/\n" ] } ], @@ -458,17 +455,18 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Trackerdict option of hours are: ['2021-01-13_0800', '2021-01-13_0900', '2021-01-13_1000', '2021-01-13_1100', '2021-01-13_1200', '2021-01-13_1300', '2021-01-13_1400', '2021-01-13_1500', '2021-01-13_1600', '2021-01-13_1700', '2021-01-14_0800', '2021-01-14_0900', '2021-01-14_1000', '2021-01-14_1100', '2021-01-14_1200', '2021-01-14_1300', '2021-01-14_1400', '2021-01-14_1500', '2021-01-14_1600']\n", + "Trackerdict option of hours are: ['2021-01-13_0800', '2021-01-13_0900', '2021-01-13_1000', '2021-01-13_1100', '2021-01-13_1200', '2021-01-13_1300', '2021-01-13_1400', '2021-01-13_1500', '2021-01-13_1600', '2021-01-13_1700', '2021-01-14_0800', '2021-01-14_0900', '2021-01-14_1000', '2021-01-14_1100', '2021-01-14_1200', '2021-01-14_1300', '2021-01-14_1400', '2021-01-14_1500', '2021-01-14_1600', '2021-01-14_1700']\n", "\n", "Contents of trackerdict for sample hour:\n", "{'dhi': 22,\n", + " 'dni': 13,\n", " 'ghi': 23,\n", " 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-01-13_0800.rad',\n", " 'surf_azm': 90.0,\n", @@ -505,7 +503,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -513,8 +511,8 @@ "output_type": "stream", "text": [ "\n", - "Making ~19 .rad files for gendaylit 1-axis workflow (this takes a minute..)\n", - "19 Radfiles created in /objects/\n" + "Making ~20 .rad files for gendaylit 1-axis workflow (this takes a minute..)\n", + "20 Radfiles created in /objects/\n" ] } ], @@ -535,7 +533,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -543,9 +541,10 @@ "output_type": "stream", "text": [ "{'dhi': 22,\n", + " 'dni': 13,\n", " 'ghi': 23,\n", - " 'radfile': 'objects\\\\1axis2021-01-13_0800__C_2.16680_rtr_10.00000_tilt_3.74000_20modsx7rows_origin0,0.rad',\n", - " 'scene': {'module': {'x': 1.036, 'y': 2.092, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.046, 'sceney': 4.284, 'scenez': 0.1, 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0.1 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020710678118654756 -0.05\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 45 -t 0 0 0\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 0\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 0 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'offsetfromaxis': 0.1, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'hpc': False, 'name': 'Scene0', 'gcr': 0.4284, 'text': '!xform -rx 3.74 -t 0 0 2.3 -a 20 -t 1.046 0 0 -a 7 -t 0 10 0 -i 1 -t -9.414 -30.0 0 -rz 90.0 -t 0 0 0 objects\\\\test-module.rad', 'radfiles': 'objects\\\\1axis2021-01-13_0800__C_2.16680_rtr_10.00000_tilt_3.74000_20modsx7rows_origin0,0.rad', 'sceneDict': {'tilt': 3.74, 'pitch': 10, 'clearance_height': 2.166802445305938, 'azimuth': 90.0, 'nMods': 20, 'nRows': 7, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0}},\n", + " 'radfile': 'objects\\\\1axis2021-01-13_0800__C_2.17_rtr_10.00_tilt_4_20modsx7rows_origin0,0.rad',\n", + " 'scene': : {'gcr': 0.4284, 'hpc': False, 'module': : {'x': 1.036, 'y': 2.092, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.046, 'sceney': 4.284, 'scenez': 0.1, 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0.1 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020710678118654756 -0.05\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 45 -t 0 0 0\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 0\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 0 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0.1, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-01-13_0800__C_2.17_rtr_10.00_tilt_4_20modsx7rows_origin0,0.rad', 'sceneDict': {'pitch': 10, 'nMods': 20, 'nRows': 7, 'tilt': 3.74, 'clearance_height': 2.166802445305938, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': 2.3}, 'text': '!xform -rx 3.74 -t 0 0 2.3 -a 20 -t 1.046 0 0 -a 7 -t 0 10 0 -i 1 -t -9.414 -30.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'},\n", " 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-01-13_0800.rad',\n", " 'surf_azm': 90.0,\n", " 'surf_tilt': 3.74,\n", @@ -561,7 +560,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -570,13 +569,14 @@ "text": [ "{'gcr': 0.4284,\n", " 'hpc': False,\n", - " 'module': {'x': 1.036, 'y': 2.092, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.046, 'sceney': 4.284, 'scenez': 0.1, 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0.1 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020710678118654756 -0.05\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 45 -t 0 0 0\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 0\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 0 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'offsetfromaxis': 0.1, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05},\n", + " 'module': : {'x': 1.036, 'y': 2.092, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.046, 'sceney': 4.284, 'scenez': 0.1, 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0.1 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020710678118654756 -0.05\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 45 -t 0 0 0\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 0\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 0 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0.1, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05},\n", " 'modulefile': 'objects\\\\test-module.rad',\n", " 'name': 'Scene0',\n", - " 'radfiles': 'objects\\\\1axis2021-01-13_1300__C_2.11102_rtr_10.00000_tilt_-5.31000_20modsx7rows_origin0,0.rad',\n", + " 'radfiles': 'objects\\\\1axis2021-01-13_1300__C_2.11_rtr_10.00_tilt_-5_20modsx7rows_origin0,0.rad',\n", " 'sceneDict': {'axis_tilt': 0,\n", " 'azimuth': 90.0,\n", " 'clearance_height': 2.111024390776987,\n", + " 'hub_height': 2.3,\n", " 'modulez': 0.02,\n", " 'nMods': 20,\n", " 'nRows': 7,\n", @@ -585,7 +585,7 @@ " 'pitch': 10,\n", " 'tilt': -5.31},\n", " 'text': '!xform -rx -5.31 -t 0 0 2.3 -a 20 -t 1.046 0 0 -a 7 -t 0 10 0 -i 1 '\n", - " '-t -9.414 -30.0 0 -rz 90.0 -t 0 0 0 objects\\\\test-module.rad'}\n" + " '-t -9.414 -30.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'}\n" ] } ], @@ -615,7 +615,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -640,7 +640,8 @@ " '2021-01-14_1300',\n", " '2021-01-14_1400',\n", " '2021-01-14_1500',\n", - " '2021-01-14_1600']\n" + " '2021-01-14_1600',\n", + " '2021-01-14_1700']\n" ] } ], @@ -650,7 +651,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -663,10 +664,10 @@ "Linescan in process: 1axis_2021-01-13_0800_Front\n", "Linescan in process: 1axis_2021-01-13_0800_Back\n", "Saved: results\\irr_1axis_2021-01-13_0800.csv\n", - "Index: 2021-01-13_0800. Wm2Front: 23.668689629629633. Wm2Back: 2.852139407407407\n", + "Index: 2021-01-13_0800. Wm2Front: 22.031865555555555. Wm2Back: 2.8434410000000003\n", "\n", "\n", - "Hourly bifi gain: 0.121\n" + "Hourly bifi gain: 0.129\n" ] } ], @@ -685,7 +686,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -694,39 +695,40 @@ "text": [ "\n", " Contents of trackerdict for sample hour after analysis1axis: \n", - "{'AnalysisObj': {'octfile': '1axis_2021-01-13_0800.oct', 'name': '1axis_2021-01-13_0800', 'hpc': False, 'x': [1.717843, 1.290356, 0.862868, 0.4353804, 0.007892705, -0.4195949, -0.8470826, -1.27457, -1.702058], 'y': [1.051876e-16, 7.90115e-17, 5.283543e-17, 2.665936e-17, 4.832888e-19, -2.569278e-17, -5.186885e-17, -7.804492e-17, -1.04221e-16], 'z': [2.308966, 2.33691, 2.364854, 2.392798, 2.420742, 2.448686, 2.47663, 2.504575, 2.532519], 'rearZ': [2.287013, 2.314957, 2.342901, 2.370845, 2.398789, 2.426733, 2.454677, 2.482621, 2.510566], 'mattype': ['a9.3.a2.2.0.cellPVmodule.6457', 'a9.3.a2.4.0.cellPVmodule.6457', 'a9.3.a2.7.0.cellPVmodule.6457', 'a9.3.a2.9.0.cellPVmodule.6457', 'a9.3.octtube1a.6457', 'a9.3.a2.2.1.cellPVmodule.6457', 'a9.3.a2.4.1.cellPVmodule.6457', 'a9.3.a2.7.1.cellPVmodule.6457', 'a9.3.a2.9.1.cellPVmodule.6457'], 'rearMat': ['a9.3.a2.2.0.cellPVmodule.2310', 'a9.3.a2.4.0.cellPVmodule.2310', 'a9.3.a2.7.0.cellPVmodule.2310', 'a9.3.a2.9.0.cellPVmodule.2310', 'sky', 'a9.3.a2.2.1.cellPVmodule.2310', 'a9.3.a2.4.1.cellPVmodule.2310', 'a9.3.a2.7.1.cellPVmodule.2310', 'a9.3.a2.9.1.cellPVmodule.2310'], 'Wm2Front': [23.83574333333333, 23.828326666666666, 23.82137333333333, 23.78804666666667, 22.498350000000002, 23.784796666666665, 23.783403333333336, 23.782006666666664, 23.89616], 'Wm2Back': [2.946991666666667, 2.9017486666666668, 2.844849333333333, 2.8094533333333334, 3.011173, 2.716148333333333, 2.7859856666666665, 2.816439666666667, 2.836465], 'Back/FrontRatio': [0.12363231106933933, 0.121772163656044, 0.11941922383328164, 0.11809860952813855, 0.13383377742023655, 0.11419202692250935, 0.1171349824345674, 0.11842235534559552, 0.11869464823435086], 'backRatio': [0.12363231106933933, 0.121772163656044, 0.11941922383328164, 0.11809860952813855, 0.13383377742023655, 0.11419202692250935, 0.1171349824345674, 0.11842235534559552, 0.11869464823435086], 'rearX': [1.716408, 1.288921, 0.861433, 0.4339453, 0.006457668, -0.42103, -0.8485176, -1.276005, -1.703493], 'rearY': [1.050997e-16, 7.892362e-17, 5.274756e-17, 2.657149e-17, 3.954181e-19, -2.578065e-17, -5.195672e-17, -7.813279e-17, -1.043089e-16]},\n", - " 'Wm2Back': [2.946991666666667,\n", - " 2.9017486666666668,\n", - " 2.844849333333333,\n", - " 2.8094533333333334,\n", - " 3.011173,\n", - " 2.716148333333333,\n", - " 2.7859856666666665,\n", - " 2.816439666666667,\n", - " 2.836465],\n", - " 'Wm2Front': [23.83574333333333,\n", - " 23.828326666666666,\n", - " 23.82137333333333,\n", - " 23.78804666666667,\n", - " 22.498350000000002,\n", - " 23.784796666666665,\n", - " 23.783403333333336,\n", - " 23.782006666666664,\n", - " 23.89616],\n", - " 'backRatio': [0.12363231106933933,\n", - " 0.121772163656044,\n", - " 0.11941922383328164,\n", - " 0.11809860952813855,\n", - " 0.13383377742023655,\n", - " 0.11419202692250935,\n", - " 0.1171349824345674,\n", - " 0.11842235534559552,\n", - " 0.11869464823435086],\n", + "{'AnalysisObj': : {'Back/FrontRatio': [0.125, 0.123, 0.121, 0.116, 0.342, 0.114, 0.118, 0.119, 0.119], 'Wm2Back': [2.952, 2.905, 2.858, 2.747, 2.991, 2.713, 2.783, 2.806, 2.835], 'Wm2Front': [23.698, 23.701, 23.704, 23.707, 8.734, 23.691, 23.671, 23.65, 23.73], 'backRatio': [0.125, 0.123, 0.121, 0.116, 0.342, 0.114, 0.118, 0.119, 0.119], 'hpc': False, 'mattype': ['a9.3.a2.2.0.cellPVmodule.6457', 'a9.3.a2.4.0.cellPVmodule.6457', 'a9.3.a2.7.0.cellPVmodule.6457', 'a9.3.a2.9.0.cellPVmodule.6457', 'a9.3.octtube1a.6457', 'a9.3.a2.2.1.cellPVmodule.6457', 'a9.3.a2.4.1.cellPVmodule.6457', 'a9.3.a2.7.1.cellPVmodule.6457', 'a9.3.a2.9.1.cellPVmodule.6457'], 'name': '1axis_2021-01-13_0800', 'octfile': '1axis_2021-01-13_0800.oct', 'rearMat': ['a9.3.a2.2.0.cellPVmodule.2310', 'a9.3.a2.4.0.cellPVmodule.2310', 'a9.3.a2.7.0.cellPVmodule.2310', 'a9.3.a2.9.0.cellPVmodule.2310', 'sky', 'a9.3.a2.2.1.cellPVmodule.2310', 'a9.3.a2.4.1.cellPVmodule.2310', 'a9.3.a2.7.1.cellPVmodule.2310', 'a9.3.a2.9.1.cellPVmodule.2310'], 'rearX': [1.716, 1.289, 0.861, 0.434, 0.006, -0.421, -0.849, -1.276, -1.703], 'rearY': [0.0, 0.0, 0.0, 0.0, 0.0, -0.0, -0.0, -0.0, -0.0], 'rearZ': [2.287, 2.315, 2.343, 2.371, 2.399, 2.427, 2.455, 2.483, 2.511], 'x': [1.718, 1.29, 0.863, 0.435, 0.008, -0.42, -0.847, -1.275, -1.702], 'y': [0.0, 0.0, 0.0, 0.0, 0.0, -0.0, -0.0, -0.0, -0.0], 'z': [2.309, 2.337, 2.365, 2.393, 2.421, 2.449, 2.477, 2.505, 2.533]},\n", + " 'Wm2Back': [2.9521646666666665,\n", + " 2.9053166666666663,\n", + " 2.8584650000000003,\n", + " 2.7471523333333336,\n", + " 2.990579,\n", + " 2.712588,\n", + " 2.7828603333333333,\n", + " 2.806359666666667,\n", + " 2.835483333333334],\n", + " 'Wm2Front': [23.697916666666668,\n", + " 23.701359999999998,\n", + " 23.704256666666666,\n", + " 23.707153333333334,\n", + " 8.73384,\n", + " 23.691203333333334,\n", + " 23.670986666666664,\n", + " 23.650043333333333,\n", + " 23.73003],\n", + " 'backRatio': [0.12456960409582715,\n", + " 0.12257499534504862,\n", + " 0.12058359207810027,\n", + " 0.11587373738935944,\n", + " 0.3423736439362369,\n", + " 0.11449285496311656,\n", + " 0.11755922189885204,\n", + " 0.11865690773613512,\n", + " 0.11948420836909876],\n", " 'dhi': 22,\n", + " 'dni': 13,\n", " 'ghi': 23,\n", " 'octfile': '1axis_2021-01-13_0800.oct',\n", - " 'radfile': 'objects\\\\1axis2021-01-13_0800__C_2.16680_rtr_10.00000_tilt_3.74000_20modsx7rows_origin0,0.rad',\n", - " 'scene': {'module': {'x': 1.036, 'y': 2.092, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.046, 'sceney': 4.284, 'scenez': 0.1, 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0.1 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020710678118654756 -0.05\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 45 -t 0 0 0\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 0\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 0 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'offsetfromaxis': 0.1, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'hpc': False, 'name': 'Scene0', 'gcr': 0.4284, 'text': '!xform -rx 3.74 -t 0 0 2.3 -a 20 -t 1.046 0 0 -a 7 -t 0 10 0 -i 1 -t -9.414 -30.0 0 -rz 90.0 -t 0 0 0 objects\\\\test-module.rad', 'radfiles': 'objects\\\\1axis2021-01-13_0800__C_2.16680_rtr_10.00000_tilt_3.74000_20modsx7rows_origin0,0.rad', 'sceneDict': {'tilt': 3.74, 'pitch': 10, 'clearance_height': 2.166802445305938, 'azimuth': 90.0, 'nMods': 20, 'nRows': 7, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0}},\n", + " 'radfile': 'objects\\\\1axis2021-01-13_0800__C_2.17_rtr_10.00_tilt_4_20modsx7rows_origin0,0.rad',\n", + " 'scene': : {'gcr': 0.4284, 'hpc': False, 'module': : {'x': 1.036, 'y': 2.092, 'z': 0.02, 'modulematerial': 'black', 'scenex': 1.046, 'sceney': 4.284, 'scenez': 0.1, 'numpanels': 2, 'bifi': 1, 'text': '! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -2.142 0.1 -a 6 -t 0.176 0 0 -a 12 -t 0 0.176 0 -a 2 -t 0 2.192 0\\r\\n! genbox black octtube1a 1.046 0.04142135623730951 0.1 | xform -t -0.523 -0.020710678118654756 -0.05\\r\\n! genbox black octtube1b 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 45 -t 0 0 0\\r\\n! genbox black octtube1c 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 90 -t 0 0 0\\r\\n! genbox black octtube1d 1.046 0.04142135623730951 0.1 | xform -t -0.445 -0.020710678118654756 -0.05 -rx 135 -t 0 0 0 ', 'modulefile': 'objects\\\\test-module.rad', 'glass': False, 'glassEdge': 0.01, 'offsetfromaxis': 0.1, 'xgap': 0.01, 'ygap': 0.1, 'zgap': 0.05}, 'modulefile': 'objects\\\\test-module.rad', 'name': 'Scene0', 'radfiles': 'objects\\\\1axis2021-01-13_0800__C_2.17_rtr_10.00_tilt_4_20modsx7rows_origin0,0.rad', 'sceneDict': {'pitch': 10, 'nMods': 20, 'nRows': 7, 'tilt': 3.74, 'azimuth': 90.0, 'modulez': 0.02, 'axis_tilt': 0, 'originx': 0, 'originy': 0, 'hub_height': 2.3}, 'text': '!xform -rx 3.74 -t 0 0 2.3 -a 20 -t 1.046 0 0 -a 7 -t 0 10 0 -i 1 -t -9.414 -30.0 0 -rz 90.0 -t 0 0 0 \"objects\\\\test-module.rad\"'},\n", " 'skyfile': 'skies\\\\sky2_37.5_-77.33_2021-01-13_0800.rad',\n", " 'surf_azm': 90.0,\n", " 'surf_tilt': 3.74,\n", @@ -743,49 +745,49 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'Back/FrontRatio': [0.12363231106933933,\n", - " 0.121772163656044,\n", - " 0.11941922383328164,\n", - " 0.11809860952813855,\n", - " 0.13383377742023655,\n", - " 0.11419202692250935,\n", - " 0.1171349824345674,\n", - " 0.11842235534559552,\n", - " 0.11869464823435086],\n", - " 'Wm2Back': [2.946991666666667,\n", - " 2.9017486666666668,\n", - " 2.844849333333333,\n", - " 2.8094533333333334,\n", - " 3.011173,\n", - " 2.716148333333333,\n", - " 2.7859856666666665,\n", - " 2.816439666666667,\n", - " 2.836465],\n", - " 'Wm2Front': [23.83574333333333,\n", - " 23.828326666666666,\n", - " 23.82137333333333,\n", - " 23.78804666666667,\n", - " 22.498350000000002,\n", - " 23.784796666666665,\n", - " 23.783403333333336,\n", - " 23.782006666666664,\n", - " 23.89616],\n", - " 'backRatio': [0.12363231106933933,\n", - " 0.121772163656044,\n", - " 0.11941922383328164,\n", - " 0.11809860952813855,\n", - " 0.13383377742023655,\n", - " 0.11419202692250935,\n", - " 0.1171349824345674,\n", - " 0.11842235534559552,\n", - " 0.11869464823435086],\n", + "{'Back/FrontRatio': [0.12456960409582715,\n", + " 0.12257499534504862,\n", + " 0.12058359207810027,\n", + " 0.11587373738935944,\n", + " 0.3423736439362369,\n", + " 0.11449285496311656,\n", + " 0.11755922189885204,\n", + " 0.11865690773613512,\n", + " 0.11948420836909876],\n", + " 'Wm2Back': [2.9521646666666665,\n", + " 2.9053166666666663,\n", + " 2.8584650000000003,\n", + " 2.7471523333333336,\n", + " 2.990579,\n", + " 2.712588,\n", + " 2.7828603333333333,\n", + " 2.806359666666667,\n", + " 2.835483333333334],\n", + " 'Wm2Front': [23.697916666666668,\n", + " 23.701359999999998,\n", + " 23.704256666666666,\n", + " 23.707153333333334,\n", + " 8.73384,\n", + " 23.691203333333334,\n", + " 23.670986666666664,\n", + " 23.650043333333333,\n", + " 23.73003],\n", + " 'backRatio': [0.12456960409582715,\n", + " 0.12257499534504862,\n", + " 0.12058359207810027,\n", + " 0.11587373738935944,\n", + " 0.3423736439362369,\n", + " 0.11449285496311656,\n", + " 0.11755922189885204,\n", + " 0.11865690773613512,\n", + " 0.11948420836909876],\n", " 'hpc': False,\n", " 'mattype': ['a9.3.a2.2.0.cellPVmodule.6457',\n", " 'a9.3.a2.4.0.cellPVmodule.6457',\n", @@ -891,7 +893,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -904,15 +906,15 @@ "Linescan in process: 1axis_2021-01-13_0900_Front\n", "Linescan in process: 1axis_2021-01-13_0900_Back\n", "Saved: results\\irr_1axis_2021-01-13_0900.csv\n", - "Index: 2021-01-13_0900. Wm2Front: 91.12639814814814. Wm2Back: 7.176910592592593\n", + "Index: 2021-01-13_0900. Wm2Front: 90.71207925925927. Wm2Back: 7.311606666666667\n", "\n", "Making 1 octfiles in root directory.\n", "Created 1axis_2021-01-13_1300.oct\n", "Linescan in process: 1axis_2021-01-13_1300_Front\n", "Linescan in process: 1axis_2021-01-13_1300_Back\n", "Saved: results\\irr_1axis_2021-01-13_1300.csv\n", - "Index: 2021-01-13_1300. Wm2Front: 220.1919074074074. Wm2Back: 30.963109629629628\n", - "Accumulated hourly bifi gain: 0.122\n" + "Index: 2021-01-13_1300. Wm2Front: 218.57952592592594. Wm2Back: 31.144505925925923\n", + "Accumulated hourly bifi gain: 0.125\n" ] } ], @@ -934,17 +936,17 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "array([37.65225867, 36.337783 , 35.020211 , 33.18810567, 84.651319 ,\n", - " 33.59815967, 34.87872467, 36.19012533, 37.41274967])" + "array([38.19587967, 36.623799 , 35.51701933, 33.34932667, 84.072514 ,\n", + " 34.02056333, 35.52583833, 36.623684 , 37.767358 ])" ] }, - "execution_count": 19, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -962,16 +964,16 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "0.14061874477675748" + "0.14248592494651324" ] }, - "execution_count": 20, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -1006,12 +1008,22 @@ "output_type": "stream", "text": [ "\n", - "Making 19 octfiles in root directory.\n", + "Making 20 octfiles in root directory.\n", "Created 1axis_2021-01-13_0800.oct\n", "Created 1axis_2021-01-13_0900.oct\n", "Created 1axis_2021-01-13_1000.oct\n", "Created 1axis_2021-01-13_1100.oct\n", - "Created 1axis_2021-01-13_1200.oct\n" + "Created 1axis_2021-01-13_1200.oct\n", + "Created 1axis_2021-01-13_1300.oct\n", + "Created 1axis_2021-01-13_1400.oct\n", + "Created 1axis_2021-01-13_1500.oct\n", + "Created 1axis_2021-01-13_1600.oct\n", + "Created 1axis_2021-01-13_1700.oct\n", + "Created 1axis_2021-01-14_0800.oct\n", + "Created 1axis_2021-01-14_0900.oct\n", + "Created 1axis_2021-01-14_1000.oct\n", + "Created 1axis_2021-01-14_1100.oct\n", + "Created 1axis_2021-01-14_1200.oct\n" ] } ], @@ -1107,11 +1119,11 @@ "epwfile = demo.getEPW(lat,lon) \n", "metdata = demo.readWeatherFile(epwfile, starttime=startdate, endtime=enddate) \n", "mymodule = bifacial_radiance.ModuleObj(name=moduletype, xgap=xgap, ygap=ygap, \n", - " zgap=zgap, numpanels=numpanels,cellModule=cellModuleParams, tubeParams=tubeParams)\n", - "sceneDict = {'pitch':pitch,'hub_height':hub_height, 'nMods': nMods, 'nRows': nRows} \n", - "demo.set1axis(limit_angle = limit_angle, backtrack = backtrack, gcr = gcr, cumulativesky = cumulativesky)\n", + " zgap=zgap, numpanels=numpanels, cellModule=cellModuleParams, tubeParams=tubeParams)\n", + "sceneDict = {'pitch':pitch, 'hub_height':hub_height, 'nMods': nMods, 'nRows':nRows} \n", + "demo.set1axis(limit_angle=limit_angle, backtrack=backtrack, gcr=gcr, cumulativesky=cumulativesky)\n", "demo.gendaylit1axis()\n", - "demo.makeScene1axis(module=mymodule,sceneDict=sceneDict) #makeScene creates a .rad file with 20 modules per row, 7 rows.\n", + "demo.makeScene1axis(module=mymodule, sceneDict=sceneDict) #makeScene creates a .rad file with 20 modules per row, 7 rows.\n", "demo.makeOct1axis()\n", "demo.analysis1axis()" ] @@ -1134,7 +1146,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.9.12" } }, "nbformat": 4, diff --git a/docs/tutorials/3 - Single Axis Tracking Hourly.py b/docs/tutorials/3 - Single Axis Tracking Hourly.py index dfac3e0f..4b2d3fee 100644 --- a/docs/tutorials/3 - Single Axis Tracking Hourly.py +++ b/docs/tutorials/3 - Single Axis Tracking Hourly.py @@ -52,7 +52,7 @@ # # So far we've used "from bifacial_radiance import *" to import all the bifacial_radiance files into our working space in jupyter. For this journal we will do a "import bifacial_radiance" . This method of importing requires a different call for some functions as you'll see below. For example, instead of calling demo = RadianceObj(path = testfolder) as on Tutorial 2, in this case we will neeed to do demo = bifacial_radiance.RadianceObj(path = testfolder). -# In[1]: +# In[2]: import bifacial_radiance @@ -68,7 +68,7 @@ # # Just like in the condensed version show at the end of Tutorial 2, for this tutorial we will be starting all of our system variables from the beginning of the jupyter journal, instead than throughout the different cells (for the most part) -# In[2]: +# In[3]: testfolder = Path().resolve().parent.parent / 'bifacial_radiance' / 'TEMP' / 'Tutorial_03' @@ -106,7 +106,6 @@ material = 'black' # Torque tube of this material (0% reflectivity) - # # ## 3. Create Radiance Object, Set Albedo and Weather @@ -120,7 +119,7 @@ # # We now constrain the days of our analysis in the readWeatherFile import step. For this example we are doing just two days in January. Format has to be a 'MM_DD' or 'YYYY-MM-DD_HHMM' -# In[3]: +# In[4]: demo = bifacial_radiance.RadianceObj(simulationName, path = str(testfolder)) # Adding a simulation name. This is optional. @@ -143,7 +142,7 @@ # Since we are making a cell-level module, the dimensions for x and y of the module will be calculated by the software -- dummy values can be initially passed just to get started, but these values are overwritten by addCellModule() # -# In[4]: +# In[5]: numcellsx = 6 @@ -180,7 +179,7 @@ # # Collector Width gets saved in your module parameters (and later on your scene and trackerdict) as "sceney". You can calculate your collector width with the equation, or you can use this method to know your GCR: -# In[5]: +# In[6]: # For more options on makemodule, see the help description of the function. @@ -199,14 +198,14 @@ # # For doing hourly simulations, remember to set **cumulativesky = False** here! -# In[6]: +# In[7]: trackerdict = demo.set1axis(metdata=metdata, limit_angle=limit_angle, backtrack=backtrack, gcr=gcr, cumulativesky=False) -# In[7]: +# In[8]: print ("Trackerdict created by set1axis: %s " % (len(demo.trackerdict))) @@ -215,7 +214,7 @@ # set1axis initializes the trackerdictionary Trackerdict. Trackerdict contains all hours selected from the weatherfile as keys. For example: trackerdict['2021-01-13_1200']. It is a return variable on many of the 1axis functions, but it is also stored inside of your Radiance Obj (i.e. demo.trackerdict). In this journal we are storing it as a variable to mute the option (otherwise it prints the returned trackerdict contents every time) # -# In[8]: +# In[9]: pprint.pprint(trackerdict['2021-01-13_1200']) @@ -232,7 +231,7 @@ # # For this example we are doing just two days in January. The ability to limit the time using gendaylit1axis is deprecated. Use readWeatherFile instead. -# In[9]: +# In[10]: trackerdict = demo.gendaylit1axis() @@ -241,7 +240,7 @@ # Since we passed startdate and enddate to gendaylit, it will prune our trackerdict to only the desired days. # Let's explore our trackerdict: -# In[10]: +# In[11]: trackerkeys = sorted(trackerdict.keys()) @@ -257,7 +256,7 @@ # # We can use gcr or pitch fo our scene dictionary. -# In[11]: +# In[12]: sceneDict = {'pitch': pitch,'hub_height':hub_height, 'nMods':nMods, 'nRows': nRows} @@ -269,13 +268,13 @@ # The scene parameteres are now stored in the trackerdict. To view them and to access them: # -# In[12]: +# In[13]: pprint.pprint(trackerdict[trackerkeys[0]]) -# In[13]: +# In[14]: pprint.pprint(demo.trackerdict[trackerkeys[5]]['scene'].__dict__) @@ -291,13 +290,13 @@ # # Options of hours: -# In[14]: +# In[15]: pprint.pprint(trackerkeys) -# In[15]: +# In[16]: demo.makeOct1axis(singleindex='2021-01-13_0800') @@ -307,14 +306,14 @@ # The trackerdict now contains information about the octfile, as well as the Analysis Object results -# In[16]: +# In[17]: print ("\n Contents of trackerdict for sample hour after analysis1axis: ") pprint.pprint(trackerdict[trackerkeys[0]]) -# In[17]: +# In[18]: pprint.pprint(trackerdict[trackerkeys[0]]['AnalysisObj'].__dict__) @@ -326,7 +325,7 @@ # You could do a list of indices following a similar procedure: -# In[18]: +# In[19]: for time in ['2021-01-13_0900','2021-01-13_1300']: @@ -339,7 +338,7 @@ # Note that the bifacial gain printed above is for the accumulated irradiance between the hours modeled so far. # That is, demo.Wm2Back and demo.Wm2Front are for January 13, 8AM, 9AM and 1 PM. Compare demo.Wm2back below with what we had before: -# In[19]: +# In[20]: demo.Wm2Back @@ -347,7 +346,7 @@ # To print the specific bifacial gain for a specific hour, you can use the following: -# In[20]: +# In[21]: sum(trackerdict['2021-01-13_1300']['AnalysisObj'].Wm2Back) / sum(trackerdict['2021-01-13_1300']['AnalysisObj'].Wm2Front) @@ -436,11 +435,11 @@ epwfile = demo.getEPW(lat,lon) metdata = demo.readWeatherFile(epwfile, starttime=startdate, endtime=enddate) mymodule = bifacial_radiance.ModuleObj(name=moduletype, xgap=xgap, ygap=ygap, - zgap=zgap, numpanels=numpanels,cellModule=cellModuleParams, tubeParams=tubeParams) -sceneDict = {'pitch':pitch,'hub_height':hub_height, 'nMods': nMods, 'nRows': nRows} -demo.set1axis(limit_angle = limit_angle, backtrack = backtrack, gcr = gcr, cumulativesky = cumulativesky) + zgap=zgap, numpanels=numpanels, cellModule=cellModuleParams, tubeParams=tubeParams) +sceneDict = {'pitch':pitch, 'hub_height':hub_height, 'nMods': nMods, 'nRows':nRows} +demo.set1axis(limit_angle=limit_angle, backtrack=backtrack, gcr=gcr, cumulativesky=cumulativesky) demo.gendaylit1axis() -demo.makeScene1axis(module=mymodule,sceneDict=sceneDict) #makeScene creates a .rad file with 20 modules per row, 7 rows. +demo.makeScene1axis(module=mymodule, sceneDict=sceneDict) #makeScene creates a .rad file with 20 modules per row, 7 rows. demo.makeOct1axis() demo.analysis1axis() diff --git a/docs/tutorials/8 - Electrical Mismatch Method.ipynb b/docs/tutorials/8 - Electrical Mismatch Method.ipynb index 4343d0ec..34ed8426 100644 --- a/docs/tutorials/8 - Electrical Mismatch Method.ipynb +++ b/docs/tutorials/8 - Electrical Mismatch Method.ipynb @@ -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.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]\n", + "Pandas version 1.4.2\n", + "bifacial_radiance version 0.4.4.dev26+ge667a7c\n" ] } ], @@ -75,20 +75,14 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "path = C:\\Users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\TEMP\\Tutorial_08\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 = F:\\Documents\\Python Scripts\\bifacial_radiance\\bifacial_radiance\\TEMP\\Tutorial_08\n", "Loading albedo, 1 value(s), 0.250 avg\n", "1 nonzero albedo values.\n", "Getting weather file: USA_VA_Richmond.724010_TMY2.epw\n", @@ -99,8 +93,8 @@ "Saving file EPWs\\metdata_temp.csv, # points: 8760\n", "Calculating Sun position for Metdata that is right-labeled with a delta of -30 mins. i.e. 12 is 11:30 sunpos\n", "\n", - "Module Name: test-module\n", - "Module test-module updated in module.json\n", + "Module Name: PVmodule\n", + "Module PVmodule updated in module.json\n", "Creating ~3 skyfiles. \n", "Created 3 skyfiles in /skies/\n", "\n", @@ -114,15 +108,15 @@ "Linescan in process: 1axis_2021-11-06_0800_Front\n", "Linescan in process: 1axis_2021-11-06_0800_Back\n", "Saved: results\\irr_1axis_2021-11-06_0800.csv\n", - "Index: 2021-11-06_0800. Wm2Front: 217.21925833333333. Wm2Back: 6.115893083333334\n", + "Index: 2021-11-06_0800. Wm2Front: 216.96855833333333. Wm2Back: 6.093165249999999\n", "Linescan in process: 1axis_2021-11-06_0900_Front\n", "Linescan in process: 1axis_2021-11-06_0900_Back\n", "Saved: results\\irr_1axis_2021-11-06_0900.csv\n", - "Index: 2021-11-06_0900. Wm2Front: 373.20349166666665. Wm2Back: 34.79393916666667\n", + "Index: 2021-11-06_0900. Wm2Front: 371.74485000000004. Wm2Back: 34.83021\n", "Linescan in process: 1axis_2021-11-06_1000_Front\n", "Linescan in process: 1axis_2021-11-06_1000_Back\n", "Saved: results\\irr_1axis_2021-11-06_1000.csv\n", - "Index: 2021-11-06_1000. Wm2Front: 337.41221666666667. Wm2Back: 40.40333416666667\n", + "Index: 2021-11-06_1000. Wm2Front: 335.9888916666666. Wm2Back: 40.308077499999996\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", @@ -141,7 +135,7 @@ " os.makedirs(testfolder)\n", "\n", "simulationName = 'tutorial_8'\n", - "moduletype = \"test-module\"\n", + "moduletype = \"PVmodule\"\n", "albedo = 0.25 \n", "lat = 37.5 \n", "lon = -77.6\n", @@ -224,30 +218,17 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "3 files in the directory\n" - ] - }, - { - "ename": "ValueError", - "evalue": "array of sample points is empty", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[1;32mIn[2], line 8\u001b[0m\n\u001b[0;32m 6\u001b[0m numcells\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m72\u001b[39m\u001b[38;5;66;03m# Options are 72 or 96 at the moment.\u001b[39;00m\n\u001b[0;32m 7\u001b[0m downsamplingmethod \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbyCenter\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;66;03m# Options are 'byCenter' or 'byAverage'.\u001b[39;00m\n\u001b[1;32m----> 8\u001b[0m bifacial_radiance\u001b[38;5;241m.\u001b[39mmismatch\u001b[38;5;241m.\u001b[39manalysisIrradianceandPowerMismatch(testfolder\u001b[38;5;241m=\u001b[39mresultfolder, writefiletitle\u001b[38;5;241m=\u001b[39mwritefiletitle, portraitorlandscape\u001b[38;5;241m=\u001b[39mportraitorlandscape, \n\u001b[0;32m 9\u001b[0m bififactor\u001b[38;5;241m=\u001b[39mbififactor, numcells\u001b[38;5;241m=\u001b[39mnumcells)\n\u001b[0;32m 11\u001b[0m \u001b[38;5;28mprint\u001b[39m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mYour hourly mismatch values are now saved in the file above! :D\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", - "File \u001b[1;32mc:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\mismatch.py:318\u001b[0m, in \u001b[0;36manalysisIrradianceandPowerMismatch\u001b[1;34m(testfolder, writefiletitle, portraitorlandscape, bififactor, numcells, downsamplingmethod)\u001b[0m\n\u001b[0;32m 316\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m z \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;241m0\u001b[39m, filelist\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__len__\u001b[39m()):\n\u001b[0;32m 317\u001b[0m data\u001b[38;5;241m=\u001b[39mload\u001b[38;5;241m.\u001b[39mread1Result(os\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mjoin(testfolder,filelist[z]))\n\u001b[1;32m--> 318\u001b[0m [frontres, backres] \u001b[38;5;241m=\u001b[39m load\u001b[38;5;241m.\u001b[39mdeepcleanResult(data, sensorsy\u001b[38;5;241m=\u001b[39msensorsy, numpanels\u001b[38;5;241m=\u001b[39mnumpanels, automatic\u001b[38;5;241m=\u001b[39mautomatic)\n\u001b[0;32m 319\u001b[0m F[filelist[z]]\u001b[38;5;241m=\u001b[39mfrontres\n\u001b[0;32m 320\u001b[0m B[filelist[z]]\u001b[38;5;241m=\u001b[39mbackres \n", - "File \u001b[1;32mc:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\load.py:458\u001b[0m, in \u001b[0;36mdeepcleanResult\u001b[1;34m(resultsDict, sensorsy, numpanels, automatic)\u001b[0m\n\u001b[0;32m 454\u001b[0m \u001b[38;5;28;01mpass\u001b[39;00m\n\u001b[0;32m 456\u001b[0m \u001b[38;5;66;03m# now that we know what material names to look for, filter resultsDict for \u001b[39;00m\n\u001b[0;32m 457\u001b[0m \u001b[38;5;66;03m# them, removing frames, sky, torque tube, etc. \u001b[39;00m\n\u001b[1;32m--> 458\u001b[0m Frontresults, Backresults \u001b[38;5;241m=\u001b[39m filter_sub(resultsDict, sensorsy, frontmask, backmask)\n\u001b[0;32m 460\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m Frontresults, Backresults\n", - "File \u001b[1;32mc:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\load.py:407\u001b[0m, in \u001b[0;36mdeepcleanResult..filter_sub\u001b[1;34m(resultsDict, sensorsy, frontmask, backmask)\u001b[0m\n\u001b[0;32m 405\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m backmask:\n\u001b[0;32m 406\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 407\u001b[0m Frontresults \u001b[38;5;241m=\u001b[39m interp_sub(resultsDict[mask], sensorsy, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mWm2Front\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m 408\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m: \u001b[38;5;66;03m# no Wm2Front data passed - rear data only.\u001b[39;00m\n\u001b[0;32m 409\u001b[0m Frontresults \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n", - "File \u001b[1;32mc:\\users\\mprillim\\sam_dev\\bifacial_radiance\\bifacial_radiance\\load.py:377\u001b[0m, in \u001b[0;36mdeepcleanResult..interp_sub\u001b[1;34m(panelDict, sensorsy, frontbackkey)\u001b[0m\n\u001b[0;32m 375\u001b[0m x_0 \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mlinspace(\u001b[38;5;241m0\u001b[39m, \u001b[38;5;28mlen\u001b[39m(panelDict)\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m, \u001b[38;5;28mlen\u001b[39m(panelDict)) \n\u001b[0;32m 376\u001b[0m x_i \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mlinspace(\u001b[38;5;241m0\u001b[39m, \u001b[38;5;28mlen\u001b[39m(panelDict)\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m, \u001b[38;5;28mint\u001b[39m(sensorsy))\n\u001b[1;32m--> 377\u001b[0m interp_out \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39minterp(x_i, x_0, panelDict[frontbackkey])\n\u001b[0;32m 379\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m interp_out\n", - "File \u001b[1;32m~\\AppData\\Local\\anaconda3\\Lib\\site-packages\\numpy\\lib\\function_base.py:1599\u001b[0m, in \u001b[0;36minterp\u001b[1;34m(x, xp, fp, left, right, period)\u001b[0m\n\u001b[0;32m 1596\u001b[0m xp \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mconcatenate((xp[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m:]\u001b[38;5;241m-\u001b[39mperiod, xp, xp[\u001b[38;5;241m0\u001b[39m:\u001b[38;5;241m1\u001b[39m]\u001b[38;5;241m+\u001b[39mperiod))\n\u001b[0;32m 1597\u001b[0m fp \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mconcatenate((fp[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m:], fp, fp[\u001b[38;5;241m0\u001b[39m:\u001b[38;5;241m1\u001b[39m]))\n\u001b[1;32m-> 1599\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m interp_func(x, xp, fp, left, right)\n", - "\u001b[1;31mValueError\u001b[0m: array of sample points is empty" + "3 files in the directory\n", + "Same number of sensorsy and cellsy for your module.\n", + "Saved Results to Mismatch_Results.csv\n", + "Your hourly mismatch values are now saved in the file above! :D\n" ] } ], @@ -291,7 +272,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.9.12" } }, "nbformat": 4, diff --git a/docs/tutorials/8 - Electrical Mismatch Method.py b/docs/tutorials/8 - Electrical Mismatch Method.py index 94effe9d..f6b6d52b 100644 --- a/docs/tutorials/8 - Electrical Mismatch Method.py +++ b/docs/tutorials/8 - Electrical Mismatch Method.py @@ -46,7 +46,7 @@ # # This will generate the results over which we will perform the mismatch analysis. Here we are doing only 1 day to make this faster. -# In[1]: +# In[2]: import bifacial_radiance @@ -58,7 +58,7 @@ os.makedirs(testfolder) simulationName = 'tutorial_8' -moduletype = "test-module" +moduletype = "PVmodule" albedo = 0.25 lat = 37.5 lon = -77.6 @@ -130,7 +130,7 @@ # - Upsample # -# In[2]: +# In[3]: resultfolder = os.path.join(testfolder, 'results')