Kai-E-Yang / GPE-Solver

Split-step solver for the 3D (dipolar) Gross-Pitaevskii equation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dipolar Gross-Pitaevskii Solver

gpepython is a split-step solver for the (dipolar) Gross-Pitaevskii equation. The main part of the code is written in C++ and parallelized using OpenMP. The simulations can be controlled through a Python interface.

Dipolar Bose gas in a triple-well potential

Sample simulation

# simple.py

from gpe import HarmonicTrapGPE, GPE

# Load GPE
sim = HarmonicTrapGPE("Simple", 1.0, 1.0, 1.0)

# Grid parameters
sim.setGridSize(32)

# Contact interaction
# Only the product (atomNumber - 1) * scatteringLength is important
sim.set("atomNumber",       2)
sim.set("scatteringLength", 1)

# Dipolar interaction (switched off)
sim.set("dipolarLength", 0)
sim.set("evolutionDipolar", False)

# Number of threads. Equals number of cores if not set
# sim.setThreads(4)

sim.initialize()

# Imaginary time evolution
sim.ite(steps=10000, monitorSteps=500, plotSteps=500)

Installation

Dependencies needed:

  • Recent version of g++ with C++0x and OpenMP support
  • Multi-threaded fftw3
  • Boost with support for Python
  • Works with both Python 2 and 3 (see Makefile, tested with 2.7 and 3.4)

Run make in the gpe folder.

Documentation

See appendix C of this thesis.

About

Split-step solver for the 3D (dipolar) Gross-Pitaevskii equation

License:MIT License


Languages

Language:C++ 82.1%Language:Python 16.3%Language:Makefile 1.6%