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

td wslda examples · Changes

Page history
Create td wslda examples authored Feb 20, 2024 by Gabriel Wlazłowski's avatar Gabriel Wlazłowski
Hide whitespace changes
Inline Side-by-side
td-wslda-examples.md 0 → 100644
View page @ cd56d085
# Example 1: Time-dependent external potential
Target: find a time evolution of the unitary Fermi gas confined in a harmonic trap:
```math
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](uploads/fa2a85fae8ae389f5856b11ab0d63ca5/trap-1d_predefines.h)
* [trap-1d_problem-definition.h](uploads/4dbed95bba4ab63fd9d109993b1da1dc/trap-1d_problem-definition.h)
* [trap-1d_logger.h](uploads/674dcdf9f8827ade7b0dcae0aafb124a/trap-1d_logger.h)
* [trap-1d_input.txt](uploads/a3660b6b3e7397ca478080818e56ab90/trap-1d_input.txt)
Output:
* [trap-1d.stdout](uploads/30ac8d3313e93f3554505a081f186cf1/trap-1d.stdout)
## Step 2: Execute time evolution
Code: `td-wslda-2d`
Settings:
* [trap-2d-alpha0.0_predefines.h](uploads/e3cf4756f7c5ef870d36dab31def1914/trap-2d-alpha0.0_predefines.h)
* [trap-2d-alpha0.0_problem-definition.h](uploads/59850de149fd98c21b8575d3a1514f30/trap-2d-alpha0.0_problem-definition.h)
* [trap-2d-alpha0.0_logger.h](uploads/0a334f058908f7f0ea0b1b1e15ee4d10/trap-2d-alpha0.0_logger.h)
* [trap-2d-alpha0.0_input.txt](uploads/9edac616780f9196c9ccf3253fedc6a9/trap-2d-alpha0.0_input.txt)
Output:
* [trap-2d-alpha0.0.stdout](uploads/3221116b30a9e6cb500544f943a4e5e1/trap-2d-alpha0.0.stdout)
* [trap-2d-alpha0.0.wlog](uploads/cc008e14db1172dd5e7c9df0b7c63472/trap-2d-alpha0.0.wlog)
![td-snapshots](uploads/baa3c05d97b6c92f57aa97f9f6d3dec4/td-snapshots.png)
Energy evolution:
```python
import numpy as np
import matplotlib.pyplot as plt
data = np.loadtxt("/home/gabrielw/sshfs/lumi/scratch/quantum_friction/td-ho-gw/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](uploads/9dda79ee393867e04648651d71783ed5/energy-conservation.png)
\ No newline at end of file
Clone repository
  • API version
  • Automatic interpolations
  • Auxiliary tools
  • Browsing the code
  • Broyden algorithm
  • C and CUDA
  • Campaign of calculations
  • Checking correctness of settings
  • Chemical potentials control
  • Code & Results quality
  • Common failures of static codes
  • Common failures of time dependent codes
  • Computation domain
  • Configuring GPU machine
  • Constraining densities and potentials
View All Pages