|
lorenz.xmds
Script source: lorenz.xmds.gz
<?xml version="1.0"?>
<!-- Example simulation: lorenz -->
<!-- Adapted from the example in "Numerical methods for physics"-->
<!-- by Alejandro L. Garcia, pg 78-->
<!-- Try the simulation for different values of xo, yo and zo -->
<!-- e.g.: xo = 1, yo = 1, zo = 20 -->
<!-- Note: this simulation can be run as a shell/Perl/Python script by -->
<!-- changing the values of xo, yo and zo using the command line arguments -->
<simulation>
<!-- General information about the simulation -->
<name>lorenz</name>
<author>Paul Cochrane</author>
<description>
Lorenz attractor example simulation. Adapted from the example in
"Numerical methods for physics" by Alejandro L. Garcia, page 78 (1st ed.).
</description>
<!-- Global system parameters and functionality -->
<prop_dim>t</prop_dim>
<!-- Global variables for the simulation -->
<globals>
<![CDATA[
const double sigma = 10.0;
const double b = 8.0/3.0;
const double r = 28.0;
const double xo = 1.0; // initial conditions
const double yo = 1.0; // initial conditions
const double zo = 20.0; // initial conditions
]]>
</globals>
<!-- Field to be integrated over -->
<field>
<samples>1</samples>
<vector>
<name>main</name>
<type>double</type>
<components>x y z</components>
<![CDATA[
x = xo;
y = yo;
z = zo;
]]>
</vector>
</field>
<!-- The sequence of integrations to perform -->
<sequence>
<integrate>
<algorithm>RK4EX</algorithm>
<interval>10.0</interval>
<lattice>10000</lattice>
<samples>200</samples>
<![CDATA[
dx_dt = sigma*(y - x);
dy_dt = r*x - y - x*z;
dz_dt = x*y - b*z;
]]>
</integrate>
</sequence>
<!-- The output to generate -->
<output>
<filename>lorenz.xsil</filename>
<group>
<sampling>
<moments>xOut yOut zOut</moments>
xOut = x;
yOut = y;
zOut = z;
</sampling>
</group>
</output>
</simulation>
Generated by GNU enscript 1.6.3.
|