Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wslda wslda
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wsldawslda
  • Wiki
  • td wslda examples

Last edited by Gabriel Wlazłowski Feb 20, 2024
Page history

td wslda examples

  • Example 1: Time-dependent external potential
    • Step 1: Find the static solution
    • Step 2: Execute time evolution

Example 1: Time-dependent external potential

Target: find a time evolution of the unitary Fermi gas confined in a harmonic trap:

V_{\textrm{ext}}(x,y,z,t) = \frac{m\omega_x^2 x^2}{2} + A(t)\frac{m\omega_y^2 y^2}{2}

where A(t) is a function that smoothly rises from zero to one within a given time interval.

Step 1: Find the static solution

The initial external potential is V_{\textrm{ext}}(x,y,z) = \frac{m\omega_x^2 x^2}{2}, and we can use 1d code.

Code: st-wslda-1d

Settings:

  • trap-1d_predefines.h
  • trap-1d_problem-definition.h
  • trap-1d_logger.h
  • trap-1d_input.txt

Output:

  • trap-1d.stdout

Step 2: Execute time evolution

Code: td-wslda-2d

Settings:

  • trap-2d-alpha0.0_predefines.h
  • trap-2d-alpha0.0_problem-definition.h
  • trap-2d-alpha0.0_logger.h
  • trap-2d-alpha0.0_input.txt

Output:

  • trap-2d-alpha0.0.stdout
  • trap-2d-alpha0.0.wlog

td-snapshots

Energy evolution:

import numpy as np
import matplotlib.pyplot as plt

data = np.loadtxt("trap-2d-alpha0.0.wlog", usecols=(1,4,5))

fig, ax = plt.subplots()
ax.plot(data[:,0], data[:,2], color='red', label=r'energy', lw=3.0)
ax.set(xlabel=r'$t\varepsilon_F$', ylabel=r'$E/E_{ffg}$')
ax2 = ax.twinx()  # instantiate a second axes that shares the same x-axis
ax2.plot(data[:,0], data[:,1], color='blue', label=r'particle number', lw=2.0, ls="--") # plot last frame [-1]
ax2.set(ylabel=r'$N$')
fig.legend(loc="upper left", bbox_to_anchor=(0.3,0.3), bbox_transform=ax.transAxes)
fig.savefig("energy-conservation.png")

energy-conservation

Clone repository

Content of Documentation
Official webpage
W-BSK Toolkit