This is a partial, simple model of hydraulic valve.
This model is based on the energy balance of a valve.
Specifically:
dp*f(opening)=v|v|
The function f(opening) is expressed as:
(C_v_*max(epsilon, u^alpha))^2
When alpha is 1, this implies a linear relation between closing and head loss.
The valve capacity can either be specified
directly by the user by specifying C_v or it will be calculated from
the nominal head H_n and nominal flow rate Vdot_n.
The valve efficiency is in per-unit values from 0 to 1, where 1 means that there are no losses in the valve. The valve power is defined as the product of the valve power and valve efficiency.
Besides hydraulic input and output,
there is an input u for controlling the valve opening.