osaft.core.functions.integrate_osc
- osaft.core.functions.integrate_osc(func, lower, upper, boundary_layer, viscous_wavelength=None, resolution=4, roi_factor=5, rel_eps=1e-06)[source]
Special purpose integrator for oscillating integrals that integrates
funcbetweenlowerandupper. This method employs Scipy’s QUADPACK implementation quad(). Used primarily for boundary layer integration for elastic fluids. The method creates a list of uniformly distributes points in a region of interest where local difficulties are expected. The density of points per viscous wavelength is given byresolution, the region of interest is given by [lower,lower+roi_factor\(*\)boundary_layer]. Function returns the integral and an error estimate.- Parameters:
func (
Callable[[float],float]) – function to be integrated. If no rel_eps is passed the function needs to be vectorized.lower (
float) – lower integration limitupper (
float) – upper integration limitviscous_wavelength (
Optional[float], optional) – viscous wavelength in the fluid [m]Default:Noneboundary_layer (
float) – boundary layer thickness in the fluid [m]resolution (
int, optional) – number of integration points per wavelength passedDefault:4roi_factor (
int, optional) – multiplier to compute ROI (see above)Default:5rel_eps (
float, optional) – estimated relative error of integrationDefault:1e-06- Return type:
tuple[float,float]