-
Notifications
You must be signed in to change notification settings - Fork 0
st wslda examples
Gabriel Wlazłowski edited this page Feb 20, 2024
·
5 revisions
[[TOC]]
Target: generate solution in a 1D potential well
Code: st-wslda-1d
Settings:
Output:
Simple plotting script:
import numpy as np
import matplotlib.pyplot as plt
from wdata.io import WData, Var
data = WData.load("only-trap.wtxt")
fig, ax = plt.subplots()
ax.plot(data.xyz[0], data.rho_a[-1]*2, color='red', label=r'density', lw=3.0) # plot last frame [-1]
ax.set(xlabel='x', ylabel=r'$n(x)$')
ax2 = ax.twinx() # instantiate a second axes that shares the same x-axis
ax2.plot(data.xyz[0], np.angle(data.delta[-1])/np.pi, color='blue', label=r'arg. of phase', lw=2.0, ls="--") # plot last frame [-1]
ax2.set(ylabel=r'$V_{ext}(x)$')
fig.legend(loc="upper left", bbox_to_anchor=(0.3,0.3), bbox_transform=ax.transAxes)
fig.savefig("only-trap.png")
Target: on top of the Example 1 imprint soliton.
Code: st-wslda-1d
Settings:
Output:
Simple plotting script:
import numpy as np
import matplotlib.pyplot as plt
from wdata.io import WData, Var
data = WData.load("soliton-x0.wtxt")
fig, ax = plt.subplots()
ax.plot(data.xyz[0], data.rho_a[-1]*2, color='red', label=r'density', lw=3.0) # plot last frame [-1]
ax.set(xlabel='x', ylabel=r'$n(x)$')
ax2 = ax.twinx() # instantiate a second axes that shares the same x-axis
ax2.plot(data.xyz[0], np.angle(data.delta[-1])/np.pi, color='blue', label=r'arg. of phase', lw=2.0, ls="--") # plot last frame [-1]
ax2.set(ylabel=r'$Arg[\Delta](x)/\pi$')
fig.legend(loc="upper left", bbox_to_anchor=(0.15,0.3), bbox_transform=ax.transAxes)
fig.savefig("soliton-x0.png")
Target: find a static solution of gas confined in harmonic trap:
Code: st-wslda-2d
Note: in the computation, a smoothed harmonic potential was used, see Fig. 4 of arXiv:1711.05803
Settings:
Output:
For other examples you can see [here](st-wslda examples archival).