The Lorenz Attractor

Bailey Williams

Introduction

  • The Lorenz Attractor is a good example of a non-linear dynamical system which models the simple system of convective flow.
  • Named after and first researched by mathematician and meteorologist Edward Lorenz.
  • A set of chaotic solutions comprise the Lorenz System, and in popular media is also apart of the term the “butterfly effect.”

Description of Method

  • The Lorenz Attractor exists in a 3D space, consisting of 3 parameters or equations

\[ \begin{aligned} \frac{dx}{dt} &= \sigma (y-x) \\ \frac{dy}{dt} &= x (\rho - z) - y \\ \frac{dz}{dt} &= xy - \beta z \end{aligned} \]

Description of Method

  • The Attractor will be solved using the Runge-Kutta method.

  • The Lorenz Attractor calculated will consist of the constants

\[ \begin{array} {} \sigma & = & 10 \\ \rho & = & 28 \\ \beta & = & 8/3 \\ \end{array} \]

Python Code - The Lorenz Equations

# Compute time derivatives using Lorenz Equations
# x, y, and z are a point in 3D space
# sigma, rho, and beta are parameters defining the Lorenz Attractor
def dx(x, y, z, t):
    return (sigma*(y - x))

def dy(x, y, z, t):
    return (rho*x - y - x*z)

def dz(x, y, z, t):
    return (-1*(beta*z) + x*y)

Python Code - Rutta Kutta Chunk 1

#Compute the approximate solution at equally spaced times.
    for k in range (n):

        t[k+1] = t[k] + dt

        k1 = dx(x[k], y[k], z[k], t[k])
        l1 = dy(x[k], y[k], z[k], t[k])
        m1 = dz(x[k], y[k], z[k], t[k])

        k2 = dx((x[k] + 0.5*k1*dt), (y[k] + 0.5*l1*dt), (z[k] + 0.5*m1*dt), (t[k] + dt/2))
        l2 = dy((x[k] + 0.5*k1*dt), (y[k] + 0.5*l1*dt), (z[k] + 0.5*m1*dt), (t[k] + dt/2))
        m2 = dz((x[k] + 0.5*k1*dt), (y[k] + 0.5*l1*dt), (z[k] + 0.5*m1*dt), (t[k] + dt/2))

Python Code - Rutta Kutta Chunk 2

        k3 = dx((x[k] + 0.5*k2*dt), (y[k] + 0.5*l2*dt), (z[k] + 0.5*m2*dt), (t[k] + dt/2))
        l3 = dy((x[k] + 0.5*k2*dt), (y[k] + 0.5*l2*dt), (z[k] + 0.5*m2*dt), (t[k] + dt/2))
        m3 = dz((x[k] + 0.5*k2*dt), (y[k] + 0.5*l2*dt), (z[k] + 0.5*m2*dt), (t[k] + dt/2))
        k4 = dx((x[k] + k3*dt), (y[k] + l3*dt), (z[k] + m3*dt), (t[k] + dt))
        l4 = dy((x[k] + k3*dt), (y[k] + l3*dt), (z[k] + m3*dt), (t[k] + dt))
        m4 = dz((x[k] + k3*dt), (y[k] + l3*dt), (z[k] + m3*dt), (t[k] + dt))
        x[k+1] = x[k] + (dt*(k1 + 2*k2 + 2*k3 + k4) / 6)
        y[k+1] = y[k] + (dt*(l1 + 2*l2 + 2*l3 + l4) / 6)
        z[k+1] = z[k] + (dt*(m1 + 2*m2 + 2*m3 + m4) / 6)

    return x, y, z, t

Commands and Output

lorenz_components (x,y,z)

plot of chunk unnamed-chunk-7

Commands and Output

lorenz_3d(x,y,z)

plot of chunk unnamed-chunk-8

Discussion of Results

  • The Lorenz Attractor proves itself a chaotic system by being unpredictable and unstable with changing initial conditions.
  • It seems to never close on itself meaning it never settles into a steady state.
  • The system is in perpetual motion and never repeats therefore non-periodic.

References