API reference

Classes

The different classes of pvpumpingsystem.

pvgeneration.PVGeneration(…[, …]) Class representing the power generation through the photovoltaic system.
mppt.MPPT([efficiency, price, idname, …]) Class defining a DC/DC converter with a MPPT controller.
pump.Pump(path[, …]) Class representing a motor-pump.
pipenetwork.PipeNetwork(h_stat, l_tot, diam) Class representing a simple hydraulic network.
reservoir.Reservoir([size, water_volume, …]) Class defining a water tank with its main characteristics.
consumption.Consumption([flow_rate, …]) The Consumption class defines a consumption schedule, typically through a year.
pvpumpsystem.PVPumpSystem(pvgeneration, …) Class defining a PV pumping system made of:

Functions and methods

Pump modeling

The core of the software’s originality lies in the implementation of different motor-pump models and in their coupling with the PV generator.

pump.Pump.iv_curve_data(head[, nbpoint]) Function returning the data needed for plotting the IV curve at a given head.
pump.Pump.functIforVH() Function computing the IV characteristics of the pump depending on head H.
pump.Pump.functIforVH_Arab() Function using Hadj Arab model for modeling I vs V of pump.
pump.Pump.functIforVH_Kou() Function using Kou model for modeling I vs V of pump.
pump.Pump.functIforVH_theoretical() Function using electrical architecture for modeling V vs I of pump.
pump.Pump.functQforVH() Function redirecting to functQforPH.
pump.Pump.functQforPH() Function computing the output flow rate of the pump.
pump.Pump.functQforPH_Hamidat() Function using Hamidat model for output flow rate modeling.
pump.Pump.functQforPH_Arab() Function using Hadj Arab model for output flow rate modeling.
pump.Pump.functQforPH_Kou() Function using Kou model for output flow rate modeling.
pump.Pump.functQforPH_theoretical() Function using theoretical approach for output flow rate modeling.
pump.get_data_pump(path) Loads the pump data from the .txt file designated by the path.
pump.specs_completeness(specs, …) Evaluates the data completeness of a motor-pump.
pump._curves_coeffs_Arab06(specs, …) Compute curve-fitting coefficient with method of Hadj Arab [1] and Djoudi Gherbi [2].
pump._curves_coeffs_Kou98(specs, …) Compute curve-fitting coefficient with method of Kou [1].
pump._curves_coeffs_Hamidat08(specs, …) Compute curve-fitting coefficient with method of Hamidat [1].
pump._curves_coeffs_theoretical(specs, …) Compute curve-fitting coefficient following theoretical analysis of motor architecture.
pump._curves_coeffs_theoretical_variable_efficiency(…) Compute curve-fitting coefficient following theoretical analysis of motor architecture.
pump._curves_coeffs_theoretical_constant_efficiency(…) Compute curve-fitting coefficient following theoretical analysis of motor architecture.
pump._curves_coeffs_theoretical_basic(specs, …) Compute curve-fitting coefficient following theoretical analysis of motor architecture.
pump._domain_V_H(specs, data_completeness) Function giving the range of voltage and head in which the pump will work.
pump._domain_P_H(specs, data_completeness) Function giving the range of power and head in which the pump will work.
pump._extrapolate_pow_eff_with_cst_efficiency(specs) Adapt/complete specifications of a limite pump datasheet.
pump.plot_Q_vs_P_H_3d(pump) Print the graph of Q [L/min] vs tdh [m] and P [W] in 3 dimensions.
pump.plot_I_vs_V_H_3d(pump) Print the graph of I [A] vs tdh [m] and V [V] in 3 dimensions.
pump.plot_Q_vs_V_H_2d(pump) Print the graph of Q [L/min] vs tdh [m] for each voltage available.

Other components modeling

reservoir.Reservoir.change_water_volume(quantity) Function for adding or removing water in the reservoir.
consumption.adapt_to_flow_pumped(…) Method for shrinking the consumption flow_rate attribute at the same size than the corresponding pumped flow rate data.
pipenetwork.PipeNetwork.dynamichead(Qlpm[, …]) Calculates the dynamic head of the pipe network according to the flow given Q, and using the Darcy-Weisbach equation.
pvgeneration.PVGeneration.run_model() Runs the modelchain of the PV generation.

Global modeling

