A method for automatic optimization of the intake duct geometry of marine waterjets