supersolids.helper.functions

Functions for Potential and initial wave function \(\psi_0\)

Module Contents

Classes

Resolution

Specifies the resolution of the simulation in x, y, z directions (1D, 2D, 3D).

Box

Specifies the ranges in which the simulation is calculated (1D, 2D or 3D).

Functions

BoxResAssert(Res, Box)

aResAssert(Res, a)

lambda_parsed(s)

get_meshgrid(x, y)

get_meshgrid_3d(x, y, z)

get_parameters(N = 10**4, m = 164 * constants.u_in_kg, a_s = 90.0 * constants.a_0, a_dd = 130.0 * constants.a_0, w_x = 2.0 * np.pi * 30.0)

get_g(N, a_s_l_ho_ratio)

g_qf_helper(m = 164 * constants.u_in_kg, a_s = 90.0 * constants.a_0, a_dd = 130.0 * constants.a_0, w_x = 2.0 * np.pi * 30.0)

get_g_qf(N, a_s_l_ho_ratio, epsilon_dd)

get_l_ho(m = 164.0 * constants.u_in_kg, w_x = 2.0 * np.pi * 30.0)

get_alphas(w_x = 2.0 * np.pi * 30.0, w_y = 2.0 * np.pi * 30.0, w_z = 2.0 * np.pi * 30.0)

psi_gauss_2d_pdf(pos, mu=np.array([0.0, 0.0]), var=np.array([[1.0, 0.0], [0.0, 1.0]]))

Gives values according to gaus dirstribution (2D)

psi_gauss_2d(x, y, a = 1.0, x_0 = 0.0, y_0 = 0.0, k_0 = 0.0)

Gaussian wave packet of width a and momentum k_0, centered at x_0

psi_gauss_3d(x, y, z, a_x = 1.0, a_y = 1.0, a_z = 1.0, x_0 = 0.0, y_0 = 0.0, z_0 = 0.0, k_0 = 0.0)

Gaussian wave packet of width a and momentum k_0, centered at x_0

psi_gauss_1d(x, a = 1.0, x_0 = 0.0, k_0 = 0.0)

Gaussian wave packet of width a and momentum k_0, centered at x_0

psi_pdf(x, loc = 0.0, scale = 1.0)

Mathematical function of gauss pulse

psi_rect(x, x_min = -0.5, x_max = 0.5, a = 1.0)

Mathematical function of rectangular pulse

psi_gauss_solution(x)

Mathematical function of solution of non-linear Schroedinger for g=0

thomas_fermi_1d(x, g = 0.0)

Mathematical function of Thomas-Fermi distribution with coupling constant g

thomas_fermi_2d(x, y, g = 0.0)

Mathematical function of Thomas-Fermi distribution with coupling constant g

thomas_fermi_2d_pos(pos, g = 0.0)

thomas_fermi_3d(x, y, z, g = 0.0)

Mathematical function of Thomas-Fermi distribution with coupling constant g

mu_1d(g = 0.0)

mu_2d(g = 0.0)

mu_3d(g = 0.0)

v_harmonic_1d(x)

v_harmonic_2d(pos, alpha_y = 1.0)

v_2d(x, y, alpha_y=1.0)

v_harmonic_3d(x, y, z, alpha_y = 1.0, alpha_z = 1.0)

get_r_cut(k_mesh, r_cut = 1.0)

dipol_dipol_interaction(kx_mesh, ky_mesh, kz_mesh, r_cut = 1.0)

f_kappa(kappa, epsilon = 10**(-10))

atan_special(x)

func_125(kappa, alpha_z, e_dd, epsilon = 10**(-10))

func_124(kappa, e_dd, N, a_s_l_ho_ratio)

get_R_rz(kappa, e_dd, N, a_s_l_ho_ratio)

get_kappa(alpha_z, e_dd, x_min = 3.0, x_max = 5.0, res = 1000)

density_in_trap(x, y, z, R_r, R_z, g = 0.0)

density_in_trap_r(r, z, R_r, R_z, g = 0.0)

