Utilities

This module contains a collection of utilities for use across the WISDEM model set.

Differentiability

Differentiable versions of several functions are provided (along with their derivatives). These are summarized in the below table

linspace_with_deriv(start, stop, num)

creates linearly spaced arrays, and derivatives for changing end points

interp_with_deriv(x, xp, yp)

linear interpolation and its derivative.

arc_length_deriv(points)

Return the Jacobian for function arc_length().

trapz_deriv(y, x)

trapezoidal integration and derivatives with respect to integrand or variable.

smooth_max(yd, ymax[, pct_offset, dyd])

array max, uses cubic spline to smoothly transition.

smooth_min(yd, ymin[, pct_offset, dyd])

array min, uses cubic spline to smoothly transition.

smooth_abs(x[, dx])

smoothed version of absolute vaue function, with quadratic instead of sharp bottom.

CubicSplineSegment(x1, x2, f1, f2, g1, g2)

cubic splines and the their derivatives with with respect to the variables and the parameters