Skip to content

Fractional dynamics

Fractional dynamics systems.

The package covers relaxation, oscillators, and chaotic flows whose states have Caputo derivatives of an order.

FractionalLorenzInteraction(label, *, target='lorenz', order=0.995, sigma=10.0, rho=28.0, beta=8 / 3)

Bases: Interaction

The laws of the fractional Lorenz flow of Grigorenko and Grigorenko.

The flow is D^q x = sigma (y - x), D^q y = x (rho - z) - y, D^q z = x y - beta z.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The element whose states x, y, and z the flow moves.

'lorenz'
order float

The order q of the Caputo derivatives of all three states, in (0, 1].

0.995
sigma float

The Prandtl number.

10.0
rho float

The Rayleigh number relative to its critical value.

28.0
beta float

The geometric factor.

8 / 3

Examples:

>>> from skcomplex.systems.mathematics.fractional_dynamics import FractionalLorenzInteraction
>>> FractionalLorenzInteraction('flow', target='lorenz', rho=20.0).rho
20.0
Source code in src/skcomplex/systems/mathematics/fractional_dynamics/_fractional.py
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
def __init__(
    self,
    label: str,
    *,
    target: Role = 'lorenz',
    order: float = 0.995,
    sigma: float = 10.0,
    rho: float = 28.0,
    beta: float = 8 / 3,
) -> None:
    super().__init__(label)
    self.target = target
    self.order = order
    self.sigma = sigma
    self.rho = rho
    self.beta = beta

