The numerical simulation of a flow through a duct requires an externally specified forcing that makes the fluid flow against viscous friction. To this end, it is customary to enforce a constant value for either the flow rate (CFR) or the pressure gradient (CPG). When comparing a laminar duct flow before and after a geometrical modification that induces a change of the viscous drag, both approaches lead to a change of the power input across the comparison. Similarly, when carrying out direct numerical simulation or large-eddy simulation of unsteady turbulent flows, the power input is not constant over time. Carrying out a simulation at constant power input (CPI) is thus a further physically sound option, that becomes particularly appealing in the context of flow control, where a comparison between control-on and control-off conditions has to be made. We describe how to carry out a CPI simulation, and start with defining a new power-related Reynolds number, whose velocity scale is the bulk flow that can be attained with a given pumping power in the laminar regime. Under the CPI condition, we derive a relation that is equivalent to the Fukagata–Iwamoto–Kasagi relation valid for CFR (and to its extension valid for CPG), that presents the additional advantage of naturally including the required control power. The implementation of the CPI approach is then exemplified in the standard case of a plane turbulent channel flow, and then further applied to a flow control case, where a spanwise-oscillating wall is used for skin-friction drag reduction. For this low-Reynolds-number flow, using 90 % of the available power for the pumping system and the remaining 10 % for the control system is found to be the optimum share that yields the largest increase of the flow rate above the reference case where 100 % of the power goes to the pump.