simbi.thermal package

Submodules

simbi.thermal.custom_polylog module

These functions are modified from the mpmath library to work with numpy arrays.

simbi.thermal.custom_polylog.polylog(z, s)[source]
simbi.thermal.custom_polylog.polylog_general_np(z, s)[source]

The SciPy gamma and zeta functions give infinity if the values for s is an integer. We can thus add a small number to s to avoid this while still getting approximately the correct answer when compared to Mathematica.

simbi.thermal.custom_polylog.polylog_no(z, s)[source]
simbi.thermal.custom_polylog.polylog_series_np(z, s)[source]

simbi.thermal.enhanced_bose module

Calculates density, integrated densities, atom numbers and trap sizes for thermal atoms in or released from a harmonic trap.

simbi.thermal.enhanced_bose.expansion_time_prefactor(t, trap_freqs)[source]

Cloud expansion after release from the trap results in the peak density being attenuated. This function calculates that attenuation pre-factor

Parameters:
  • t (float) – Time after release from the trap.

  • trap_freqs (tuple[float, float, float]) – The three trap frequencies.

Returns:

Attenuation pre-factor.

Return type:

prefactor

simbi.thermal.enhanced_bose.get_axis_sigma(wi, m, T, t)[source]

Each trapping axis has an an associated sigma length (which goes in the Gaussian part of the function) and we calculate that here (see accompanying derivation document for more details)

Parameters:
  • wi (float) – Trap frequency along the axis.

  • m (float) – Mass of the particle.

  • T (float) – Temperature of the cloud.

  • t (float) – Time after release from the trap.

Returns:

Sigma length along the axis.

Return type:

sigma

simbi.thermal.enhanced_bose.get_fugacity(mu, T)[source]

Definition of fugacity can be found in 1st chapter of Pethick & Smith

Parameters:
  • mu (float) –

  • T (float) –

Return type:

float

simbi.thermal.enhanced_bose.get_gaussian(coords, trap_freqs, m, T, t)[source]
Calculates the 1D, 2D, or 3D Gaussian function which goes in the

polylog function.

Parameters:
  • coords (Iterable[ndarray]) – List of coordinate arrays, e.g., [X, Y, Z].

  • trap_freqs (list[float]) – Trap frequencies which match the coordinate arrays in coords (i.e., along the same axis).

  • m (float) – Mass of the particles.

  • T (float) – Temperature.

  • t (float) – Time.

Returns:

Value of the N-dimensional Gaussian function at the

coordinate positions given.

Return type:

np.ndarray

simbi.thermal.enhanced_bose.get_integrated_prefactor(m, T, mu, t, trap_freqs=[])[source]

When the density is integrated along one or more axes it adds an integrated prefactor to the resulting density equation. The trap_freqs list contains the trap frequencies only for the axes we are integrating along. If the full 3D density is being calculated the prefactor is one

Parameters:
  • m (float) – Mass of the particle.

  • T (float) – Temperature of the cloud.

  • mu (float) – Chemical potential of the cloud.

  • t (float) – Time after release from the trap.

  • trap_freqs (list) – List of trap frequencies along the axes which are being integrated over.

Returns:

Integrated prefactor.

Return type:

prefactor

simbi.thermal.enhanced_bose.get_mu(trap_freqs, T, nex, tol=1e-10)[source]
Calculates the chemical potential of the system given a total

excited atom number and the temperature.

Parameters:
  • trap_freqs (list[float]) – The trapping frequencies in each direction

  • T (float) – The temperature of the system

  • nex (float) – The total number of excited atoms in the system

  • tol (float, optional) – The tolerance of the minimization. Defaults to 1e-10.

Returns:

The chemical potential of the system res, object: The result of the minimization

Return type:

mu

simbi.thermal.enhanced_bose.get_prefactor(efreqs, ifreqs, m, T, mu, t)[source]

Calculates all the prefactor needed for the density in one, two, or three dimensions.

Parameters:
  • efreqs (List[float]) – Trap frequencies along the axes which are not integrated over when calculating the density.

  • ifreqs (List[float]) – Trap frequencies along the axes which are being integrated.

  • m (float) – Mass of the particles.

  • T (float) – Temperature.

  • mu (float) – Chemical potential.

  • t (float) – Time.

Returns:

The total calculated prefactor.

Return type:

prefactor

simbi.thermal.enhanced_bose.get_sigmas(trap_freqs, m, T, mu, t)[source]

Calculates in-trap sigmas and sigmas after expansion

Parameters:
  • trap_freqs (list[float]) – The trapping frequencies in each direction

  • m (float) – The mass of each particle

  • T (float) – The temperature of the system

  • mu (float) – The chemical potential of the system

  • t (float, optional) – The time in the simulation. Defaults to 0.

Returns:

The sigmas of the cloud in the trap t_sigmas: The sigmas of the cloud after expansion

Return type:

init_sigmas

simbi.thermal.enhanced_bose.get_temperature(trap_freqs, mu, nex, tol=1e-10)[source]

Calculates the temperature of the system given a total excited atom number and the chemical potential.

Parameters:
  • trap_freqs (list[float]) – The trapping frequencies in each direction

  • mu (float) – The chemical potential of the system

  • nex (float) – The total number of excited atoms in the system

  • tol (float, optional) – The tolerance of the minimization. Defaults to 1e-10.

Returns:

The temperature of the system

Return type:

T

simbi.thermal.enhanced_bose.get_thermal_wavelength(m, T)[source]

The de Broglie wavelength.

Parameters:
  • m (float) –

  • T (float) –

Return type:

float

simbi.thermal.enhanced_bose.thermal_atom_number(trap_freqs, mu, T)[source]

The total atom number, analytically calculated.

Parameters:
  • trap_freqs (list[float]) – The trapping frequencies in each direction

  • mu (float) – The chemical potential of the system

  • T (float) – The temperature of the system

Returns:

The total number of excited atoms in the system

Return type:

excited_atom_number

simbi.thermal.enhanced_bose.thermal_density(coords, trap_freqs, m, T, mu, t)[source]

Calculates atomic density for a thermal cloud in a harmonic trap or released from a harmonic trap. The density integrated along one or two axes can also be calculated.

Parameters:
  • coords (Iterable[ndarray]) – List of coordinate arrays, i.e., [X, Y, Z].

  • efreqs – Trap frequencies along the axes which are not integrated over when calculating the density.

  • ifreqs – Trap frequencies along the axes which are being integrated.

  • trap_freqs (list[float]) –

  • m (float) –

  • T (float) –

  • mu (float) –

  • t (float) –

Returns:

Atomic density or integrated atomic density.

Return type:

density

Module contents

Created on Mon Mar 14 19:26:59 2022

@author: hofer