ibl.analytic.Blasius

class ibl.analytic.Blasius(u_ref, nu_ref, fw_pp=None, eta_inf=None)

Bases: Analytic2dSimilarityIncompressible

Solution to Blasius equation.

This class represents the solution to the Blasius equation. While it can be initialized with user defined parameters needed for the solution, the default parameters are sufficient to obtain an accurate solution.

Once the solution is obtained, the dense output from the ODE integrator is used to report back parameters associated with the boundary layer. Both integrated and point properties can be obtained from the similarity coordinate or from the corresponding Cartesian coordinates.

Raises:

ValueError – If properties are being set outside of the valid range.

Parameters:
  • u_ref (float)

  • nu_ref (float)

  • fw_pp (float | None)

  • eta_inf (float | None)

__init__(u_ref, nu_ref, fw_pp=None, eta_inf=None)
Parameters:
  • u_ref (float)

  • nu_ref (float)

  • fw_pp (float | None)

  • eta_inf (float | None)

Return type:

None

Methods

__init__(u_ref, nu_ref[, fw_pp, eta_inf])

delta_d(x)

Calculate the displacement thickness.

delta_k(x)

Calculate the kinetic energy thickness.

delta_m(x)

Calculate the momentum thickness.

delta_s(x)

Calculate the shear thickness.

dissipation(x, rho_ref)

Calculate the dissipation integral.

eta(x, y)

Return the similarity coordinate corresponding to coordinates.

f(eta)

Return the non-dimensional stream function from the solution.

f_p(eta)

Return the non-dimensional velocity from the solution.

f_pp(eta)

Return the derivative of the non-dimensional velocity from solution.

set_solution_parameters([eta_inf, fw_pp])

Set the solver parameters to override the default values.

shape_d(x)

Calculate the displacement shape factor.

shape_k(x)

Calculate the kinetic energy shape factor.

tau_w(x, rho_ref)

Calculate the wall shear stress.

u(x, y)

Return the x-velocity that corresponds to the Cartesian coordinates.

u_e(x)

Return the inviscid edge velocity at specified locations.

v(x, y)

Return the y-velocity that corresponds to the Cartesian coordinates.

v_e(x)

Calculate the transpiration velocity.

Attributes

eta_d

The displacement thickness in similarity coordinates.

eta_inf

Maximum similarity coordinate.

eta_inf_default

Default value for the eta_inf.

eta_k

The kinetic energy thickness in similarity coordinates.

eta_m

The momentum thickness in similarity coordinates.

eta_s

The shear thickness in similarity coordinates.

fw_pp

Initial condition used for ODE solution.

fw_pp_default

Default value for f''(0) condition for PDE solution at wall.

nu_ref

Reference kinematic viscosity used in non-dimensionalization.

u_ref

Reference velocity used in non-dimensionalization.

property fw_pp_default: float

Default value for f’’(0) condition for PDE solution at wall.

property eta_inf_default: float

Default value for the eta_inf.

delta_d(x)

Calculate the displacement thickness.

Parameters:

x (numpy.ndarray) – Streamwise location of points of interest.

Returns:

Displacement thickness at the specified locations.

Return type:

numpy.ndarray

delta_k(x)

Calculate the kinetic energy thickness.

Parameters:

x (numpy.ndarray) – Streamwise location of points of interest.

Returns:

Kinetic energy thickness at the specified locations.

Return type:

numpy.ndarray

delta_m(x)

Calculate the momentum thickness.

Parameters:

x (numpy.ndarray) – Streamwise location of points of interest.

Returns:

Momentum thickness at the specified locations.

Return type:

numpy.ndarray

delta_s(x)

Calculate the shear thickness.

Parameters:

x (numpy.ndarray) – Streamwise location of points of interest.

Returns:

Shear thickness at the specified locations.

Return type:

numpy.ndarray

dissipation(x, rho_ref)

Calculate the dissipation integral.

Parameters:
  • x (numpy.ndarray) – Streamwise location of points of interest.

  • rho_ref (float) – Reference density.

Returns:

Dissipation integral at the specified locations.

Return type:

numpy.ndarray

eta(x, y)

Return the similarity coordinate corresponding to coordinates.

