Numerical simulation of the Lorentz system
Introduction
This example presents a numerical simulation of the Lorentz system, a classic example of a dynamical system demonstrating chaotic behavior. The system was proposed by E. Lorenz in 1963 as part of the problem of convection in a liquid layer heated from below.
Mathematical description
It is described by a system of three ordinary differential equations:
The model variables have the following interpretation in the context of the original physical problem:
-
— intensity of convective motion;
-
— the temperature difference between the updraft and the downdraft;
-
— deviation of the temperature profile from the linear equilibrium distribution.
The system contains three dimensionless control parameters:
- (Prandtl number) is the ratio of the kinematic viscosity to the thermal conductivity of the medium. Determines the ratio between the rates of dissipation of mechanical and thermal disturbances.
- (Rayleigh number) is a parameter that characterizes the heating intensity. At p<1, the system has a single stable singular point; with increasing p, bifurcations occur, leading to chaotic dynamics.
- is a geometric parameter determined by the ratio of the characteristic dimensions of the convective cell.
For parameter values , , The phase trajectory of the system forms a strange attractor, an attractive set in phase space with a fractal structure. The trajectory switches between two regions corresponding to the rotation of the liquid in opposite directions. The main properties of the system in this mode are:
-
Exponential sensitivity to initial conditions, making long-term forecasting impossible;
-
the presence of two centers of rotation with irregular transitions between them.
Let's define the integration step.
Δt = 0.01
Define the initial parameters, initialize the arrays, and set the initial conditions.
σ = 10
β = 8/3
ρ = 28
N = 30000
x = zeros(N)
y = zeros(N)
z = zeros(N)
x[1] = 1
y[1] = 1
z[1] = 1
Let's perform numerical integration using the explicit Euler method.
for i in 1:N-1
dx = σ * (y[i] - x[i])
dy = x[i] * (ρ - z[i]) - y[i]
dz = x[i] * y[i] - β * z[i]
x[i+1] = x[i] + Δt * dx
y[i+1] = y[i] + Δt * dy
z[i+1] = z[i] + Δt * dz
end
Let's construct an attractor in three-dimensional Euclidean space.
plot(x, y, z, linewidth = 0.5, legend = false,
aspect_ratio = :equal, grid = true,
title = "The Lorentz attractor", xlabel = "x", ylabel = "y", zlabel = "z",
camera = (30, 30), size = (700, 600))
Conclusion
In this example, a numerical simulation of the Lorentz system is performed under various control parameter modes. Phase trajectories corresponding to the classical strange attractor are constructed. Despite the fact that the Lorentz system was obtained as a simplified model of atmospheric convection, its significance goes far beyond meteorology. The main value of this model is to demonstrate the fundamental possibility of chaotic behavior in deterministic systems of small dimension, which has applications in the following areas:
- Weather and climate forecasting. The Lorentz system became one of the first mathematical models that showed the limited horizon of predictability of atmospheric processes. In practice, this has led to the development of ensemble forecasting methods, where instead of a single deterministic calculation, a series of calculations are performed with slightly different initial conditions, and the result is interpreted in probabilistic terms.
- Hydrodynamics and heat and mass transfer. The analysis of the transition to turbulence in convective flows is used in the design of heat exchangers, cooling systems for electronic equipment, as well as in the study of mantle convection in geophysics.
- Laser physics. The equations mathematically equivalent to the Lorentz system describe the dynamics of a single-mode laser. The analysis of chaotic generation modes is used in the development of radiation sources with specified characteristics.
- Chemical kinetics and biology. Chaotic regimes similar to those observed in the Lorentz system occur in autocatalytic reactions, population dynamics models, and neural activity.
- Cryptography and information security. The property of exponential sensitivity to initial conditions is used in the construction of pseudorandom sequence generators and encryption systems based on the synchronization of chaotic generators.
Thus, the numerical study of the Lorentz system is not only an illustration of the fundamental properties of nonlinear dynamics, but also a basis for understanding a wide range of phenomena encountered in engineering practice and natural sciences.