nlse.xmds

Script source:
nlse.xmds.gz

<?xml version="1.0"?>
<!--Example simulation: Non-Linear Schroedinger Equation-->

<simulation>

  <name>nlse</name>
  <prop_dim>z</prop_dim>
  <error_check>yes</error_check>
  <stochastic>no</stochastic>

  <globals>
    <![CDATA[
    const double energy = 4;
    const double vel = 0.0;
    const double hwhm = 1.0;
    ]]>
  </globals>

  <field>
    <name>main</name>
    <dimensions>  t   </dimensions>
    <lattice>    100  </lattice>
    <domains>  (-5,5) </domains>

    <samples>1</samples>
    <vector>
      <name>main</name>
      <type>complex</type>
      <components>phi</components>
      <fourier_space>no</fourier_space>
      <![CDATA[
      const double w0 = hwhm*sqrt(2/log(2));
      const double amp  = sqrt(energy/w0/sqrt(M_PI/2));

      phi = pcomplex(amp*exp(-t*t/w0/w0),vel*t);
      ]]>
    </vector>
    <vector>
      <name>vc1</name>
      <type>double</type>
      <components>damping</components>
      <fourier_space>no</fourier_space>
      <![CDATA[
      damping=1.0*(1-exp(-pow(t*t/4/4,10)));
      ]]>
    </vector>

  </field>

  <sequence>
    <integrate>

      <algorithm>RK4IP</algorithm>
      <interval>20</interval>
      <lattice>1000</lattice>
      <samples>50</samples>
      <k_operators>
	<constant>yes</constant>
	<operator_names>L</operator_names>
	<![CDATA[
	L = rcomplex(0,-kt*kt/2);
	]]>
      </k_operators>
      <vectors>main vc1</vectors>
      <![CDATA[
      dphi_dz =  L[phi] + i*~phi*phi*phi - phi*damping;
      ]]>
    </integrate>
  </sequence>

  <output>
    <filename>nlse.xsil</filename>
    <group>
      <sampling>
	<fourier_space> no </fourier_space>
	<lattice>       50 </lattice>
	<moments>pow_dens</moments>
	<![CDATA[
	pow_dens=~phi*phi;
	]]>
      </sampling>
    </group>
  </output>

</simulation>

Generated by GNU enscript 1.6.3.



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