fluid_model module

This file is part of PyFrac.

Created by Haseeb Zia on Thu Dec 22 11:51:00 2016. Copyright (c) ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, Geo-Energy Laboratory, 2016-2020. All rights reserved. See the LICENSE.TXT file for more details.

fluid_model.FF_YangJoseph(ReNum, rough)[source]

This function approximate the friction factor for the given Reynold’s number and the relative roughness float with the Yang Joseph approximation (see Virtual Nikuradse Yang & Joseph 2009).

Parameters
  • ReNum (float) – – Reynold’s number

  • rough (float) – – 1/relative roughness (w/roughness length scale)

Returns

– friction factor

Return type

float

fluid_model.FF_YangJoseph_vector(ReNum, rough)[source]

This function approximate the friction factor for the given Reynold’s number and the relative roughness arrays with the Yang Joseph approximation (see Virtual Nikuradse Yang & Joseph 2009).

Parameters
  • ReNum (ndarray) – – Reynold’s number

  • rough (ndarray) – – 1/relative roughness (w/roughness length scale)

Returns

– frction factor

Return type

ff (ndarray)

fluid_model.FF_Yang_Dou(Re, rough)[source]

This function approximate the friction factor for the given Reynold’s number and the relative roughness arrays with the Yang Dou approximation (see Yang, S. Dou, G. (2010). Turbulent drag reduction with polymer additive in rough pipes. Journal of Fluid Mechanics, 642 279-294). The function is implicit and utilize a numerical root finder

Parameters
  • Re (ndarray) – – Reynold’s number.

  • rough (ndarray) – – 1/relative roughness (w/roughness length scale).

Returns

– friction factor.

Return type

ff (ndarray)

fluid_model.FF_Yang_Dou_residual(vbyu, *args)[source]

The Yang_Dou residual function; to be used by numerical root finder

fluid_model.friction_factor_MDR(ReNum, roughness)[source]

This function approximate the friction factor for the given Reynold’s number and the relative roughness arrays. The analytical friction factor of 16/Re is returned in case of laminar flow, and an explicit approximation of the maximum drag reduction asymptote is returned in case the Reynold’s number is larger than 1760.

Parameters
  • ReNum (ndarray) – – Reynold’s number

  • roughness (ndarray) – – relative roughness

Returns

– friction factor

Return type

ndarray

fluid_model.friction_factor_lam_turb_rough(Re, roughness)[source]

This function approximate the friction factor for the given Reynold’s number and the relative roughness arrays. The analytical friction factor of 16/Re is returned in case of laminar flow, Yang Joseph (see Virtual Nikuradse Yang & Joseph 2009) approximation is used for the turbulent flow cases where the 1/relative roughness is greater than 15, and Yang Dou approximation (see Yang, S. Dou, G. (2010), Turbulent drag reduction with polymer additive in rough pipes. Journal of Fluid Mechanics, 642 279-294) is used in the case of turbulent flow with 1/relative roughness less than 15.

Parameters
  • Re (ndarray) – – Reynold’s number

  • roughness (ndarray) – – 1/relative roughness (w/roughness length scale)

Returns

– friction factor

Return type

ndarray

fluid_model.friction_factor_vector(Re, roughness)[source]

Vector version of the friction_factor function (see the documentation of the friction_factor function)