gpe.ufg

gpe.ufg#

Extended Thomas Fermi model of the Unitary Fermi Gas.

Attributes#

Classes#

DimerStateMixinBase

Dimer state.

DimerStateMixin

Class with method to evolve and plot.

DimerStateCPU

Class with method to evolve and plot.

DimerState

Class with method to evolve and plot.

Experiment

Experimental setup.

Module Contents#

gpu[source]#
gpu = None[source]#
class DimerStateMixinBase[source]#

Bases: gpe.utils.GPUHelper

Dimer state.

This class represents a BEC of dimers.

m#

Dimer mass

Type:

float

Note#
Type:

Everything in the code, except for the functional, refers

to the dimer properties.  Thus m is the dimer mass, get_density()
returns the dimer density, etc.
_Vext = None[source]#
_memoize = False[source]#
property t_unit[source]#
property pxyz[source]#

Return pxyz as list of numpy arrays.

init()[source]#
property cooling_phase[source]#
property _phase[source]#
get_V_GPU()[source]#

Return the complete potential V - internal and external.

This function defines the non-linear interaction of the equations.

get_energy_density(energy=False)[source]#

Return the energy density.

Parameters:
  • energy (bool) – If True, then set self.mu = None during the computation so that the actual energy is computed. Otherwise, if self.mu is provided, then this is actually the grand potential including the mu*N subtraction. (See get_Vext_GPU which subtracts self.mu if it is not None.)

  • function (In this energy density)

  • density (we calculate the energy)

  • First (for the dimers in two ways.)

  • equation (we do it from)

  • it (of state (please see the method edf below) and then do)

  • Both (from explicit analytical expression with _factors.)

  • Hence (gives the same result and it has been tested carefully.)

:param : :param we have two Vint expressions. We use the one from edf as it is: :param easier to keep track. Both expressions can be used interchangably.:

get_energy(energy=False)[source]#

Return the energy of the state. Useful for minimization.

Parameters:

energy (bool) – If True, then set self.mu = None during the computation so that the actual energy is computed. Otherwise, if self.mu is provided, then this is actually the grand potential including the mu*N subtraction. (See get_Vext_GPU which subtracts self.mu if it is not None.)

get_Eint(nF=None)[source]#
get_velocity()[source]#

Returns superfluid velocity field in position space as an array.

get_current()[source]#

Calculating the probability current. Attributes: ———– _j : Probability current (shape = 3*N)

\(\frac{\hbar}{2*m*i} {\psi^* \nabla \psi - \psi \nabla \psi^*}\).

get_omegas()[source]#

Returns irrotational and compressible effective velocity field. Tsubota 2017, https://arxiv.org/abs/1704.02566, Eq. 79, 80.

get_Vint_GPU(nF=None)[source]#
get_Vext_GPU()[source]#

Return the external potential.

This delegates to the experiment get_VFext_GPU() and then includes an appropriate factor of 2 for the dimers.

get_Vext_mu_GPU()[source]#

Return Vext with the chemical potential subtracted if initializing.

The chemical potential should be subtracted if initializing or minimizing to get the initial state. Minimization might be done with imaginary time evolution, which should be done with negative times.

Thus, we check for self.initializing, self.t < 0, and make sure that self.mu is valid.

property mF[source]#

Fermion mass.

get_nF_GPU()[source]#
edf(nF, d=0)[source]#

Return the energy density of homogeneous matter.

Parameters:
  • nF (float) – Total fermion density = 2*dimer density

  • d (int) – Derivative.

get_nF_TF(muF=None)[source]#

Invert the edf to get nF(muF). Returns Thomas-Fermi density of the dimers.

Parameters:

muF (float) – Effective fermionic chemical potential. Usually muF_0 - V_F(x)

get_n_TF(V_TF=None, V_ext=None)[source]#

Return the Thomas Fermi density profile n (for dimers) from V_TF.

Parameters:

V_TF (float) – Value of V(x_TF) where the density should vanish in the TF limit.

get_healing_length()[source]#

Coherence length in dimensionless units.

get_c()[source]#

Speed of sound.

property txt[source]#

Text widget.

class DimerStateMixin[source]#

Bases: DimerStateMixinBase

Class with method to evolve and plot.

plot(log=False, slice=True)[source]#
plot_pv(n_nmax=0.5)[source]#
evolve_to(t, dt_t_scale=0.1)[source]#
evolve(steps=500, t__max=10000, dt_t_scale=0.1, display=True, pv=False, hist=False)[source]#

Time evolves a state.

Arguments:#

pv: bool

If True, does PyVista 3d plotting.

hist: bool

If True, returns a list of evolved states at different times.

t__maxfloat

Evolve up to this time (units of t_unit).

class DimerStateCPU(experiment, **kw)[source]#

Bases: DimerStateMixin, gpe.bec.StateBase

Class with method to evolve and plot.

experiment[source]#
class DimerState(experiment, **kw)[source]#

Bases: DimerStateMixin, gpu.bec.StateBase if gpu else gpe.bec.StateBase

Class with method to evolve and plot.

experiment[source]#
class Experiment(_local_dict=None, **kw)[source]#

Bases: gpe.utils.ExperimentBase, gpe.utils.GPUHelper

Experimental setup.

xi[source]#

Bertsch parameter.

Type:

float

Everything here refers to fermions.  External potentials
are defined for fermions, etc.
mF = 1.0[source]#
hbar = 1.0[source]#
State[source]#
Nxyz = (50, 50, 50)[source]#
kF = 1.0[source]#
dx_kF = 1.0[source]#
omega_eF = 0[source]#
cooling_phase = 1.0[source]#
normalized_cooling = True[source]#
fix_N = False[source]#
eta = 0.5[source]#
xi = 0.4[source]#
init()[source]#

Overload this to perform any initial computations.

property dim[source]#
property t_unit[source]#
get_state(t_=0, minimize=False, initialize=False, _E_tol=1e-12, _psi_tol=1e-12)[source]#

Quickly return a valid State object.

get_initial_state(psi0=None, _E_tol=1e-12, _psi_tol=1e-12, callback=None, **kw)[source]#

Return the valid t=0 state to initialize the simulations.

get_initialized_state(state)[source]#

Return a valid state initialized from state.

This is used in chained simulations where a specified state of one simulation is used to initialize a state for further use. For example, for expansion.

get_VFext_GPU(state)[source]#

Return the external potential for fermions.