FractionalLorenzSystem(x=1.0, y=1.0, z=1.0, *, order=0.995, sigma=10.0, rho=28.0, beta=8 / 3, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The fractional Lorenz flow of Grigorenko and Grigorenko.

The flow is chaotic for orders close enough to 1.

Grigorenko and Grigorenko report chaos down to the total order 2.97. With Caputo derivatives from rest and the predictor-corrector, the flow is chaotic for the order 0.995 of every state, a total of 2.985, and settles on a fixed point of the two wings for 0.99 after a chaotic transient. The system has the states lorenz.x, lorenz.y, and lorenz.z.

Parameters:

Name Type Description Default
x float

The initial convection intensity.

1.0
y float

The initial temperature difference between rising and falling currents.

1.0
z float

The initial deviation of the vertical temperature profile.

1.0
order float

The order q of the Caputo derivatives of all three states, in (0, 1].

0.995
sigma float

The Prandtl number.

10.0
rho float

The Rayleigh number relative to its critical value.

28.0
beta float

The geometric factor.

8 / 3
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.mathematics.fractional_dynamics import FractionalLorenzSystem
>>> FractionalLorenzSystem(rho=20.0).prepare().system_.interactions[0].rho
20.0
Source code in src/skcomplex/systems/mathematics/fractional_dynamics/_fractional.py
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
def __init__(
    self,
    x: float = 1.0,
    y: float = 1.0,
    z: float = 1.0,
    *,
    order: float = 0.995,
    sigma: float = 10.0,
    rho: float = 28.0,
    beta: float = 8 / 3,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.x = x
    self.y = y
    self.z = z
    self.order = order
    self.sigma = sigma
    self.rho = rho
    self.beta = beta

FractionalOscillatorInteraction(label, *, target='oscillator', order=0.8, omega=1.0, gamma=0.0)

Bases: Interaction

The laws of the fractional damped oscillator.

The oscillator is D^alpha x = v, D^alpha v = -omega^2 x - 2 gamma v.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The element whose states x and v oscillate.

'oscillator'
order float

The order alpha of the Caputo derivatives, in (0, 1].

0.8
omega float

The angular frequency.

1.0
gamma float

The damping rate.

0.0

Examples:

>>> from skcomplex.systems.mathematics.fractional_dynamics import FractionalOscillatorInteraction
>>> FractionalOscillatorInteraction('oscillator_law', target='oscillator', omega=2.0).omega
2.0
Source code in src/skcomplex/systems/mathematics/fractional_dynamics/_fractional.py
173
174
175
176
177
178
179
180
181
182
183
184
185
186
def __init__(
    self,
    label: str,
    *,
    target: Role = 'oscillator',
    order: float = 0.8,
    omega: float = 1.0,
    gamma: float = 0.0,
) -> None:
    super().__init__(label)
    self.target = target
    self.order = order
    self.omega = omega
    self.gamma = gamma

FractionalOscillatorSystem(x=1.0, v=0.0, *, order=0.8, omega=1.0, gamma=0.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The fractional damped oscillator.

The oscillator is D^alpha x = v, D^alpha v = -omega^2 x - 2 gamma v.

With gamma = 0 the system is the fractional oscillation equation of order 2 alpha, whose memory damps the oscillations for 1/2 < alpha < 1 without any friction. Order 1 gives the harmonic oscillator. The system has the states oscillator.x and oscillator.v.

Parameters:

Name Type Description Default
x float

The initial displacement.

1.0
v float

The initial value of the first state's derivative of order alpha.

0.0
order float

The order alpha of the Caputo derivatives, in (0, 1].

0.8
omega float

The angular frequency.

1.0
gamma float

The damping rate.

0.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.mathematics.fractional_dynamics import FractionalOscillatorSystem
>>> FractionalOscillatorSystem(order=0.9).prepare().system_.interactions[0].omega
1.0
Source code in src/skcomplex/systems/mathematics/fractional_dynamics/_fractional.py
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
def __init__(
    self,
    x: float = 1.0,
    v: float = 0.0,
    *,
    order: float = 0.8,
    omega: float = 1.0,
    gamma: float = 0.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.x = x
    self.v = v
    self.order = order
    self.omega = omega
    self.gamma = gamma

FractionalRelaxationInteraction(label, *, target='relaxation', order=0.6, lam=1.0)

Bases: Interaction

The law of fractional relaxation D^alpha x = -lam x.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The element whose state x relaxes.

'relaxation'
order float

The order alpha of the Caputo derivative, in (0, 1].

0.6
lam float

The relaxation rate.

1.0

Examples:

>>> from skcomplex.systems.mathematics.fractional_dynamics import FractionalRelaxationInteraction
>>> FractionalRelaxationInteraction('relaxation_law', target='relaxation', order=0.5).order
0.5
Source code in src/skcomplex/systems/mathematics/fractional_dynamics/_fractional.py
47
48
49
50
51
52
53
54
55
56
57
58
def __init__(
    self,
    label: str,
    *,
    target: Role = 'relaxation',
    order: float = 0.6,
    lam: float = 1.0,
) -> None:
    super().__init__(label)
    self.target = target
    self.order = order
    self.lam = lam

FractionalRelaxationSystem(x=1.0, *, order=0.6, lam=1.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

Fractional relaxation D^alpha x = -lambda x.

The relaxation decays as the Mittag-Leffler function E_alpha.

The solution x(0) E_alpha(-lambda t^alpha) decays slower than any exponential, as the power law t^(-alpha) at long times, since the Caputo derivative keeps the memory of the whole past. Order 1 gives exponential decay. The system has the state relaxation.x.

Parameters:

Name Type Description Default
x float

The initial value.

1.0
order float

The order alpha of the Caputo derivative, in (0, 1].

0.6
lam float

The relaxation rate.

1.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.mathematics.fractional_dynamics import FractionalRelaxationSystem
>>> FractionalRelaxationSystem(order=0.5).prepare().system_.interactions[0].lam
1.0
Source code in src/skcomplex/systems/mathematics/fractional_dynamics/_fractional.py
112
113
114
115
116
117
118
119
120
121
122
123
124
125
def __init__(
    self,
    x: float = 1.0,
    *,
    order: float = 0.6,
    lam: float = 1.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.x = x
    self.order = order
    self.lam = lam

FractionalVanDerPolInteraction(label, *, target='oscillator', order=0.9, mu=1.0)

Bases: Interaction

The laws of the fractional Van der Pol oscillator.

The oscillator is D^alpha x = y, D^alpha y = mu (1 - x^2) y - x.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The element whose states x and y oscillate.

'oscillator'
order float

The order alpha of the Caputo derivatives, in (0, 1].

0.9
mu float

The strength of the nonlinear damping.

1.0

Examples:

>>> from skcomplex.systems.mathematics.fractional_dynamics import FractionalVanDerPolInteraction
>>> FractionalVanDerPolInteraction('oscillator_law', target='oscillator', mu=2.0).mu
2.0
Source code in src/skcomplex/systems/mathematics/fractional_dynamics/_fractional.py
312
313
314
315
316
317
318
319
320
321
322
323
def __init__(
    self,
    label: str,
    *,
    target: Role = 'oscillator',
    order: float = 0.9,
    mu: float = 1.0,
) -> None:
    super().__init__(label)
    self.target = target
    self.order = order
    self.mu = mu

FractionalVanDerPolSystem(x=2.0, y=0.0, *, order=0.9, mu=1.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The fractional Van der Pol oscillator.

The oscillator is D^alpha x = y, D^alpha y = mu (1 - x^2) y - x.

For orders close to 1 the trajectory approaches a closed cycle, and the memory of lower orders shrinks it toward the fixed point at the origin. The system has the states oscillator.x and oscillator.y.

Parameters:

Name Type Description Default
x float

The initial displacement.

2.0
y float

The initial value of the displacement's derivative of order alpha.

0.0
order float

The order alpha of the Caputo derivatives, in (0, 1].

0.9
mu float

The strength of the nonlinear damping.

1.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.mathematics.fractional_dynamics import FractionalVanDerPolSystem
>>> FractionalVanDerPolSystem(mu=2.0).prepare().system_.interactions[0].mu
2.0
Source code in src/skcomplex/systems/mathematics/fractional_dynamics/_fractional.py
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
def __init__(
    self,
    x: float = 2.0,
    y: float = 0.0,
    *,
    order: float = 0.9,
    mu: float = 1.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.x = x
    self.y = y
    self.order = order
    self.mu = mu