camera_func_r(frame, r_0 = 10.0, phi_0 = 45.0, z_0 = 20.0, r_per_frame = 10.0)

camera_func_phi(frame, r_0 = 10.0, phi_0 = 45.0, z_0 = 20.0, phi_per_frame = 10.0)

camera_func_z(frame, r_0 = 10.0, phi_0 = 45.0, z_0 = 20.0, z_per_frame = 10.0)

camera_3d_trajectory(frame, r_func = None, phi_func = None, z_func = None, r_0 = 10.0, phi_0 = 45.0, z_0 = 20.0)

Computes r, phi, z as the components of the camera position

noise_mesh(min = 0.8, max = 1.2, shape = (64, 64, 64))

dt_adaptive(t, dt)

Attributes

datapoints_exponent

class supersolids.helper.functions.Resolution(x, y=None, z=None)

Specifies the resolution of the simulation in x, y, z directions (1D, 2D, 3D).

__str__(self)

Return str(self).

Return type

List[Optional[float]]

class supersolids.helper.functions.Box(x0, x1, y0=None, y1=None, z0=None, z1=None)

Specifies the ranges in which the simulation is calculated (1D, 2D or 3D). Needs to be given in pairs (x0, x1), (y0, y1), (z0, z1).

__str__(self)

Return str(self).

Return type

List[Optional[float]]

lengths(self)

Calculates the box lengths in the directions available in order [x, y, z]

Returns

List of the box length in the directions available in order [x, y, z]

Return type

List[float]

min_length(self)
supersolids.helper.functions.BoxResAssert(Res, Box)
supersolids.helper.functions.aResAssert(Res, a)
supersolids.helper.functions.lambda_parsed(s)
supersolids.helper.functions.get_meshgrid(x, y)
supersolids.helper.functions.get_meshgrid_3d(x, y, z)
supersolids.helper.functions.get_parameters(N=10 ** 4, m=164 * constants.u_in_kg, a_s=90.0 * constants.a_0, a_dd=130.0 * constants.a_0, w_x=2.0 * np.pi * 30.0)
Parameters
  • N (int) –

  • m (float) –

  • a_s (float) –

  • a_dd (float) –

  • w_x (float) –

supersolids.helper.functions.get_g(N, a_s_l_ho_ratio)
Parameters
  • N (int) –

  • a_s_l_ho_ratio (float) –

supersolids.helper.functions.g_qf_helper(m=164 * constants.u_in_kg, a_s=90.0 * constants.a_0, a_dd=130.0 * constants.a_0, w_x=2.0 * np.pi * 30.0)
Parameters
  • m (float) –

  • a_s (float) –

  • a_dd (float) –

  • w_x (float) –

supersolids.helper.functions.get_g_qf(N, a_s_l_ho_ratio, epsilon_dd)
Parameters
  • N (int) –

  • a_s_l_ho_ratio (float) –

  • epsilon_dd (float) –

supersolids.helper.functions.get_l_ho(m=164.0 * constants.u_in_kg, w_x=2.0 * np.pi * 30.0)
Parameters
  • m (float) –

  • w_x (float) –

supersolids.helper.functions.get_alphas(w_x=2.0 * np.pi * 30.0, w_y=2.0 * np.pi * 30.0, w_z=2.0 * np.pi * 30.0)
Parameters
  • w_x (float) –

  • w_y (float) –

  • w_z (float) –

supersolids.helper.functions.psi_gauss_2d_pdf(pos, mu=np.array([0.0, 0.0]), var=np.array([[1.0, 0.0], [0.0, 1.0]]))

Gives values according to gaus dirstribution (2D) with meshgrid of x,y as input

Parameters
  • pos – stacked meshgrid of an x (1D) and y (1D)

  • mu – Mean of gauss

  • var – Variance of gauss

  • z_mesh – values according to gaus dirstribution (2D) with meshgrid of x,y as input

supersolids.helper.functions.psi_gauss_2d(x, y, a=1.0, x_0=0.0, y_0=0.0, k_0=0.0)

Gaussian wave packet of width a and momentum k_0, centered at x_0

