Skip to content

Commit

Permalink
tutorials 1-3
Browse files Browse the repository at this point in the history
  • Loading branch information
shirubana committed Dec 4, 2023
1 parent fd97100 commit 654bd7e
Show file tree
Hide file tree
Showing 46 changed files with 32,529 additions and 57 deletions.
15,568 changes: 15,568 additions & 0 deletions training/tutorials/1 - NSRDB Weather Data to Array Power with PVLib.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions training/tutorials/1 - NSRDB Weather Data to Array Power with PVLib.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head><meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>1 - Basic run</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<title>2 - Bifacial_Radiance Basic AgriPV Example</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>



Expand Down Expand Up @@ -14580,12 +14580,25 @@
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h1 id="1---Basics-run">1 - Basics run<a class="anchor-link" href="#1---Basics-run">&#182;</a></h1><p><strong>Objectives:</strong></p>
<ol>
<li>Create a fixed tilt system </li>
<li>Sample the Ground</li>
<li>Generate plots </li>
<h1 id="2---bifacial_radiance-Basic-AgriPV-Example">2 - bifacial_radiance Basic AgriPV Example<a class="anchor-link" href="#2---bifacial_radiance-Basic-AgriPV-Example">&#182;</a></h1><p>This journal shows how to model an AgriPV site, calculating the irradiance not only on the modules but also the irradiance received by the ground to evaluate available solar ersource for plants.</p>
<p>We assume that <code>bifacia_radiance</code> and <code>radiance</code> are properly installed.</p>
<p>These journal outlines 4 useful uses of bifacial_radiance and some tricks:</p>
<ul>
<li>Creating the modules in the AgriPV site</li>
<li>Adding extra geometry for the pillars/posts supporting the AgriPV site</li>
<li>Hacking the sensors to sample the ground irradiance and create irradiance map</li>
<li>Adding object to simulate variations in ground albedo from different crops between rows.</li>
</ul>
<h4 id="Steps:">Steps:<a class="anchor-link" href="#Steps:">&#182;</a></h4><ol>
<li><a href='#step1'> Generate the geometry </a></li>
<li><a href='#step2'> Analyse the Ground Irradiance </a></li>
<li><a href='#step3'> Analyse and Map the Ground Irradiance </a></li>
<li><a href='#step4'> Adding different Albedo Section </a></li>
</ol>
<h4 id="Preview-of-what-we-will-create:">Preview of what we will create:<a class="anchor-link" href="#Preview-of-what-we-will-create:">&#182;</a></h4><p><img src="images/AgriPV_2.PNG" alt="Another view">
<img src="images/AgriPV_1.PNG" alt="AgriPV Image We will create">
And this is how it will look like:</p>
<p><img src="images/AgriPV_step4.PNG" alt="AgriPV modeled step 4"></p>

</div>
</div>
Expand All @@ -14597,7 +14610,7 @@ <h1 id="1---Basics-run">1 - Basics run<a class="anchor-link" href="#1---Basics-r
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h2 id="1.-Setup-and-Create-PV-ICE-Simulation-Object">1. Setup and Create PV ICE Simulation Object<a class="anchor-link" href="#1.-Setup-and-Create-PV-ICE-Simulation-Object">&#182;</a></h2>
<h2 id="0.-Setup">0. Setup<a class="anchor-link" href="#0.-Setup">&#182;</a></h2>
</div>
</div>
</div>
Expand Down Expand Up @@ -14673,6 +14686,17 @@ <h2 id="1.-Setup-and-Create-PV-ICE-Simulation-Object">1. Setup and Create PV ICE
</div>
</div>

</div>
<div class="jp-Cell jp-MarkdownCell jp-Notebook-cell">
<div class="jp-Cell-inputWrapper">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h2 id="1.-Create-bifacial_radiance-object">1. Create bifacial_radiance object<a class="anchor-link" href="#1.-Create-bifacial_radiance-object">&#182;</a></h2>
</div>
</div>
</div>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs ">
<div class="jp-Cell-inputWrapper">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
Expand Down Expand Up @@ -14747,28 +14771,27 @@ <h2 id="1.-Setup-and-Create-PV-ICE-Simulation-Object">1. Setup and Create PV ICE
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">simulationname</span> <span class="o">=</span> <span class="s1">'tutorial_1'</span>

<span class="c1"># Location:</span>
<span class="n">lat</span> <span class="o">=</span> <span class="mf">25..7407</span> <span class="c1"># ° N, </span>
<span class="n">lon</span> <span class="o">=</span> <span class="o">-</span><span class="mf">105.1686</span> <span class="c1"># ° W</span>

<span class="mf">25.2854</span><span class="err">°</span> <span class="n">N</span><span class="p">,</span> <span class="mf">51.5310</span><span class="err">°</span> <span class="n">E</span>
<span class="n">lat</span> <span class="o">=</span> <span class="mf">25.2854</span> <span class="c1"># ° N, </span>
<span class="n">lon</span> <span class="o">=</span> <span class="mf">51.5310</span> <span class="c1"># ° E</span>

