ndparamp.xmds

Script source:
ndparamp.xmds.gz

<?xml version="1.0"?>
<!--Non-Degenerate Parametric Amplifier-->
<!--Simulton formation for logical switching-->

<simulation>

  <name>ndparamp</name>
  <prop_dim>z</prop_dim>
  <error_check>yes</error_check>
  <type>stochastic</type>

  <globals>
    <![CDATA[
    const double e1 =350;
    const double e2 =350;
    const double r1 = 1;
    const double r2 = 1;
    const double vy1 =  0.5;
    const double vy2 = -0.5;
    const double yc1 = -0.2;
    const double yc2 =  0.2;
    const double tc1 = 0;
    const double tc2 = 0;

    double amp1=sqrt(e1/2/M_PI/r1/r1);
    double amp2=sqrt(e2/2/M_PI/r2/r2);
    ]]>
  </globals>

  <field>
    <name>main</name>
    <dimensions>   y       t     </dimensions>
    <lattice>     100     100    </lattice>
    <domains>  (-10,10) (-10,10) </domains>
    <samples>1 1</samples>

    <vector>
      <name>main</name>
      <type>complex</type>
      <components>ff1 ff2 sh</components>
      <fourier_space>no no</fourier_space>
      <![CDATA[
      ff1 = pcomplex(amp1*exp(-pow((y - yc1)/r1/2,2)
      -pow((t - tc1)/r1/2,2)),+vy1*y);
      ff2 = pcomplex(amp2*exp(-pow((y - yc2)/r2/2,2)
      -pow((t - tc2)/r2/2,2)),+vy2*y);
      sh  = rcomplex(0,0);
      ]]>
    </vector>

    <vector>
      <name>vc1</name>
      <type>double</type>
      <components>damping</components>
      <fourier_space>no no</fourier_space>
      <![CDATA[
      damping=1.0*(1-exp(-pow((y*y + t*t)/8/8,10)));
      ]]>
    </vector>
  </field>

  <sequence>
    <integrate>
      <algorithm>RK4IP</algorithm>
      <interval>10</interval>
      <lattice>500</lattice>
      <samples>50 50</samples>
      <k_operators>
	<constant>yes</constant>
	<operator_names>Lap1 Lap2</operator_names>
	<![CDATA[
	Lap1 = i*(-(ky*ky + kt*kt)   - 1);
	Lap2 = i*(-(ky*ky + kt*kt)/2 - 1);
	]]>
      </k_operators>
      <iterations>3</iterations>
      <vectors>main vc1</vectors>
      <![CDATA[
      dff1_dz = Lap1[ff1] + i*~ff2*sh  - damping*ff1;
      dff2_dz = Lap1[ff2] + i*~ff1*sh  - damping*ff2;
      dsh_dz  = Lap2[sh]  + i* ff1*ff2 - damping* sh;
      ]]>
    </integrate>
  </sequence>

  <output>

    <group>
      <sampling>
	<fourier_space> no  no </fourier_space>
	<lattice>       50  0  </lattice>
	<moments>pow_dens</moments>
	<![CDATA[
	pow_dens = ~ff1*ff1 + ~ff2*ff2 + 2*~sh*sh;
	]]>
      </sampling>
    </group>

    <group>
      <sampling>
	<fourier_space> no  no </fourier_space>
	<lattice>       0  0  </lattice>
	<moments>etot</moments>
	<![CDATA[
	etot = ~ff1*ff1 + ~ff2*ff2 + 2*~sh*sh;
	]]>
      </sampling>
    </group>
  </output>
</simulation>

Generated by GNU enscript 1.6.3.



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