Optimal operation of a regular turbine array in a generic tidal channel