<span class="c1"># Scene Parameters:</span>
<span class="n">azimuth_ang</span><span class="o">=</span><span class="mi">90</span> <span class="c1"># Facing south</span>
<span class="n">tilt</span> <span class="o">=</span> <span class="mi">30</span> <span class="c1"># tilt.</span>
<span class="n">numpanels</span> <span class="o">=</span> <span class="mi">3</span>

<span class="c1"># MakeModule Parameters</span>
<span class="n">moduletype</span><span class="o">=</span><span class="s1">'test-module'</span>
<span class="n">numpanels</span> <span class="o">=</span> <span class="mi">1</span> <span class="c1"># AgriPV site has 3 modules along the y direction</span>
<span class="n">numpanels</span> <span class="o">=</span> <span class="mi">3</span> <span class="c1"># AgriPV site has 3 modules along the y direction</span>
<span class="n">module_x</span> <span class="o">=</span> <span class="mi">2</span> <span class="c1"># m</span>
<span class="n">module_y</span> <span class="o">=</span> <span class="mi">1</span> <span class="c1"># m. slope we will measure</span>
<span class="n">sensorsy</span><span class="o">=</span><span class="mi">2</span>
<span class="n">sensorsground</span><span class="o">=</span><span class="mi">5</span>
<span class="n">module_y</span> <span class="o">=</span> <span class="mi">1</span> <span class="c1"># m. slope we will measure x&gt;y landscape.</span>
<span class="n">ygap</span> <span class="o">=</span> <span class="mf">0.03</span> <span class="c1"># m</span>
<span class="n">xgap</span> <span class="o">=</span> <span class="mf">1.5</span> <span class="c1"># m</span>

