sanity checking pitch values with shadow length calculations
This commit is contained in:
parent
2f8f0ab9e9
commit
b570ca824f
@ -125,6 +125,15 @@ def get_solar_data(c):
|
||||
return solar_positions, clearsky_data
|
||||
|
||||
|
||||
def sanity_check_minimum_pitch(c):
|
||||
solar_positions, _ = get_solar_data(c)
|
||||
zenith = solar_positions["zenith"].values
|
||||
solar_positions["shadow_length"] = c["panel"]["dimensions"]["length"] * math.tan(
|
||||
zenith
|
||||
)
|
||||
return solar_positions
|
||||
|
||||
|
||||
def calculate_energy_production_vertical(c):
|
||||
c = calculate_required_system_size(c)
|
||||
panel_coordinates, no_of_panels = define_grid_layout(c, panel_tilt=90)
|
||||
|
12
main.py
12
main.py
@ -6,6 +6,7 @@ import matplotlib.pyplot as pl
|
||||
from Utilities.Shading import (
|
||||
calculate_energy_production_horizontal,
|
||||
calculate_energy_production_vertical,
|
||||
sanity_check_minimum_pitch,
|
||||
)
|
||||
from Utilities.Optimisation import optimise_vertical_panel_pitch
|
||||
|
||||
@ -58,7 +59,7 @@ logger.info(
|
||||
logger.info(f"No. of panels for vertical orientation: {int(no_of_panels_vertical)}")
|
||||
|
||||
# overlay horizontal and vertical energy production
|
||||
pl.figure(figsize=(10, 6))
|
||||
pl.subplot(2, 1, 1)
|
||||
pl.plot(
|
||||
horizontal_energy.index,
|
||||
horizontal_energy.values,
|
||||
@ -69,4 +70,13 @@ pl.title("Energy Production Comparison")
|
||||
pl.xlabel("Time")
|
||||
pl.ylabel("Energy Production (kWh)")
|
||||
pl.legend()
|
||||
|
||||
solar_positions = sanity_check_minimum_pitch(c)
|
||||
pl.subplot(2, 1, 2)
|
||||
pl.plot(solar_positions.index, solar_positions["shadow_length"], label="Shadow Length")
|
||||
pl.title("Shadow Lengths Throughout the Day")
|
||||
pl.xlabel("Time")
|
||||
pl.ylabel("Shadow Length (m)")
|
||||
pl.legend()
|
||||
|
||||
pl.show()
|
||||
|
Loading…
x
Reference in New Issue
Block a user