Parameters
  • x – mathematical variable

  • y – mathematical variable

  • a (float) – Amplitude of pulse

  • x_0 (float) – Mean spatial x of pulse

  • y_0 (float) – Mean spatial y of pulse

  • k_0 (float) – Group velocity of pulse

supersolids.helper.functions.psi_gauss_3d(x, y, z, a_x=1.0, a_y=1.0, a_z=1.0, x_0=0.0, y_0=0.0, z_0=0.0, k_0=0.0)

Gaussian wave packet of width a and momentum k_0, centered at x_0

Parameters
  • x – mathematical variable

  • y – mathematical variable

  • z – mathematical variable

  • a_x (float) – Stretching factor in x direction

  • a_y (float) – Stretching factor in y direction

  • a_z (float) – Stretching factor in z direction

  • x_0 (float) – Mean spatial x of pulse

  • y_0 (float) – Mean spatial y of pulse

  • z_0 (float) – Mean spatial z of pulse

  • k_0 (float) – Group velocity of pulse

supersolids.helper.functions.psi_gauss_1d(x, a=1.0, x_0=0.0, k_0=0.0)

Gaussian wave packet of width a and momentum k_0, centered at x_0

Parameters
  • x – mathematical variable

  • a (float) – Amplitude of pulse

  • x_0 (float) – Mean spatial x of pulse

  • k_0 (float) – Group velocity of pulse

supersolids.helper.functions.psi_pdf(x, loc=0.0, scale=1.0)

Mathematical function of gauss pulse

Parameters
  • x – mathematical variable

  • loc (float) – Localization of pulse centre

  • scale (float) – Scale of pulse

supersolids.helper.functions.psi_rect(x, x_min=- 0.5, x_max=0.5, a=1.0)

Mathematical function of rectangular pulse between x_min and x_max with amplitude a

Parameters
  • x – mathematical variable

  • x_min (float) – Minimum x value of pulse (spatial)

  • x_max (float) – Maximum x value of pulse (spatial)

  • a (float) – Amplitude of pulse

supersolids.helper.functions.psi_gauss_solution(x)

Mathematical function of solution of non-linear Schroedinger for g=0

Parameters

x – mathematical variable

supersolids.helper.functions.thomas_fermi_1d(x, g=0.0)

Mathematical function of Thomas-Fermi distribution with coupling constant g

Parameters
  • x – mathematical variable

  • g (float) – coupling constant

supersolids.helper.functions.thomas_fermi_2d(x, y, g=0.0)

Mathematical function of Thomas-Fermi distribution with coupling constant g

Parameters
  • x – mathematical variable

  • y – mathematical variable

  • g (float) – coupling constant

supersolids.helper.functions.thomas_fermi_2d_pos(pos, g=0.0)
Parameters

g (float) –

supersolids.helper.functions.thomas_fermi_3d(x, y, z, g=0.0)

Mathematical function of Thomas-Fermi distribution with coupling constant g

Parameters
  • x – mathematical variable

  • y – mathematical variable

  • z – mathematical variable

  • g (float) – coupling constant

supersolids.helper.functions.mu_1d(g=0.0)
Parameters

g (float) –

supersolids.helper.functions.mu_2d(g=0.0)
Parameters

g (float) –

supersolids.helper.functions.mu_3d(g=0.0)
Parameters

g (float) –

supersolids.helper.functions.v_harmonic_1d(x)
supersolids.helper.functions.v_harmonic_2d(pos, alpha_y=1.0)
Parameters

alpha_y (float) –

supersolids.helper.functions.v_2d(x, y, alpha_y=1.0)
supersolids.helper.functions.v_harmonic_3d(x, y, z, alpha_y=1.0, alpha_z=1.0)
Parameters
  • alpha_y (float) –

  • alpha_z (float) –

supersolids.helper.functions.get_r_cut(k_mesh, r_cut=1.0)
Parameters
  • k_mesh (numpy.ndarray) –

  • r_cut (float) –

