This 2D version keeps the same battery-free, direct-coupled design as the 3D simulator, but solves the electrical side properly: the PV array's real single-diode I-V curve is intersected numerically against the pump motor's load line every frame, instead of assuming the array always sits at its power point.
Irradiance: G(t) = G_max · max(0, sin(π·(t−6)/12)) · (1 − cloud)
PV I-V curve: I(V) = Isc·(1 − C1·(exp(V/(C2·Voc)) − 1)) [explicit single-diode model]
Pump load: I_load(H) = k_t · H (motor current ∝ lift torque)
Operating pt: solve I(V_op) = I_load(H) by bisection on V ∈ [0, Voc]
Electrical: P_op = V_op · I_load(H)
Hydraulic: P_hyd = P_op · η_pump = ρ·g·Q·H
Flow: Q = P_hyd / (ρ·g·H) [capped at Q_max; Q = 0 if Isc ≤ I_load(H)]
- Time of day — drives the sun's arc and the irradiance curve G(t); night gives zero power and I(V) collapses to zero everywhere.
- Cloud cover — scales irradiance down, shrinking the I-V curve toward the origin.
- Panel array area — scales Isc and Imp (parallel strings), stretching the I-V curve vertically without moving the voltage axis.
- Pumping head — raises the pump's required current I_load(H); a taller I-V curve is needed to clear it, so a higher head cuts in later and pumps less, exactly as a real positive-displacement solar pump behaves.
- Irrigation valve — opens a fixed demand draw from the tank; tank level is the running balance of pumped inflow minus irrigation outflow.
The chart on the right plots the live I-V curve with the pump's horizontal load line; the dot marks the numerically solved operating point, and the shaded rectangle under it is the instantaneous electrical power V·I actually delivered to the pump.