OscillatorProperties#

class coupled_oscillator.oscillator_properties.OscillatorProperties(length: float = 1, mass: float | Callable = 1, gravity: float | Callable = 1, spring_constant: float | Callable = 100, epsilon: float | Callable = 1)[source]#

Bases: object

The physical properties of the coupled oscillator.

Parameters#

lengthfloat

The length of the spring in the stable position.

massfloat | callable

The mass of the oscillator (function of time).

gravityfloat | callable

The acceleration due to gravity (function of time).

spring_constantfloat | callable

The spring constant of the oscillator (function of time).

epsilonfloat | callable

A coupling coefficient between the two oscillators (function of time).

__init__(length: float = 1, mass: float | Callable = 1, gravity: float | Callable = 1, spring_constant: float | Callable = 100, epsilon: float | Callable = 1) None[source]#

Methods

__init__([length, mass, gravity, ...])

make_callable(value)

Converts a constant value to a callable function.

static make_callable(value: float | Callable) Callable[source]#

Converts a constant value to a callable function.

Parameters#

valuefloat | callable

The value to convert.

Returns#

callable

The callable function.