supersolids.helper.functions.dipol_dipol_interaction(kx_mesh, ky_mesh, kz_mesh, r_cut=1.0)
Parameters
  • kx_mesh (float) –

  • ky_mesh (float) –

  • kz_mesh (float) –

  • r_cut (float) –

supersolids.helper.functions.f_kappa(kappa, epsilon=10 ** - 10)
Parameters
  • kappa (numpy.ndarray) –

  • epsilon (float) –

Return type

float

supersolids.helper.functions.atan_special(x)
supersolids.helper.functions.func_125(kappa, alpha_z, e_dd, epsilon=10 ** - 10)
Parameters
  • kappa (float) –

  • alpha_z (float) –

  • e_dd (float) –

  • epsilon (float) –

supersolids.helper.functions.func_124(kappa, e_dd, N, a_s_l_ho_ratio)
Parameters
  • kappa (float) –

  • e_dd (float) –

  • N (float) –

  • a_s_l_ho_ratio (float) –

supersolids.helper.functions.get_R_rz(kappa, e_dd, N, a_s_l_ho_ratio)
Parameters
  • kappa (float) –

  • e_dd (float) –

  • N (int) –

  • a_s_l_ho_ratio (float) –

supersolids.helper.functions.get_kappa(alpha_z, e_dd, x_min=3.0, x_max=5.0, res=1000)
Parameters
  • alpha_z (float) –

  • e_dd (float) –

  • x_min (float) –

  • x_max (float) –

  • res (int) –

supersolids.helper.functions.density_in_trap(x, y, z, R_r, R_z, g=0.0)
Parameters
  • x (float) –

  • y (float) –

  • z (float) –

  • R_r (float) –

  • R_z (float) –

  • g (float) –

supersolids.helper.functions.density_in_trap_r(r, z, R_r, R_z, g=0.0)
Parameters
  • r (float) –

  • z (float) –

  • R_r (float) –

  • R_z (float) –

  • g (float) –

supersolids.helper.functions.camera_func_r(frame, r_0=10.0, phi_0=45.0, z_0=20.0, r_per_frame=10.0)
Parameters
  • frame (int) –

  • r_0 (float) –

  • phi_0 (float) –

  • z_0 (float) –

  • r_per_frame (float) –

Return type

float

supersolids.helper.functions.camera_func_phi(frame, r_0=10.0, phi_0=45.0, z_0=20.0, phi_per_frame=10.0)
Parameters
  • frame (int) –

  • r_0 (float) –

  • phi_0 (float) –

  • z_0 (float) –

  • phi_per_frame (float) –

Return type

float

supersolids.helper.functions.camera_func_z(frame, r_0=10.0, phi_0=45.0, z_0=20.0, z_per_frame=10.0)
Parameters
  • frame (int) –

  • r_0 (float) –

  • phi_0 (float) –

  • z_0 (float) –

  • z_per_frame (float) –

Return type

float

supersolids.helper.functions.camera_3d_trajectory(frame, r_func=None, phi_func=None, z_func=None, r_0=10.0, phi_0=45.0, z_0=20.0)

Computes r, phi, z as the components of the camera position in the animation for the given frame. Depending on, if a callable function is given for the components, it is applied to the parameters or the start values are used.

Parameters
  • frame (int) – Index of the frame in the animation

  • r_func (Callable) – r component of the movement of the camera.

  • phi_func (Callable) – phi component of the movement of the camera.

  • z_func (Callable) – z component of the movement of the camera.

  • r_0 (float) – r component of the starting point of the camera movement.

  • phi_0 (float) – phi component of the starting point of the camera movement.

  • z_0 (float) – z component of the starting point of the camera movement.

Returns

r, phi, z as the components of the camera position in the animation for the given frame.

Return type

Tuple[float, float, float]

supersolids.helper.functions.noise_mesh(min=0.8, max=1.2, shape=(64, 64, 64))
Parameters
  • min (float) –

  • max (float) –

  • shape (Tuple[int, int, int]) –

Return type

numpy.ndarray

supersolids.helper.functions.dt_adaptive(t, dt)
Return type

float

supersolids.helper.functions.datapoints_exponent :int = 6