CFD studies of complex fluid flows in pipes