-
Notifications
You must be signed in to change notification settings - Fork 19
/
test_pick_pvsystem.py
78 lines (67 loc) · 1.78 KB
/
test_pick_pvsystem.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 15 12:20:07 2020
@author: sbirk
"""
from vpplib.environment import Environment
from vpplib.user_profile import UserProfile
from vpplib.photovoltaic import Photovoltaic
# Values for environment
start = "2015-07-01 00:00:00"
end = "2015-07-31 23:45:00"
year = "2015"
time_freq = "15 min"
timebase = 15
# Values for user profile
identifier = "bus_1"
latitude = 50.941357
longitude = 6.958307
environment = Environment(
timebase=timebase,
timezone="Europe/Berlin",
start=start,
end=end,
year=year,
time_freq=time_freq,
)
environment.get_pv_data()
user_profile = UserProfile(
identifier=identifier,
latitude=latitude,
longitude=longitude,
thermal_energy_demand_yearly=None,
building_type=None,
comfort_factor=None,
t_0=None,
daily_vehicle_usage=None,
week_trip_start=[],
week_trip_end=[],
weekend_trip_start=[],
weekend_trip_end=[],
)
pv = Photovoltaic(module_lib="SandiaMod",
inverter_lib="SandiaInverter",
surface_tilt=20,
surface_azimuth=200,
unit="kW",
identifier="PV-System",
environment=environment,
user_profile=user_profile,
temp_lib='sapm',
temp_model='open_rack_glass_glass',
cost=None)
(modules_per_string,
strings_per_inverter,
module, inverter) = pv.pick_pvsystem(
min_module_power=220,
max_module_power=240,
pv_power=8000,
inverter_power_range=100)
pv.prepare_time_series()
print("PV module: ")
print(pv.module)
print("PV inverter: ")
print(pv.inverter)
print("PV peak power: ", pv.peak_power)
print("Area of PV modules: ", pv.modules_area)
pv.timeseries.plot(figsize=(16, 9))