|
parosc_p.xmds
Script source: parosc_p.xmds.gz
<?xml version="1.0"?>
<!--Example parametric oscilator simulation using +P function-->
<!--Pump has been adiabatically eliminated, to give a 2-photon loss-->
<simulation>
<name>parosc_p</name>
<author>Joel Corney</author>
<description>
Example parametric oscilator simulation using +P function
Pump has been adiabatically eliminated, to give a 2-photon loss
</description>
<prop_dim>t</prop_dim>
<error_check>yes</error_check>
<stochastic>yes</stochastic>
<paths>1000</paths>
<use_mpi>no</use_mpi>
<seed>1 2</seed>
<noises>2</noises>
/***********/
<globals>
/***********/
<![CDATA[
const double Pi = 2.0*asin(1.0);
/*Simulation Parameters*/
const double kappa1 = 1; /*Damping of alpha-mode*/
const double kappa2 = 500; /*Damping of gamma-mode*/
const double g = 10; /*Parametric coupling*/
const double epsilon = 75; /*Driving*/
/*Scaled parameters*/
const double lambda = g*epsilon/kappa2;
const double h = g/sqrt(2*kappa2);
]]>
</globals>
/*************/
<field>
/*************/
<name>main</name>
<samples>1</samples>
/***MAIN***/
<vector>
<name>main</name>
<type>complex</type>
<components>alpha1 alpha2</components>
<fourier_space>no</fourier_space>
<![CDATA[
/* NB: We take the '2' variables to be the conjugates */
alpha1 = rcomplex(sqrt((lambda- kappa1)/(h*h)),0.0);
alpha2 = rcomplex(sqrt((lambda- kappa1)/(h*h)),0.0);
]]>
</vector>
</field>
/******************/
<sequence>
/******************/
<integrate>
<algorithm>SIIP</algorithm>
<interval>500</interval>
<lattice>50000</lattice>
<samples>1000</samples>
<iterations>4</iterations>
<vectors>main</vectors>
<![CDATA[
complex s1 = c_sqrt(lambda - h*h*alpha1*alpha1); /*Noise Correlations*/
complex s2 = c_sqrt(lambda - h*h*alpha2*alpha2); /*Noise Correlations*/
dalpha1_dt = (h*h/2 - kappa1)*alpha1 + (lambda - h*h*alpha1*alpha1)*alpha2
+ s1*n_1 ;
dalpha2_dt = (h*h/2 - kappa1)*alpha2 + (lambda - h*h*alpha2*alpha2)*alpha1
+ s2*n_2;
]]>
</integrate>
</sequence>
/**************/
<output>
<filename>parosc_p.xsil</filename>
<group>
<sampling>
<vectors>main</vectors>
<moments>N_alpha N_alphai alpha_x alpha_y alpha_x2 alpha_y2</moments>
<![CDATA[
N_alpha = alpha1*alpha2 ;
N_alphai = imag(alpha1*alpha2);
alpha_x = (alpha1 + alpha2)/2;
alpha_y = (alpha1 - alpha2)/(2*i);
alpha_x2 = (alpha1 + alpha2)*(alpha1 + alpha2)/4.0 + 1.0/4.0;
alpha_y2 = -(alpha1 - alpha2)*(alpha1 - alpha2)/4.0 + 1.0/4.0;
]]>
</sampling>
</group>
</output>
</simulation>
Generated by GNU enscript 1.6.3.
|