Environmental Engineering Reference
In-Depth Information
In the first publication on the topic, Lorenz ( 1963 ) dealt with the following
relatively simple system:
0
1
0
1
u 1
u 2
u 3
s u 2 uð Þ
ru 1 u 2 u 1 u 3
u 1 u 2 bu 3
@
A ¼
@
A
(19.15)
Lorenz was concerned with convective motions in the atmosphere. Facing the
problem of the limited capacity of computers at that time, he had set up a very
simplified model with which he hoped to explain real motions of air masses. The
system ( 19.15 ) has three unknown variables u 1 , u 2 and u 3 and three parameters: the
Prandtl number
.
What Lorenz discovered was a completely new behavior of a nonlinear system,
which had not been known before that time. The trajectories did not converge to a
stable equilibrium position or an oscillating orbit neither did they run to infinity.
Within a limited region the trajectories showed a chaotic behavior. The shown
phase space picture is now well-known and the system which it represents is called
the Lorenz attractor .
The Lorenz attractor, depicted in Fig. 19.7 , is produced by the following
command sequence:
s
, the Rayleigh number
r
and
b
sigma = 16; rho = 45.92; beta = 4; % parameters
N = 1000; % no. of time steps
span = 0.05; % inner iteration time span
AbsTol = 1.e-5; % absolute tolerance for ODE solver
RelTol = 1.e-5; % relative tolerance for ODE solver
H = figure; set(H,'DefaultLineLineWidth',1.0);
options = odeset('RelTol',RelTol,'AbsTol',ones(1,3)*AbsTol);
u0 = [1;1;1];
for i = 1:N
[t,u] = ode45(@lornz,[0 span],u0,odeset,beta,rho,sigma);
hold on;
plot(u(:,1),u(:,2),'r');
u0 = u(end,:);
end
title('Attractor of Lorenz System');
xlabel('Component 1'); ylabel('Component 2');
axis off; hold off;
function dydt = lornz(t,y,beta,rho,sigma)
dydt = [sigma*(y(2)-y(1)); rho*y(1)-y(2)-y(1)*y(3); y(1)*y(2)-
beta*y(3)];
The code is included in the accompanying software under the name
“lorenza.m”
The code does not need lengthy explanations. The first five lines represent the
specification part of the file. The main numerical computation is performed within
the for loop. First the Lorenz system ( 19.15 ) is solved, using the ode45 solver of
MATLAB
®
. The system itself is specified as a subfunction in the very last lines of
Search WWH ::




Custom Search