<span class="c1"># SceneDict Parameters</span>
<span class="n">pitch</span> <span class="o">=</span> <span class="mi">6</span> <span class="c1"># m</span>
<span class="n">albedo</span> <span class="o">=</span> <span class="mf">0.2</span> <span class="c1">#'grass' # ground albedo</span>
<span class="n">clearance_height</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="c1"># m </span>
<span class="n">nMods</span> <span class="o">=</span> <span class="mi">4</span> <span class="c1"># six modules per row.</span>
<span class="n">pitch</span> <span class="o">=</span> <span class="mi">7</span> <span class="c1"># m</span>
<span class="n">albedo</span> <span class="o">=</span> <span class="mf">0.2</span> <span class="c1"># 'grass' # ground albedo</span>
<span class="n">clearance_height</span> <span class="o">=</span> <span class="mf">2.5</span> <span class="c1"># m </span>
<span class="n">nMods</span> <span class="o">=</span> <span class="mi">5</span> <span class="c1"># six modules per row.</span>
<span class="n">nRows</span> <span class="o">=</span> <span class="mi">3</span> <span class="c1"># 3 row</span>
</pre></div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,43 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1 - Basics run\n",
"# 2 - bifacial_radiance Basic AgriPV Example\n",
"\n",
"**Objectives:**\n",
"1. Create a fixed tilt system \n",
"2. Sample the Ground\n",
"3. Generate plots "
"\n",
"This journal shows how to model an AgriPV site, calculating the irradiance not only on the modules but also the irradiance received by the ground to evaluate available solar ersource for plants. \n",
"\n",
"We assume that `bifacia_radiance` and `radiance` are properly installed.\n",
"\n",
"These journal outlines 4 useful uses of bifacial_radiance and some tricks: \n",
"\n",
"* Creating the modules in the AgriPV site\n",
"* Adding extra geometry for the pillars/posts supporting the AgriPV site\n",
"* Hacking the sensors to sample the ground irradiance and create irradiance map\n",
"* Adding object to simulate variations in ground albedo from different crops between rows.\n",
"\n",
"\n",
"#### Steps:\n",
"\n",
"1. <a href='#step1'> Generate the geometry </a>\n",
"2. <a href='#step2'> Analyse the Ground Irradiance </a>\n",
"3. <a href='#step3'> Analyse and Map the Ground Irradiance </a>\n",
"4. <a href='#step4'> Adding different Albedo Section </a>\n",
" \n",
"#### Preview of what we will create: \n",
" \n",
"![Another view](images/AgriPV_2.PNG)\n",
"![AgriPV Image We will create](images/AgriPV_1.PNG)\n",
"And this is how it will look like:\n",
"\n",
"![AgriPV modeled step 4](images/AgriPV_step4.PNG)\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1. Setup and Create PV ICE Simulation Object"
"## 0. Setup "
]
},
{
Expand Down Expand Up @@ -63,6 +87,13 @@
"os.environ['RAYPATH'] = \":radiance-5.3.012cb17835-Linux/usr/local/radiance/lib\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1. Create bifacial_radiance object"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -114,28 +145,27 @@
"simulationname = 'tutorial_1'\n",
"\n",
"# Location:\n",
"lat = 25..7407 # ° N, \n",
"lon = -105.1686 # ° W\n",
"\n",
"25.2854° N, 51.5310° E\n",
"lat = 25.2854 # ° N, \n",
"lon = 51.5310 # ° E\n",
"\n",
"# Scene Parameters:\n",
"azimuth_ang=90 # Facing south\n",
"tilt = 30 # tilt.\n",
"numpanels = 3\n",
"\n",
"# MakeModule Parameters\n",
"moduletype='test-module'\n",
"numpanels = 1 # AgriPV site has 3 modules along the y direction\n",
"numpanels = 3 # AgriPV site has 3 modules along the y direction\n",
"module_x = 2 # m\n",
"module_y = 1 # m. slope we will measure\n",
"sensorsy=2\n",
"sensorsground=5\n",
"module_y = 1 # m. slope we will measure x>y landscape.\n",
"ygap = 0.03 # m\n",
"xgap = 1.5 # m\n",
"\n",
"# SceneDict Parameters\n",
"pitch = 6 # m\n",
"albedo = 0.2 #'grass' # ground albedo\n",
"clearance_height = 0.5 # m \n",
"nMods = 4 # six modules per row.\n",
"pitch = 7 # m\n",
"albedo = 0.2 # 'grass' # ground albedo\n",
"clearance_height = 2.5 # m \n",
"nMods = 5 # six modules per row.\n",
"nRows = 3 # 3 row\n"
]
},
Expand Down Expand Up @@ -186,7 +216,7 @@
"source": [
"sceneDict = {'tilt':tilt,'pitch': pitch,'clearance_height':clearance_height,'azimuth':azimuth_ang, \n",
" 'nMods': nMods, 'nRows': nRows} \n",
"scene = demo.makeScene(module=moduletype, sceneDict=sceneDict) \n"
"scene = demo.makeScene(module=moduletype, sceneDict=sceneDict) "
]
},
{
Expand All @@ -205,7 +235,7 @@
"outputs": [],
"source": [
"analysis = br.AnalysisObj(octfile, demo.name) \n",
"frontscan, backscan = analysis.moduleAnalysis(scene, sensorsy=sensorsy)\n"
"frontscan, backscan = analysis.moduleAnalysis(scene, sensorsy=sensorsy)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
#!/usr/bin/env python
# coding: utf-8

# # 1 - Basics run
# # 2 - bifacial_radiance Basic AgriPV Example
#
#
# This journal shows how to model an AgriPV site, calculating the irradiance not only on the modules but also the irradiance received by the ground to evaluate available solar ersource for plants.
#
# We assume that `bifacia_radiance` and `radiance` are properly installed.
#
# These journal outlines 4 useful uses of bifacial_radiance and some tricks:
#
# * Creating the modules in the AgriPV site
# * Adding extra geometry for the pillars/posts supporting the AgriPV site
# * Hacking the sensors to sample the ground irradiance and create irradiance map
# * Adding object to simulate variations in ground albedo from different crops between rows.
#
#
# #### Steps:
#
# 1. <a href='#step1'> Generate the geometry </a>
# 2. <a href='#step2'> Analyse the Ground Irradiance </a>
# 3. <a href='#step3'> Analyse and Map the Ground Irradiance </a>
# 4. <a href='#step4'> Adding different Albedo Section </a>
#
# #### Preview of what we will create:
#
# ![Another view](images/AgriPV_2.PNG)
# ![AgriPV Image We will create](images/AgriPV_1.PNG)
# And this is how it will look like:
#
# ![AgriPV modeled step 4](images/AgriPV_step4.PNG)
#
#
# **Objectives:**
# 1. Create a fixed tilt system
# 2. Sample the Ground
# 3. Generate plots

# ## 1. Setup and Create PV ICE Simulation Object
# ## 0. Setup

# In[ ]:

Expand Down Expand Up @@ -39,6 +64,8 @@
os.environ['RAYPATH'] = ":radiance-5.3.012cb17835-Linux/usr/local/radiance/lib"


# ## 1. Create bifacial_radiance object

# In[ ]:


Expand Down Expand Up @@ -78,28 +105,27 @@
simulationname = 'tutorial_1'

# Location:
lat = 25..7407 # ° N,
lon = -105.1686 # ° W

25.2854° N, 51.5310° E
lat = 25.2854 # ° N,
lon = 51.5310 # ° E

# Scene Parameters:
azimuth_ang=90 # Facing south
tilt = 30 # tilt.
numpanels = 3

# MakeModule Parameters
moduletype='test-module'
numpanels = 1 # AgriPV site has 3 modules along the y direction
numpanels = 3 # AgriPV site has 3 modules along the y direction
module_x = 2 # m
module_y = 1 # m. slope we will measure
sensorsy=2
sensorsground=5
module_y = 1 # m. slope we will measure x>y landscape.
ygap = 0.03 # m
xgap = 1.5 # m

# SceneDict Parameters
pitch = 6 # m
albedo = 0.2 #'grass' # ground albedo
clearance_height = 0.5 # m
nMods = 4 # six modules per row.
pitch = 7 # m
albedo = 0.2 # 'grass' # ground albedo
clearance_height = 2.5 # m
nMods = 5 # six modules per row.
nRows = 3 # 3 row


Expand Down
Loading

0 comments on commit 654bd7e

Please sign in to comment.