pvpumpsystem.PVPumpSystem.define_motorpump_model(model)
pvpumpsystem.PVPumpSystem.operating_point([…]) Finds the IV operating point(s) of the PV array and the pump (load).
pvpumpsystem.PVPumpSystem.calc_flow([…]) Computes the flow at the output of the PVPS, and assigns the value to the attribute ‘flow’.
pvpumpsystem.PVPumpSystem.calc_efficiency() Computes the efficiencies between PV array output and motorpump output, between irradiance and PV output, and global efficiency.
pvpumpsystem.PVPumpSystem.calc_reservoir([…]) Computes the water volume in the reservoir and extra or lacking water compared to the consumption at any time step.
pvpumpsystem.PVPumpSystem.run_model([…]) Comprehensive modeling of the PVPS.
pvpumpsystem.function_i_from_v(V, I_L, I_o, …) Deprecated: ‘function_i_from_v’ deprecated.
pvpumpsystem.operating_point(params, …[, …]) Finds the IV operating point(s) between PV array and load (motor-pump).
pvpumpsystem.calc_flow_directly_coupled(…) Computes input electrical characteristics, total dynamic head, and flow at pump output.
pvpumpsystem.calc_flow_mppt_coupled(…[, …]) Computes input electrical characteristics, total dynamic head, and flow at pump output.
pvpumpsystem.calc_efficiency(df, irradiance, …) Computes the efficiencies between PV array output and motorpump output, between irradiance and PV output, and global efficiency.

Sizing tools

sizing.shrink_weather_representative(…[, …]) Create a new weather_data object representing the range of weather that can be found in the weather_data given.
sizing.shrink_weather_worst_month(weather_data) Create a new weather_data object with only the worst month of the weather_data given, according to the global horizontal irradiance (ghi) data.
sizing.subset_respecting_llp_direct(…[, …]) Function returning the configurations of PV modules and pump that will minimize the net present value of the system and will insure the Loss of Load Probability (llp) is inferior to the one given.
sizing.size_nb_pv_direct(pvps_fixture, …) Function sizing the PV generator (i.e.
sizing.subset_respecting_llp_mppt(…[, …]) Function returning the configurations of PV modules and pump that will minimize the net present value of the system and will ensure the Loss of Load Probability (llp) is inferior to the one given.
sizing.size_nb_pv_mppt(pvps_fixture, …) Function sizing the PV generator (i.e.
sizing.sizing_minimize_npv(pv_database, …) Function returning the configuration of PV modules and pump that minimizes the net present value (NPV) of the system and ensures that the Loss of Load Probability (llp) is inferior to the ‘llp_accepted’.

Ancillary functions

function_models.correlation_stats(funct_mod, …) Compute statistical figures to assess quality of curve fitting.
function_models.compound_polynomial_1_2(…) Model of a compound polynomial function made of a global equation of first order on x, for which each coefficient follows a second order equation on y.
function_models.compound_polynomial_1_3(…) Model of a compound polynomial function made of a global equation of first order on x, for which each coefficient follows a third order equation on y.
function_models.compound_polynomial_2_2(…) Model of a compound polynomial function made of a global equation of second order on x, for which each coefficient follows a third order equation on y.
function_models.compound_polynomial_2_3(…) Model of a compound polynomial function made of a global equation of second order on x, for which each coefficient follows a third order equation on y.
function_models.compound_polynomial_3_3(…) Model of a compound polynomial function made of a global equation of third order on x, for which each coefficient follows a third order equation on y.
function_models.polynomial_multivar_3_3_4(…) Model of a multivariate polynomial function of third order on x and y, and with 1 interaction term.
function_models.polynomial_multivar_3_3_1(…) Model of a multivariate polynomial function of third order on x and y, and with 1 interaction term.
function_models.polynomial_multivar_2_2_1(…) Model of a multivariate polynomial function of second order on x and y, and with 1 interaction term.
function_models.polynomial_multivar_2_2_0(…) Model of a multivariate polynomial function of second order on x and y, and with no interaction term.
function_models.polynomial_multivar_1_1_0(…) Model of a multivariate polynomial function of first order on x and y, and with no interaction term.
function_models.polynomial_multivar_0_1_0(…) Model of a multivariate polynomial function of first order on y (actually not really multivariate so).
function_models.polynomial_5(x, y_intercept, …) Model of a polynomial function of fifth order.
function_models.polynomial_4(x, y_intercept, …) Model of a polynomial function of fourth order.
function_models.polynomial_3(x, y_intercept, …) Model of a polynomial function of third order.
function_models.polynomial_2(x, y_intercept, …) Model of a polynomial function of second order.
function_models.polynomial_1(x, y_intercept, a) Model of a polynomial function of first order, i.e.
function_models.polynomial_divided_2_1(x, a, …) Model of a polynomial function of second order divided by x.
waterproperties.water_prop(name, T) Function giving water property requested.
finance.initial_investment(pvps[, …]) Function computing the initial investment cost.
finance.net_present_value(pvps[, …]) Function computing the net present value of a PVPS