Skip to main content
Piecewise interpolants produce smooth, differentiable functions of one or two breakpoint variables — useful for SOC-dependent diffusivities, temperature-dependent transport, and OCP curves. For the math (smooth heaviside, knots vs slopes, blending), see the Piecewise Interpolants Guide.

1D piecewise interpolant

The interpolant reads one parameter per breakpoint (the names follow "<base> at <breakpoint_parameter_name> <value> [units]") and produces a smooth function of the breakpoint variable.

2D piecewise interpolant

For parameters varying with two variables (e.g. SOC and temperature):
Use different smoothing parameters when the two axes have very different scales (SOC ∈ [0, 1] vs Temperature ∈ [273, 323] K).

OCP interpolants

The blended interpolant is the recommended option whenever a simulation might access stoichiometries outside the measured data range — MSMR provides thermodynamically consistent extrapolation at the extremes.

Choosing an interpolator

All 1-D interpolant calculations — OCP interpolants (OCPDataInterpolant, OCPMSMRInterpolant, OCPDataInterpolantMSMRExtrapolation), diffusivity interpolants (DiffusivityDataInterpolant, DiffusivityFromMSMRData, DiffusivityFromMSMRFunction, ArrheniusDiffusivityFromMSMRData, ArrheniusDiffusivityFromMSMRFunction), and entropic-change interpolants (EntropicChangeDataInterpolant, EntropicChangeFromMSMRFunction) — accept an "interpolator" option that controls how values between data points are evaluated.
For OCP curves and other monotonic data, "pchip" typically produces the most physically realistic interpolant: it stays monotonic between knots and avoids the spurious oscillations a cubic spline can introduce near steep features.

Piecewise Interpolants (theory)

Smooth heaviside math, knot vs slope parameterisation, MSMR blending.

Pipelines overview

How interpolants chain with direct entries and data fits.