doublewell_wigner.xmds

Script source:
doublewell_wigner.xmds.gz

<?xml version="1.0"?>
<!--Example: Bose-Einstein condensate in a double-well potentialWigner representation-->
<!--Calculation is done in the Wigner representation, with is essentially the mean-field 
equation (GPE or NLSE) with initial vacuum fluctuations included.  It uses MPI.-->
<!DOCTYPE simulation [
<!ENTITY Nx "128">
<!ENTITY Nxplot "64">
<!ENTITY xmax "10.0">
]>

<simulation>

  <name>doublewell_wigner</name>

  <author>Joel Corney</author>
  <description>
    Example: Bose-Einstein condensate in a double-well potentialWigner representation
    Calculation is done in the Wigner representation, with is essentially the mean-field 
    equation (GPE or NLSE) with initial vacuum fluctuations included.  It uses MPI.
  </description
>
  <prop_dim>t</prop_dim>
  <error_check>yes</error_check>
  <stochastic>yes</stochastic>
  <use_mpi>yes</use_mpi>
  <paths>1000</paths>
  <seed>10 20</seed>
  <noises>2</noises>

  /***********/
  <globals>
  /***********/
  <![CDATA[
    const double Pi = 2.0*asin(1.0);

    /*Simulation parameters*/
    const double n0 = 1000 ; /*Atom number*/
    const double q = 4.0;       /* well minima*/
    const double r = 1.0;               /*initial width*/
    const double b = 1.0/(32*q*q);              /*Strength of trap*/
    const double K = 1/n0;              /*Scaled interaction energy*/
    const double alpha = 1;     /* proportion of atoms in first well*/

    const double eps = ]]>&Nx;<![CDATA[/(4* ]]>&xmax;<![CDATA[);   /*Zero point correction for intensity*/
    ]]>
  </globals>

  /*************/
  <field>
  /*************/
    <name>main</name>
    <dimensions>  x   </dimensions>
    <lattice>    &Nx;  </lattice>
    <domains>  (-&xmax;,&xmax;) </domains>
    <samples>1 </samples>
 
    /***MAIN***/
    <vector>
      <name>main</name>
      <type>complex</type>
      <components>phi</components>
      <fourier_space>no</fourier_space>
      <![CDATA[     
        double phi1 = exp(-(x-q)*(x-q)/(4.0*r*r))/sqrt(sqrt((2*Pi*r*r)*(2*Pi*r*r)*(2*Pi*r*r)));
        double phi2 = exp(-(x+q)*(x+q)/(4.0*r*r))/sqrt(sqrt((2*Pi*r*r)*(2*Pi*r*r)*(2*Pi*r*r)));
        
        phi = sqrt(n0*alpha)*phi1 + sqrt(n0*(1-alpha))*phi2+ (n_1+ i*n_2)/2.0;
      ]]>
    </vector>
  </field>

  /******************/
  <sequence>
  /******************/
    <integrate>
      <algorithm>SIIP</algorithm>
      <interval>2000</interval>
      <lattice>80000</lattice>
      <samples>1000 </samples>
      <k_operators>
        <constant>yes</constant>
        <operator_names>L</operator_names>
        <![CDATA[
          L = rcomplex(0.0,-kx*kx/2);
        ]]>
      </k_operators>
      <iterations>4</iterations>
      <vectors>main </vectors>
      <![CDATA[
        dphi_dt = L[phi] - i*K*~phi*phi*phi - i*b*(x*x-q*q)*(x*x-q*q)*phi;  
      ]]>
    </integrate>
  </sequence>

  /**************/
  <output>
  /**************/ 
    <filename>doublewell_wigner.xsil</filename>
    <group>
      <sampling>
        <fourier_space> no </fourier_space>
        <lattice>   &Nxplot; </lattice>
        <moments>N G2</moments>
          complex N =  phi*~phi - eps;          /*mean atomic density*/
          complex G2 =  phi*~phi*phi*~phi - 4*eps*~phi*phi + 2*eps*eps; /G2 correlation function*/
      </sampling>
    </group>
  </output>
</simulation>

Generated by GNU enscript 1.6.3.



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