1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
|
<?xml version="1.0" encoding="UTF-8"?>
<simulation xmds-version="2">
<testing>
<command_line>mpirun -n 4 ./RbGS</command_line>
<xsil_file name="RbGS.xsil" expected="RbGS_expected.xsil" absolute_tolerance="1e-4" relative_tolerance="1e-4" />
<xsil_file name="potential.xsil" expected="potential_expected.xsil" absolute_tolerance="1e-4" relative_tolerance="1e-4" />
<xsil_file name="RbGSa.xsil" expected="RbGSa_expected.xsil" absolute_tolerance="1e-4" relative_tolerance="1e-4" />
</testing>
<name>RbGS</name>
<author>Robin Stevenson</author>
<description>
Three dimensional harmonic trap Ground state calculation. cigar trap.
</description>
<features>
<halt_non_finite />
<auto_vectorise />
<benchmark />
<bing />
<!-- <openmp /> -->
<fftw plan="measure" />
<!-- <diagnostics /> -->
<globals>
<![CDATA[
/*constants*/
const double hbar = 1.054e-34;
const double massRb = 1.44316e-25;
const double c0OnHbar = 5.16891e-51/hbar; //for Rb-87
const double c2OnHbar = -2.38868e-53/hbar;
const double cd = 2.1501769e-54; // =mu0 * muB^2 *Gf^2 / 4pi --> this is for rubidium
const double cdOnHbar = 2.1501769e-54/hbar; // =mu0 * muB^2 *Gf^2 / 4pi --> this is for rubidium
const double gamma1 = 4.39943e10;
const double Sqrt2 = pow(2.0, 0.5);
const double a3dSqrt2 = 3.0/pow(2.0, 0.5);
const double Pi = 3.141592654;
/*experimental variables*/
const double ratio = 1.0/40.0;
const double omegap = 2*3.141592654*3000;
const double N0 = 1.0e5; //Note this change
const double B = 73.0e-7;
const double gamma1B = gamma1*B;
const double muOnHbar = 0.0*24411.0;
]]>
</globals>
</features>
<driver name="distributed-mpi" />
<geometry>
<propagation_dimension>t</propagation_dimension>
<transverse_dimensions>
<dimension name="x" lattice="32" domain="(-2.2e-6, 2.2e-6)" />
<dimension name="y" lattice="32" domain="(-2.2e-6, 2.2e-6)" />
<dimension name="z" lattice="32" domain="(-90.0e-6, 90.0e-6)" />
</transverse_dimensions>
</geometry>
<vector name="wavefunction" initial_basis="x y z" type="complex">
<components>
phi1 phi0 phim1
</components>
<initialisation>
<![CDATA[
phi1 = (x<1.0e-6 ? (y<1.0e-6 ? (z<40.0e-6 ? 1.0 : 0.0) : 0.0) : 0.0 );
phi0 = 0.0;
phim1 = 0.0;
]]>
</initialisation>
</vector>
<vector name="potential" type="double">
<components>
VtrapOnHbar
</components>
<initialisation>
<![CDATA[
//VtrapOnHbar = 0.5* massRb * omegap*omegap*(x*x + y*y + z*z*ratio*ratio);
VtrapOnHbar = x*x+y*y+z*z*ratio*ratio < 2.0*2.0e-12 ? 0.5 * massRb * omegap * omegap * (x*x+y*y+z*z*ratio*ratio)/hbar-muOnHbar : 0.5 * massRb * omegap * omegap * 2.0*2.0e-12/hbar-muOnHbar;
]]>
</initialisation>
</vector>
<computed_vector name="spins" type="complex">
<components>
Sz Splus Sminus S0
</components>
<evaluation>
<dependencies>
wavefunction
</dependencies>
<![CDATA[
S0 = mod2(phi1) + mod2(phi0) + mod2(phim1);
Splus = conj(phi1)*phi0 + conj(phi0)*phim1;
Sminus = conj(phi0)*phi1 + conj(phim1)*phi0;
//Sx = Sqrt2*(phi1.re * phi0.re - phi1.im * phi0.im + phi0.re * phim1.re - phi0.im * phim1.im);
//Sy = Sqrt2*(phim1.im * phi0.re - phim1.re * phi0.im - phi0.re * phi1.im + phi0.im * phi1.re);
Sz = mod2(phi1)- mod2(phim1);
// Splus = Sx + i*Sy;
// Sminus = conj(Splus);
]]>
</evaluation>
</computed_vector>
<computed_vector type="complex" name="bilinear" dimensions="x y z">
<components>b11 bm1m1 b10 b01 bm10 b0m1</components>
<evaluation>
<dependencies fourier_space="x y z">wavefunction</dependencies>
<![CDATA[
b11 = mod2(phi1);
bm1m1 = mod2(phim1);
b10 = conj(phi1)*phi0;
b01 = conj(phi0)*phi1;
bm10 = conj(phim1)*phi0;
b0m1 = conj(phi0)*phim1;
]]>
</evaluation>
</computed_vector>
<vector name="DipoleTerms" type="complex" initial_basis="kx ky kz">
<components>DA DB DC DCstar DE DEstar</components>
<initialisation>
<![CDATA[
double Ksqd = kx*kx + ky*ky + kz*kz;
DA = Ksqd<1.0 ? 0.0*i : -4*Pi/3 * (1 - 3 * kz*kz /Ksqd) + 0.0*i;
DB = Ksqd<1.0 ? 0.0*i : 2*Pi/3 * (1 - 3 * kz*kz /Ksqd) + 0.0*i;
DC = Ksqd<1.0 ? 0.0*i : 2* 2*Pi/3 * (kx - i * ky)*kz/Ksqd;
DCstar = Ksqd<1.0 ? 0.0*i : 2* 2*Pi/3 * (kx + i * ky)*kz/Ksqd;
DE = Ksqd < 1.0 ? 0.0*i : -4*Pi/3 * (kx - i*ky)*(kx - i*ky) / Ksqd;
DEstar = Ksqd < 1.0 ? 0.0*i : -4*Pi/3 * (kx + i*ky)*(kx + i*ky) / Ksqd;
]]>
</initialisation>
</vector>
<computed_vector name="dipoles" type="complex" dimensions="x y z">
<components>Dz Dplus Dminus</components>
<evaluation>
<dependencies fourier_space="kx ky kz">DipoleTerms bilinear</dependencies>
<![CDATA[
Dz = DA*(b11 - bm1m1) - a3dSqrt2 * DC*(b10 + b0m1) - a3dSqrt2 * DCstar*(bm10 + b01);
Dplus = DB*(b10 + b0m1) -1.5 * DEstar*(b01 + bm10) - a3dSqrt2 * DCstar*(b11 - bm1m1);
Dminus = DB*(b01 + bm10) -1.5 * DE*(b10 + b0m1) - a3dSqrt2 * DC*(b11 - bm1m1);
]]>
</evaluation>
</computed_vector>
<computed_vector name="normalisation" dimensions="" type="double">
<components>
Ncalc
</components>
<evaluation>
<dependencies fourier_space="x y z">wavefunction</dependencies>
<![CDATA[
// Calculate the current normalisation of the wave function.
Ncalc = mod2(phi1) + mod2(phi0) + mod2(phim1);
]]>
</evaluation>
</computed_vector>
<sequence>
<breakpoint filename="potential.xsil">
<dependencies>
potential
</dependencies>
</breakpoint>
<integrate algorithm="RK4" interval="15.0e-7" steps="5">
<samples>1 1 1 1</samples>
<filters>
<filter>
<dependencies>wavefunction normalisation</dependencies>
<![CDATA[
// Correct normalisation of the wavefunction
phi1 *= sqrt(N0/Ncalc);
phi0 *= sqrt(N0/Ncalc);
phim1 *= sqrt(N0/Ncalc);
]]>
</filter>
</filters>
<operators>
<operator kind="ip" constant="yes">
<operator_names>T</operator_names>
<![CDATA[
T = -0.5*hbar*(kx*kx+ky*ky+kz*kz)/massRb;
]]>
</operator>
<dependencies>potential spins dipoles</dependencies>
<integration_vectors>wavefunction</integration_vectors>
<![CDATA[
dphi1_dt = T[phi1] + ((-VtrapOnHbar)*phi1 -c0OnHbar*S0*phi1 -c2OnHbar*(Sz*phi1 + Sminus*phi0) +gamma1B*phi1 -cdOnHbar*(phi1*Dz + phi0*Dminus));
dphi0_dt = T[phi0] + ((-VtrapOnHbar)*phi0 -c0OnHbar*S0*phi0 -c2OnHbar*(Splus*phi1 + Sminus*phim1) -cdOnHbar*(phi1*Dplus + phim1*Dminus));
dphim1_dt = T[phim1] + ((-VtrapOnHbar)*phim1 -c0OnHbar*S0*phim1 -c2OnHbar*(-Sz*phim1 + Splus*phi0) -gamma1B*phim1 -cdOnHbar*(-phim1*Dz + phi0*Dplus));
]]>
</operators>
</integrate>
<filter>
<dependencies>wavefunction normalisation</dependencies>
<![CDATA[
// Correct normalisation of the wavefunction
phi1 *= sqrt(N0/Ncalc);
phi0 *= sqrt(N0/Ncalc);
phim1 *= sqrt(N0/Ncalc);
]]>
</filter>
<breakpoint filename="potential.xsil">
<dependencies>
potential
</dependencies>
</breakpoint>
<breakpoint filename="RbGSa.xsil">
<dependencies>
wavefunction
</dependencies>
</breakpoint>
</sequence>
<output format="binary">
<sampling_group initial_sample="no">
<dimension name="x" lattice="16" fourier_space="no" />
<dimension name="y" lattice="16" fourier_space="no" />
<dimension name="z" fourier_space="no" />
<moments>phi1re dens0 densm1 phi1im dens1</moments>
<dependencies>wavefunction</dependencies>
<![CDATA[
dens1 = mod2(phi1);
densm1 = mod2(phim1);
phi1re = real(phi1);
dens0 = mod2(phi0);
phi1im = imag(phi1);
]]>
</sampling_group>
<sampling_group initial_sample="no">
<dimension name="x" lattice="16" fourier_space="yes" />
<dimension name="y" lattice="16" fourier_space="yes" />
<dimension name="z" fourier_space="yes" />
<moments>dens1</moments>
<dependencies>wavefunction</dependencies>
<![CDATA[
dens1 = mod2(phi1);
]]>
</sampling_group>
<sampling_group initial_sample="yes">
<dimension name="x" lattice="0" fourier_space="no" />
<dimension name="y" lattice="0" fourier_space="no" />
<dimension name="z" lattice="0" fourier_space="no" />
<moments>N1 N0 Nm1</moments>
<dependencies>wavefunction</dependencies>
<![CDATA[
N1 = mod2(phi1);
N0 = mod2(phi0);
Nm1 = mod2(phim1);
]]>
</sampling_group>
<sampling_group initial_sample="no">
<dimension name="x" lattice="0" fourier_space="no" />
<dimension name="y" lattice="0" fourier_space="no" />
<dimension name="z" lattice="0" fourier_space="no" />
<moments>E1OnHbarRe E1OnHbarIm</moments>
<operator kind="ex" constant="no">
<operator_names>T2</operator_names>
<![CDATA[
T2 = -0.5*hbar*(kx*kx+ky*ky+kz*kz)/massRb;
]]>
</operator>
<dependencies>wavefunction potential spins dipoles</dependencies>
<![CDATA[
E1OnHbarRe = real(conj(phi1)*(T2[phi1] + (-VtrapOnHbar)*phi1 -c0OnHbar*S0*phi1 -c2OnHbar*(Sz*phi1 + Sminus*phi0) +gamma1B*phi1 -cdOnHbar*(phi1*Dz + phi0*Dminus)));
E1OnHbarIm = imag(conj(phi1)*(T2[phi1] + (-VtrapOnHbar)*phi1 -c0OnHbar*S0*phi1 -c2OnHbar*(Sz*phi1 + Sminus*phi0) +gamma1B*phi1 -cdOnHbar*(phi1*Dz + phi0*Dminus)));
]]>
</sampling_group>
</output>
<info>
Script compiled with xpdeint version VERSION_PLACEHOLDER (SUBVERSION_REVISION_PLACEHOLDER)
See http://www.xmds.org for more information.
</info>
<XSIL Name="moment_group_1">
<Param Name="n_independent">3</Param>
<Array Name="variables" Type="Text">
<Dim>8</Dim>
<Stream><Metalink Format="Text" Delimiter=" \n"/>
x y z phi1re dens0 densm1 phi1im dens1
</Stream>
</Array>
<Array Name="data" Type="double">
<Dim>16</Dim>
<Dim>16</Dim>
<Dim>32</Dim>
<Dim>8</Dim>
<Stream><Metalink Format="Binary" UnsignedLong="uint32" precision="double" Type="Remote" Encoding="LittleEndian"/>
RbGS_expected_mg0.dat
</Stream>
</Array>
</XSIL>
<XSIL Name="moment_group_2">
<Param Name="n_independent">3</Param>
<Array Name="variables" Type="Text">
<Dim>4</Dim>
<Stream><Metalink Format="Text" Delimiter=" \n"/>
kx ky kz dens1
</Stream>
</Array>
<Array Name="data" Type="double">
<Dim>16</Dim>
<Dim>16</Dim>
<Dim>32</Dim>
<Dim>4</Dim>
<Stream><Metalink Format="Binary" UnsignedLong="uint32" precision="double" Type="Remote" Encoding="LittleEndian"/>
RbGS_expected_mg1.dat
</Stream>
</Array>
</XSIL>
<XSIL Name="moment_group_3">
<Param Name="n_independent">1</Param>
<Array Name="variables" Type="Text">
<Dim>4</Dim>
<Stream><Metalink Format="Text" Delimiter=" \n"/>
t N1 N0 Nm1
</Stream>
</Array>
<Array Name="data" Type="double">
<Dim>2</Dim>
<Dim>4</Dim>
<Stream><Metalink Format="Binary" UnsignedLong="uint32" precision="double" Type="Remote" Encoding="LittleEndian"/>
RbGS_expected_mg2.dat
</Stream>
</Array>
</XSIL>
<XSIL Name="moment_group_4">
<Param Name="n_independent">0</Param>
<Array Name="variables" Type="Text">
<Dim>2</Dim>
<Stream><Metalink Format="Text" Delimiter=" \n"/>
E1OnHbarRe E1OnHbarIm
</Stream>
</Array>
<Array Name="data" Type="double">
<Dim>2</Dim>
<Stream><Metalink Format="Binary" UnsignedLong="uint32" precision="double" Type="Remote" Encoding="LittleEndian"/>
RbGS_expected_mg3.dat
</Stream>
</Array>
</XSIL>
</simulation>
|