pywr.recorders.TotalHydroEnergyRecorder¶
-
class
pywr.recorders.
TotalHydroEnergyRecorder
(model, node, water_elevation_parameter=None, turbine_elevation=0.0, efficiency=1.0, density=1000, flow_unit_conversion=1.0, energy_unit_conversion=1e-06, **kwargs)¶ Calculates the total energy production using the hydropower equation from a model run.
This recorder saves the total energy production in each scenario during a model run. It does not save a timeseries or power, but rather total energy.
- Parameters
- water_elevation_parameterParameter instance (default=None)
Elevation of water entering the turbine. The difference of this value with the turbine_elevation gives the working head of the turbine.
- turbine_elevationdouble
Elevation of the turbine itself. The difference between the water_elevation and this value gives the working head of the turbine.
- efficiencyfloat (default=1.0)
The efficiency of the turbine.
- densityfloat (default=1000.0)
The density of water.
- flow_unit_conversionfloat (default=1.0)
A factor used to transform the units of flow to be compatible with the equation here. This should convert flow to units of \(m^3/day\)
- energy_unit_conversionfloat (default=1e-6)
A factor used to transform the units of total energy. Defaults to 1e-6 to return \(MJ\).
Notes
The hydropower calculation uses the following equation.
\[P = \rho * g * \delta H * q\]The flow rate in should be converted to units of \(m^3\) per day using the flow_unit_conversion parameter.
Head is calculated from the given water_elevation_parameter and turbine_elevation value. If water elevation is given then head is the difference in elevation between the water and the turbine. If water elevation parameter is None then the head is simply the turbine elevation.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(*args, **kwargs)Initialize self.
after
(self)Calculate the
aggregated_value
(self)before
(self)finish
(self)is_constraint_violated
(self)Returns true if the value from this Recorder violates its constraint bounds.
load
(type cls, model, data)register
(type cls)reset
(self)setup
(self)unregister
(type cls)values
(self)Attributes
agg_func
children
comment
comment: unicode
constraint_lower_bounds
constraint_upper_bounds
density
density: ‘double’
efficiency
efficiency: ‘double’
energy_unit_conversion
energy_unit_conversion: ‘double’
epsilon
epsilon: ‘double’
flow_unit_conversion
flow_unit_conversion: ‘double’
ignore_nan
ignore_nan: ‘bool’
is_constraint
Returns true if either upper or lower constraint bounds is defined.
is_double_bounded_constraint
Returns true if upper and lower constraint bounds are both defined and not-equal to one another.
is_equality_constraint
Returns true if upper and lower constraint bounds are both defined and equal to one another.
is_lower_bounded_constraint
Returns true if lower constraint bounds is defined and upper constraint bounds is not.
is_objective
is_upper_bounded_constraint
Returns true if upper constraint bounds is defined and lower constraint bounds is not.
model
name
node
parents
turbine_elevation
turbine_elevation: ‘double’
water_elevation_parameter