Skip to content

vanderpol⚓︎

Simulator wrapper for the Van der Pol oscillator. Van der Pol oscillator is a non-conservative oscillator with non-linear damping.

The equation of motion is given by:

x'' - μ(1 - x^2)x' + x = 0

where μ is a scalar parameter indicating the nonlinearity and the strength of the damping.

VanDerPolOscillator ⚓︎

PET-compatible wrapper for the Van der Pol oscillator.

Parameters:

Name Type Description Default
options dict

Configuration options for the simulator. Supported keys: - reportpoint: list of report points (default: [1, 2, ..., 15]) - reporttype: type of report points, e.g. "times" (default: "times") - datatype: list of datatypes to extract, e.g. ["x1", "x2"] (default: ["x1"]) - compute_adjoints: bool, whether to compute adjoints (default: False) - atol: absolute tolerance for ODE solver (default: 1e-5) - rtol: relative tolerance for ODE solver (default: 1e-5) - parallel: number of parallel processes to use (default: 1, i.e. no parallelism)

required

__call__(inputs) ⚓︎

Run forward simulations for all ensemble members.

Parameters:

Name Type Description Default
inputs list of dict or dict

One dict per ensemble member with keys x1, x2, mu.

required

Returns:

Name Type Description
results list

One entry per ensemble member. Each entry is a list of dictionaries, one dictionary per report point.

adjoints (list, optional)

One adjoint DataFrame per ensemble member when compute_adjoints=True.

run_fwd_sim(state, member_i=0, del_folder=True) ⚓︎

Run the forward simulation for a single ensemble member.

Mirrors the run_fwd_sim signature used in the other SimulatorWrap classes.

Parameters:

Name Type Description Default
state dict

Keys: x1, x2, mu. Values can be scalars or arrays with one element.

required
member_i int

Ensemble member index (unused internally, kept for API compatibility).

0
del_folder bool

Kept for PET compatibility. Unused.

True

Returns:

Name Type Description
result list[dict]

One dictionary per report point with keys equal to datatypes and values as 1D arrays.

adj_df (DataFrame, optional)

Adjoint matrix in PET-compatible format; each cell contains a Jacobian row vector with derivatives w.r.t. [x1, x2, mu].

setup_fwd_run(**kwargs) ⚓︎

PET compatibility hook (no setup required for this simulator).