A spectral finite-difference method of calculating turbulent flows of an incompressible fluid in pipes and channels