van_der_pol.xmds

Script source:
van_der_pol.xmds.gz

<?xml version="1.0"?>
<simulation>
  
<!-- $Id: van_der_pol_body.part 999 2004-08-03 05:42:47Z cochrane $ -->

<!--  Copyright (C) 2000-2004                                           -->
<!--                                                                    -->
<!--  Code contributed by Greg Collecutt, Joseph Hope and Paul Cochrane -->
<!--                                                                    -->
<!--  This file is part of xmds.                                        -->
<!--                                                                    -->
<!--  This program is free software; you can redistribute it and/or     -->
<!--  modify it under the terms of the GNU General Public License       -->
<!--  as published by the Free Software Foundation; either version 2    -->
<!--  of the License, or (at your option) any later version.            -->
<!--                                                                    -->
<!--  This program is distributed in the hope that it will be useful,   -->
<!--  but WITHOUT ANY WARRANTY; without even the implied warranty of    -->
<!--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     -->
<!--  GNU General Public License for more details.                      -->
<!--                                                                    -->
<!--  You should have received a copy of the GNU General Public License -->
<!--  along with this program; if not, write to the Free Software       -->
<!--  Foundation, Inc., 59 Temple Place - Suite 330, Boston,            -->
<!--  MA  02111-1307, USA.                                              -->
  
  <name> van_der_pol </name>      <!-- the name of the simulation -->
  
  <author> Paul Cochrane</author>  <!-- the author of the simulation -->
  <description>
    Van der Pol oscillator example, adapted from de Vries
  </description>
  
  <!-- Global system parameters and functionality -->
  <prop_dim> t </prop_dim>    <!-- name of main propagation dim -->
  
  <error_check> yes </error_check>   <!-- defaults to yes -->
  <use_wisdom> yes </use_wisdom>     <!-- defaults to no -->
  <benchmark> yes </benchmark>       <!-- defaults to no -->
  <use_prefs> yes </use_prefs>       <!-- defaults to yes -->
  
  <argv>
    <arg>
      <name> epsilon </name>
      <type> double </type>
      <default_value> 0.0 </default_value>
    </arg>
  </argv>

  <!-- Global variables for the simulation -->
  <globals>
  <![CDATA[
      // const double epsilon = 1;  // 0 is harmonic oscilltor
  ]]>
  </globals>
  
  <!-- Field to be integrated over -->
  <field>
    <name> main </name>
    <samples> 1 </samples>       <!-- sample 1st point of dim? -->
    
    <vector>
      <name> main </name>
      <type> complex </type>           <!-- data type of vector -->
      <components> x xdot </components>       <!-- names of components -->
      <![CDATA[
          x = 0.5;
	  xdot = 0;
      ]]>
    </vector>
  </field>
  
  <!-- The sequence of integrations to perform -->
  <sequence>
    <integrate>
      <algorithm> RK4EX </algorithm> <!-- RK4EX, RK4IP, SIEX, SIIP -->
      <interval> 8*M_PI </interval>   <!-- how far in main dim? -->
      <lattice> 1000 </lattice>     <!-- no. points in main dim -->
      <samples> 100 </samples> <!-- no. pts in output moment group -->
      
      <![CDATA[
          dx_dt = xdot;
	  dxdot_dt = -x - epsilon*(x*x - 1)*xdot;
      ]]>
    </integrate>
  </sequence>
  
  <!-- The output to generate -->
  <output format="ascii">
    <group>
      <sampling>
        <lattice> 100 </lattice>           <!-- no. points to sample -->
        <moments> xOut </moments>           <!-- names of moments -->
        <![CDATA[
            xOut = x;
        ]]>
      </sampling>
    </group>
  </output>
  
</simulation>

Generated by GNU enscript 1.6.3.



Introduction | Examples | Downloads | Documentation | Archives | Script Repository | FAQ | News | Links | Contacts