@@ -154,21 +154,25 @@ to accomplish our system modeling goal:
154
154
155
155
.. _object-oriented :
156
156
157
- Object oriented (Location, PVSystem, ModelChain)
158
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159
-
160
- The first object oriented paradigm uses a model where a
161
- :py:class: `~pvlib.pvsystem.PVSystem ` object represents an assembled
162
- collection of modules, inverters, etc., a
163
- :py:class: `~pvlib.location.Location ` object represents a particular
164
- place on the planet, and a :py:class: `~pvlib.modelchain.ModelChain `
165
- object describes the modeling chain used to calculate PV output at that
166
- Location. This can be a useful paradigm if you prefer to think about the
157
+ Object oriented (Location, Mount, Array, PVSystem, ModelChain)
158
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159
+
160
+ The object oriented paradigm uses a model with three main concepts:
161
+
162
+ 1. System design (modules, inverters etc.) is represented by
163
+ :py:class: `~pvlib.pvsystem.PVSystem `, :py:class: `~pvlib.pvsystem.Array `,
164
+ and :py:class: `~pvlib.pvsystem.FixedMount `
165
+ /:py:class: `~pvlib.pvsystem.SingleAxisTrackerMount ` objects.
166
+ 2. A particular place on the planet is represented by a
167
+ :py:class: `~pvlib.location.Location ` object.
168
+ 3. The modeling chain used to calculate power output for a particular
169
+ system and location is represented by a
170
+ :py:class: `~pvlib.modelchain.ModelChain ` object.
171
+
172
+ This can be a useful paradigm if you prefer to think about the
167
173
PV system and its location as separate concepts or if you develop your
168
174
own ModelChain subclasses. It can also be helpful if you make extensive
169
- use of Location-specific methods for other calculations. pvlib-python
170
- also includes a :py:class: `~pvlib.tracking.SingleAxisTracker ` class that
171
- is a subclass of :py:class: `~pvlib.pvsystem.PVSystem `.
175
+ use of Location-specific methods for other calculations.
172
176
173
177
The following code demonstrates how to use
174
178
:py:class: `~pvlib.location.Location `,
@@ -179,14 +183,14 @@ that can provide default selections for models and can also fill
179
183
necessary input with modeled data. For example, no air temperature
180
184
or wind speed data is provided in the input *weather * DataFrame,
181
185
so the ModelChain object defaults to 20 C and 0 m/s. Also, no irradiance
182
- transposition model is specified (keyword argument `transposition ` for
186
+ transposition model is specified (keyword argument `transposition_model ` for
183
187
ModelChain) so the ModelChain defaults to the `haydavies ` model. In this
184
188
example, ModelChain infers the DC power model from the module provided
185
189
by examining the parameters defined for the module.
186
190
187
191
.. ipython :: python
188
192
189
- from pvlib.pvsystem import PVSystem
193
+ from pvlib.pvsystem import PVSystem, Array, FixedMount
190
194
from pvlib.location import Location
191
195
from pvlib.modelchain import ModelChain
192
196
@@ -200,14 +204,13 @@ by examining the parameters defined for the module.
200
204
altitude = altitude,
201
205
tz = timezone,
202
206
)
203
- system = PVSystem(
204
- surface_tilt = latitude,
205
- surface_azimuth = 180 ,
207
+ mount = FixedMount( surface_tilt = latitude, surface_azimuth = 180 )
208
+ array = Array(
209
+ mount = mount ,
206
210
module_parameters = module,
207
- inverter_parameters = inverter,
208
211
temperature_model_parameters = temperature_model_parameters,
209
212
)
210
-
213
+ system = PVSystem( arrays = [array], inverter_parameters = inverter)
211
214
mc = ModelChain(system, location)
212
215
mc.run_model(weather)
213
216
annual_energy = mc.results.ac.sum()
0 commit comments