Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: System of lorenz equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23933] Re: System of lorenz equations
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 16 Jun 2000 00:57:15 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8i9q99$2n8@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

a) a if condition is written with If[test,trueRes,falseRes] a if-else
   with 
   If[test1,trueTest1,If[test2,trueTest2,elseResult]]
b) N is used as function to convert symbolic expressions like
BessleJ[0,2]
   to floting point numbers
c) eqns is a symbol and Table[eqns,{i,0,4}] gives just
{eqns,eqns,eqns,eqns}
d) you have to generate inner the equations explicit by
   Table[
        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},{i,1,n-1}]
   and append the boundary equations on the left end right end
e) you give only 3 instead of 3*49 initial conditions
f) what means i ? It can't be a index to your equations because you only
   have 49
g) read the manual
h) read a second time 

Regards
  Jens

Winston Garira wrote:
> 
> Hello,
> 
> 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
> 
> Winston
> 
> Lorenzs[init1_, i_,time_, k1_, k2_, k3_, {a_, b_, c_, N_}]:=
> Module[{},
> 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[0][0]==init1[[1]],
>         y[0][0]==init1[[2]],
>         z[0][0]==init1[[3]]},
>         {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},
>   PlotStyle->[Rule]{RGBColor[1,0,0.3],RGBColor[0,0.5,1],RGBColor[1,0,0.3]}];
> 
>


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