PVLIB_Ruby 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c8a795d25b76c8ea888e4fc8d37309149f40c29
|
4
|
+
data.tar.gz: 9632097a75102eb30493e4a9a76f38142739f9e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dae1285d4de04149059586f3f90678f97222564aa4f6d43ee46c43ddf1fcaca7b7604dd7171f98b03c3e1b1c8fee1f1401f0a6102a6a45cdd65be2df363cd73
|
7
|
+
data.tar.gz: 728b34860cbbd800c2895a4b1a322917647ecf0f15d71242f25deed8ead59e7f889da1c8ce14298251feb84c1b24baecf877f704c57bbf9bd3ae98034975cba5
|
@@ -19,16 +19,15 @@ time = Time.new(2008, 10, 20, 11, 58, 12, utc_offset)
|
|
19
19
|
albedo = BigDecimal('0.1500')
|
20
20
|
array_tilt = BigDecimal('35')
|
21
21
|
array_azimuth = BigDecimal('180')
|
22
|
-
latitude = BigDecimal('35.0500')
|
23
|
-
longitude = BigDecimal('-106.5400')
|
24
|
-
altitude = BigDecimal('1660')
|
25
|
-
location = Location.new(latitude, longitude, altitude)
|
26
22
|
pressure = BigDecimal('62963')
|
27
23
|
reference_solar_irradiance = BigDecimal('1000')
|
28
24
|
wind_speed = BigDecimal('2.8786')
|
29
25
|
air_temperature = BigDecimal('20.7700')
|
30
26
|
|
31
|
-
|
27
|
+
sandia_location_data_filepath = File.join(DATA_DIRECTORY, 'sandia_location_example.csv')
|
28
|
+
sandia_location = Location.create(sandia_location_data_filepath)
|
29
|
+
|
30
|
+
solar_ephemeris = SolarEphemeris.new(time, sandia_location, pressure: pressure, temperature: air_temperature)
|
32
31
|
|
33
32
|
sun_azimuth = solar_ephemeris.sun_azimuth
|
34
33
|
apparent_sun_elevation = solar_ephemeris.apparent_sun_elevation
|
@@ -114,7 +113,7 @@ sandia_inverter = Inverter.create(sandia_inverter_data_filename)
|
|
114
113
|
|
115
114
|
dc_to_ac_conversion = DcToAcConversion.new(sandia_inverter)
|
116
115
|
|
117
|
-
puts "
|
116
|
+
puts "------- Inverter DC to AC conversion ------"
|
118
117
|
puts " AC power [W]: #{dc_to_ac_conversion.ac_power(array_voltage, array_power).round(4).to_s('F')}" # Matches to 1016.3 (with rounding) for 360th row in PVSC40Tutorial_Master
|
119
|
-
puts "
|
118
|
+
puts "-------------------------------------------"
|
120
119
|
puts ""
|
@@ -1,11 +1,19 @@
|
|
1
|
-
|
1
|
+
# This is a model in model-view-controller design pattern.
|
2
|
+
# In this case, it is expending ActiveCsv, i.e. it is analogous to ActiveRecord. Hence, it's a placeholder for data from CSV file.
|
3
|
+
class Location < ActiveCsv
|
2
4
|
|
3
|
-
|
5
|
+
attr_writer :latitude, :longitude, :altitude
|
4
6
|
|
5
|
-
def
|
6
|
-
@latitude
|
7
|
-
|
8
|
-
|
7
|
+
def latitude
|
8
|
+
BigDecimal(@latitude.to_s)
|
9
|
+
end
|
10
|
+
|
11
|
+
def longitude
|
12
|
+
BigDecimal(@longitude.to_s)
|
13
|
+
end
|
14
|
+
|
15
|
+
def altitude
|
16
|
+
BigDecimal(@altitude.to_s)
|
9
17
|
end
|
10
18
|
|
11
19
|
end
|
data/lib/PVLIB_Ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: PVLIB_Ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tadatoshi Takahashi
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- bin/console
|
88
88
|
- bin/setup
|
89
89
|
- examples/data/sandia_inverter_example.csv
|
90
|
+
- examples/data/sandia_location_example.csv
|
90
91
|
- examples/data/sandia_module_example.csv
|
91
92
|
- examples/pv_power_generation_example.rb
|
92
93
|
- lib/PVLIB_Ruby.rb
|