Tests

Differential Equations

x[t_] ;

y[t_] ;

z[t_] ;

u[x_, y_, z_, t_] ;

v[x_, y_, z_, t_] ;

w[x_, y_, z_, t_] ;

ψ '[x_, y_, z_, t_] ;

Out[22]=

ψ^′[x_, y_, z_, t_]

In[25]:=

ψ '[x_, y_, z_, t_] == x '[t]/u[x, y, z, t] - y '[t]/v[x, y, z, t] - z '[t]/w[x, y, z, t]

Out[25]=

ψ^′[x_, y_, z_, t_] == x^′[t]/u[x, y, z, t] - y^′[t]/v[x, y, z, t] - z^′[t]/w[x, y, z, t]

The below statement just sets the variables "x", "y", and "z" to be functions of a variable "t".  This parameterizes the functions, allowing it to iterate along a common variable.

x[t_] ;

y[t_] ;

z[t_] ;

The functions are defined as differential equations with respect to the parameter "t".  These rates of change will need to be solved for the variables "x", "y", and "z".

fx[t_] = x '[t] == -(y[t] + z[t]) ;

fy[t_] = y '[t] == x[t] + a y[t] ;

fz[t_] = z '[t] == b + x[t] z[t] - c z[t] ;

sol1 = NDSolve[{fx1[t], fy1[t], fz1[t], x1[0] == x0, y1[0] == y0, z1[0] == z0}, {x1, y1, z1}, {t, 0, 500}, MaxSteps→100000]

{{x1→InterpolatingFunction[{{0., 500.}}, <>], y1→InterpolatingFunction[{{0., 500.}}, <>], z1→InterpolatingFunction[{{0., 500.}}, <>]}}

ax[t_] = ax[0] +

Average Value Cellular Automata

In[100]:=

fun[cells_List, t_Integer] := (cells[[1]][[1]] + cells[[1]][[2]] + cells[[1]][[3]] + cells[[2]][[1]] + cells[[2]][[3]] + cells[[3]][[1]] + cells[[3]][[2]] + cells[[3]][[3]]) / 8 ;

ruleSet = {fun[#, #2] &, {}, {1, 1}} ;

duration = 50 ;

In[104]:=

cells01 = CellularAutomaton[ruleSet, initial , duration] ;

In[105]:=

ShowAnimation[Animate[ArrayPlot[cells01[[t]]], {t, 1, duration, 1}]] ;

[Graphics:../HTMLFiles/index_81.gif]

In[107]:=

ShowAnimation[Animate[ContourGraphics[cells01[[t]]], {t, 1, duration, 1}]] ;

[Graphics:../HTMLFiles/index_133.gif]


Created by Mathematica  (October 23, 2006) Valid XHTML 1.1!