MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

System of lorenz equations

  • To: mathgroup at
  • Subject: [mg23896] System of lorenz equations
  • From: Winston Garira <uceswga at>
  • Date: Thu, 15 Jun 2000 00:51:36 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


I am just a newcomer to Mathematica. Iam not sure of what is wrong.
Can someone help me. I am trying to solve a system of 48 Lorenz
equations which are diffusively coupled. In the system of equations,
k1, k2, and k3 are the coupling strengths (constants) which in this
case I gave the values k1=15.6, k2=8.8 and k3=5.9. In the system a, b,
and c are also constants and I assigned them values a=10, b=27, and
c=8/3. I used initial conditions x[0]=0.7, y[0]=0.3 and z[0]=-1.5. N
(is integer) represents the N th lorenz system and so it has values
from 0 to 48.  In the notebook below in which I tried to plot the N=21
Lorenz system I just got the error that x[t][21], y[t][21], z[t][21]
are not real numbers.

Thank you


Lorenzs[init1_, i_,time_, k1_, k2_, k3_, {a_, b_, c_, N_}]:=
lorenz=NDSolve[{ Flatten[Table[eqns, {i,0,N}]];				
	if  (i==0) { (* when working with the first lorenz system  *)
	x'[t][i]+a*(y[t][i]-x[t][i])+ k1*(x[t][1]-2 x[t][0] )==0,	         
        y'[t][i]+b*  x[t][i]-y[t][]-x[t][i] y[t][i] + k2*(y[t][1]-2 y[t][0])==0,
	z'[t][i]-c*  z[t][i] +z[t][i] y[t][i] + k3 *(z[t][1]-2 z[t][0])==0},
	else	if  (i==N-1) { (* when working with the last lorenz system *)
	x'[t][i]+a*(y[t][i]-x[t][i])+ k1*(x[t][N-2]- x[t][N-1] )==0,
        y'[t][i]+b*  x[t][i]-y[t][]-x[t][i] y[t][i] + k2*(y[t][N-2]- y[t][N-1])==0,
	z'[t][i]-c*  z[t][i] +z[t][i] y[t][i] + k3 *(z[t][N-2]-2z[t][N-1])==0},
	else { (* when working with the  lorenz system  in middle *)
	x'[t][i]+a*(y[t][i]-x[t][i])+ k1*(x[t][i-1]-2 x[t][i] + x[t][i])==0,         
        y'[t][i]+b*  x[t][i]-y[t][]-x[t][i] y[t][i] + k2*(y[t][i-1]-2 y[t][i]+y[t][i+1])==0,
	z'[t][i]-c*  z[t][i] +z[t][i] y[t][i] + k3 *(z[t][i-1]-2 z[t][i]+z[t][i+1])==0},
	{x[i], y[i], z[i]},
	{t,0,time}, MaxSteps->200000];
	x[t_][i] := Evaluate[x[t][i] /. lorenz];
	y[t_][i]:= Evaluate[y[t][i] /. lorenz];
	z[t_][i] := Evaluate[z[t][i] /. lorenz];

  a=10; b=27; c=8/3;  N=48;  

  Lorenzs[{0.7,0.3,-1.5}, 5000,15.6,8.8,5.9,   {a,b,c,N}];
  Plot[{x[t][21], y[t][21], z[t][21]}, {t,0,600},

  • Prev by Date: Re: Newbie question: pairswise function application
  • Next by Date: RE: Functional Expression Meaning (was:A Functional Expression Trick)
  • Previous by thread: Re: To color surfaces using z values with ContourPlot3D
  • Next by thread: Re: System of lorenz equations