{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Validation\n",
"\n",
"This document shows how the shading calculations using the ``twoaxistracking`` package compare to existing methods found in the literature. Specifically, the annual shading loss is calculated for nine different field layouts and compared with the values presented in Cumpston and Pye (2014).\n",
"\n",
"Import necessary packages:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"from shapely import geometry\n",
"import twoaxistracking"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Definition of collector geometry\n",
"\n",
"The study by Cumpston and Pye (2014) simulated shading for a circular aperture. The study made no distinction between gross and aperture area, i.e., the two geometries were assumed to be the same."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
],
"text/plain": [
""
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"radius = np.sqrt(1/np.pi) # radius for a circle with an area of 1\n",
"collector_geometry = geometry.Point(0,0).buffer(radius)\n",
"\n",
"collector_geometry"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" \n",
"\n",
"## Reference dataset\n",
"The simulations carried out in the reference study were based on the 1976 irradiance dataset from Barstow.\n",
"\n",
"A stringent quality-control of this dataset was carried out as described in the [Reference irradiance dataset](reference_dataset.ipynb) section. This step was necessary as the dataset contained several periods of erroneous data, e.g., irradiance at night and periods with unfeasible irradiance levels.\n",
"\n",
"Load the quality-controlled dataset:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
ghi
\n",
"
dni
\n",
"
dhi_calc
\n",
"
temp_air
\n",
"
apparent_zenith
\n",
"
zenith
\n",
"
apparent_elevation
\n",
"
elevation
\n",
"
azimuth
\n",
"
dni_extra
\n",
"
\n",
"
\n",
"
time
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
\n",
" \n",
" \n",
"
\n",
"
1976-01-01 00:15:00-08:00
\n",
"
0.88
\n",
"
0.94
\n",
"
0.88
\n",
"
-1.59
\n",
"
167.092519
\n",
"
167.092519
\n",
"
-77.092519
\n",
"
-77.092519
\n",
"
25.278534
\n",
"
1413.981805
\n",
"
\n",
"
\n",
"
1976-01-01 00:30:00-08:00
\n",
"
0.00
\n",
"
0.94
\n",
"
0.00
\n",
"
-1.94
\n",
"
165.467857
\n",
"
165.467857
\n",
"
-75.467857
\n",
"
-75.467857
\n",
"
38.153710
\n",
"
1413.981805
\n",
"
\n",
"
\n",
"
1976-01-01 00:45:00-08:00
\n",
"
0.88
\n",
"
1.88
\n",
"
0.88
\n",
"
-2.36
\n",
"
163.355080
\n",
"
163.355080
\n",
"
-73.355080
\n",
"
-73.355080
\n",
"
48.333521
\n",
"
1413.981805
\n",
"
\n",
"
\n",
"
1976-01-01 01:00:00-08:00
\n",
"
0.00
\n",
"
0.94
\n",
"
0.00
\n",
"
-2.50
\n",
"
160.917391
\n",
"
160.917391
\n",
"
-70.917391
\n",
"
-70.917391
\n",
"
56.311453
\n",
"
1413.981805
\n",
"
\n",
"
\n",
"
1976-01-01 01:15:00-08:00
\n",
"
0.88
\n",
"
0.00
\n",
"
0.88
\n",
"
-2.78
\n",
"
158.265917
\n",
"
158.265917
\n",
"
-68.265917
\n",
"
-68.265917
\n",
"
62.652770
\n",
"
1413.981805
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ghi dni dhi_calc temp_air apparent_zenith \\\n",
"time \n",
"1976-01-01 00:15:00-08:00 0.88 0.94 0.88 -1.59 167.092519 \n",
"1976-01-01 00:30:00-08:00 0.00 0.94 0.00 -1.94 165.467857 \n",
"1976-01-01 00:45:00-08:00 0.88 1.88 0.88 -2.36 163.355080 \n",
"1976-01-01 01:00:00-08:00 0.00 0.94 0.00 -2.50 160.917391 \n",
"1976-01-01 01:15:00-08:00 0.88 0.00 0.88 -2.78 158.265917 \n",
"\n",
" zenith apparent_elevation elevation \\\n",
"time \n",
"1976-01-01 00:15:00-08:00 167.092519 -77.092519 -77.092519 \n",
"1976-01-01 00:30:00-08:00 165.467857 -75.467857 -75.467857 \n",
"1976-01-01 00:45:00-08:00 163.355080 -73.355080 -73.355080 \n",
"1976-01-01 01:00:00-08:00 160.917391 -70.917391 -70.917391 \n",
"1976-01-01 01:15:00-08:00 158.265917 -68.265917 -68.265917 \n",
"\n",
" azimuth dni_extra \n",
"time \n",
"1976-01-01 00:15:00-08:00 25.278534 1413.981805 \n",
"1976-01-01 00:30:00-08:00 38.153710 1413.981805 \n",
"1976-01-01 00:45:00-08:00 48.333521 1413.981805 \n",
"1976-01-01 01:00:00-08:00 56.311453 1413.981805 \n",
"1976-01-01 01:15:00-08:00 62.652770 1413.981805 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"filename = '../../../twoaxistracking/data/barstow_1976_irradiance_data_quality_controlled.csv'\n",
"df = pd.read_csv(filename, index_col=0, parse_dates=[0])\n",
"\n",
"df.head() # print the first five rows of the dataframe"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" \n",
"\n",
"Furthermore, it is important to note that the reference study only performed simulations \"for solar elevation angles greater than 10°\".\n",
"\n",
"Therefore, a new column of the direct normal irradiance (DNI) is derived where the irradiance below 10° elevation is set to zero."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"df['dni>10deg'] = df.loc[df['elevation']>10, 'dni']\n",
"df['dni>10deg'] = df['dni>10deg'].fillna(0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" \n",
"\n",
"## Field layouts\n",
"\n",
"Cumpston and Pye (2010) provided the annual shading loss (ASL) for nine different field layouts (GCR ranging from 0.1 to 0.9). The field layout parameters and their annual shading loss were:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"tags": [
"hide-input"
]
},
"outputs": [
{
"data": {
"text/html": [
"