Parameters:
  • x (numpy.ndarray) – Streamwise location of points of interest.

  • x – Location normal to the streamwise direction of points of interest.

  • y (float | floating | ndarray[Any, dtype[ScalarType]])

Returns:

Similarity coordinate at the Cartesian coordinates.

Return type:

numpy.ndarray

Notes

Both x and y must be the same shape.

property eta_d: float

The displacement thickness in similarity coordinates.

property eta_inf: float

Maximum similarity coordinate. Default value is found as part of the ODE solution process.

property eta_k: float

The kinetic energy thickness in similarity coordinates.

property eta_m: float

The momentum thickness in similarity coordinates.

property eta_s: float

The shear thickness in similarity coordinates.

f(eta)

Return the non-dimensional stream function from the solution.

Parameters:

eta (numpy.ndarray) – Similarity coordinates to calculate the property.

Returns:

Non-dimensional stream function values.

Return type:

numpy.ndarray

f_p(eta)

Return the non-dimensional velocity from the solution.

Parameters:

eta (numpy.ndarray) – Similarity coordinates to calculate the property.

Returns:

Non-dimensional velocity values.

Return type:

numpy.ndarray

f_pp(eta)

Return the derivative of the non-dimensional velocity from solution.

Parameters:

eta (numpy.ndarray) – Similarity coordinates to calculate the property.

Returns:

Derivative of the non-dimensional velocity values.

Return type:

numpy.ndarray

property fw_pp: float

Initial condition used for ODE solution.

property nu_ref: float

Reference kinematic viscosity used in non-dimensionalization. Must be positive.

set_solution_parameters(eta_inf=None, fw_pp=None)

Set the solver parameters to override the default values.

If None is passed in to either parameter then that parameter is solved for, otherwise the value passed in will be used as is. This can cause instability and should only be used for circumstances that require the use of specific values.

Parameters:
  • eta_inf (Optional[float]) – Maximum similarity coordinate. Must be positive.

  • fw_pp (Optional[float]) – Initial condition used for ODE solution. Default value is found as part of the ODE solution process. Must be positive.

Raises:

ValueError – If invalid value is passed in.

Return type:

None

shape_d(x)

Calculate the displacement shape factor.

Parameters:

x (numpy.ndarray) – Streamwise location of points of interest.

Returns:

Displacement shape factor at the specified locations.

Return type:

numpy.ndarray

shape_k(x)

Calculate the kinetic energy shape factor.

Parameters:

x (numpy.ndarray) – Streamwise location of points of interest.

Returns:

Kinetic energy shape factor at the specified locations.

Return type:

numpy.ndarray

tau_w(x, rho_ref)

Calculate the wall shear stress.

Parameters:
  • x (numpy.ndarray) – Streamwise location of points of interest.

  • rho_ref (float) – Reference density.

Returns:

Wall shear stress at the specified locations.

Return type:

numpy.ndarray

u(x, y)

Return the x-velocity that corresponds to the Cartesian coordinates.

Parameters:
  • x (numpy.ndarray) – Streamwise location of points of interest.

  • x – Location normal to the streamwise direction of points of interest.

  • y (float | floating | ndarray[Any, dtype[ScalarType]])

Returns:

Velocity component in the x-direction at the coordinates.

Return type:

numpy.ndarray

Notes

Both x and y must be the same shape.

u_e(x)

Return the inviscid edge velocity at specified locations.

Parameters:

x (numpy.ndarray) – Streamwise location of points of interest.

Returns:

Edge streamwise velocity at specified locations.

Return type:

numpy.ndarray

property u_ref: float

Reference velocity used in non-dimensionalization. Must be positive.

v(x, y)

Return the y-velocity that corresponds to the Cartesian coordinates.

Parameters:
  • x (numpy.ndarray) – Streamwise location of points of interest.

  • x – Location normal to the streamwise direction of points of interest.

  • y (float | floating | ndarray[Any, dtype[ScalarType]])

Returns:

Velocity component in the y-direction at the coordinates.

Return type:

numpy.ndarray

Notes

Both x and y must be the same shape.

v_e(x)

Calculate the transpiration velocity.

Parameters:

x (numpy.ndarray) – Streamwise location of points of interest.

Returns:

Transpiration velocity at specified locations.

Return type:

numpy.ndarray