pywr.parameters.HydropowerTargetParameter

class pywr.parameters.HydropowerTargetParameter(model, target, water_elevation_parameter=None, max_flow=None, min_flow=None, turbine_elevation=0.0, efficiency=1.0, density=1000, min_head=0.0, flow_unit_conversion=1.0, energy_unit_conversion=1e-6, **kwargs)

A parameter that returns flow from a hydropower generation target.

This parameter calculates the flow required to generate a particular hydropower production target. It is intended to be used on a node representing a turbine where a particular production target is required each time-step.

Parameters
targetParameter instance

Hydropower production target. Units should be in units of energy per day.

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.

max_flowParameter instance (default=None)

Upper bounds on the calculated flow. If set the flow returned by this parameter is at most the value of the max_flow parameter.

min_flowParameter instance (default=None)

Lower bounds on the calculated flow. If set the flow returned by this parameter is at least the value of the min_flow parameter.

min_headdouble (default=0.0)

Minimum head for flow to occur. If actual head is less than this value zero flow is returned.

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 inverse hydropower calculation uses the following equation.

\[q = \frac{P}{\rho * g * \delta H}\]

The energy rate in should be converted to units of energy per day. The returned flow rate in should is converted from units of \(m^3\) per day to those used by the model 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)

Methods

__init__(*args, **kwargs)

after(self)

before(self)

finish(self)

get_all_values(self)

get_constant_value(self)

Return a constant value.

get_double_lower_bounds(self)

get_double_upper_bounds(self)

get_double_variables(self)

get_integer_lower_bounds(self)

get_integer_upper_bounds(self)

get_integer_variables(self)

get_value(self, ScenarioIndex scenario_index)

load(type cls, model, data)

register(type cls)

reset(self)

set_double_variables(self, double[)

set_integer_variables(self, int[)

setup(self)

unregister(type cls)

value(self, Timestep ts, ...)

Attributes

children

comment

comment: unicode

density

density: 'double'

double_size

double_size: 'int'

efficiency

efficiency: 'double'

energy_unit_conversion

energy_unit_conversion: 'double'

flow_unit_conversion

flow_unit_conversion: 'double'

integer_size

integer_size: 'int'

is_constant

is_variable

is_variable: 'bool'

max_flow

min_flow

min_head

min_head: 'double'

model

name

parents

size

tags

tags: dict

target

turbine_elevation

turbine_elevation: 'double'

water_elevation_parameter