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
func
betweenlower
andupper
. 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 limit
upper (float) – upper integration limit
viscous_wavelength (None | float, optional) – viscous wavelength in the fluid [m]
Default:None
boundary_layer (float) – boundary layer thickness in the fluid [m]
resolution (int, optional) – number of integration points per wavelength passed
Default:4
roi_factor (int, optional) – multiplier to compute ROI (see above)
Default:5
rel_eps (float, optional) – estimated relative error of integration
Default:1e-06
- Return type:
tuple[float, float]