gpe.hydro_1d#

Attributes#

Classes#

StateFVBase

Units corresponding to $1mu m = 1$, $hbar=1$, $1 amu = 1$

StateFV_BEC

Units corresponding to $1mu m = 1$, $hbar=1$, $1 amu = 1$

Module Contents#

u[source]#
_TINY[source]#
class StateFVBase(experiment=None, Nx=2**10, Lx=100 * u.micron, nu=25 * u.micron**2 * u.Hz, t=0, x_TF=100 * u.micron, nj=None, m=1, mu=None, cfl=0.5, ntol=1e-06, t_final=np.inf, **kw)[source]#

Bases: pytimeode.mixins.ArrayStateMixin, gpe.utils.AsNumpyMixin, mmfutils.containers.ObjectBase

Units corresponding to \(1\mu m = 1\), \(\hbar=1\), \(1 amu = 1\)

experiment = None[source]#
dx = 0.09765625[source]#
xyz[source]#
x_TF = 100.0[source]#
m = 1[source]#
mu = None[source]#
t = 0[source]#
ntol = 1e-06[source]#
cfl = 0.5[source]#
t_final[source]#
_nj0[source]#
dt[source]#
operator = 1[source]#
property x[source]#

Flat x abscissa as a numpy array.

get_nj()[source]#
set_nj(nj, pos=False)[source]#

Set self.data from n and j.

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

Return the Thomas Fermi density profile n_1D from mu.

Parameters:

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

get_V_TF(x_TF=None, V_ext=None)[source]#

Return the Thomas Fermi chemical potential at x_TF.

Parameters:

x_TF (float) – Position defining the Thomas Fermi “radius”. (The external potential is evaluated at this position and this is used to get mu.)

get_initial_nj(**kw)[source]#

Setting initial data using Thomas Fermi. We assume data to have the form ((n, j)) if it must be provided.

get_Vext(d=0)[source]#

Return potential or it’s space derivative.

get_N()[source]#
apply_boundary_condition()[source]#

Apply fixed boundary condition.

get_density()[source]#
get_current()[source]#
get_dt()[source]#

Return dt satisfying von Neumann stability Condition

get_fluxes(h, hu, u)[source]#

Return the fluxes of SWE Arguments: h: float

height

hu: float

height times the speed

u: float

speed

get_dU_dt_diff()[source]#

Returns time derivative of conserved variables, h & hu for the diffusion operator

get_dU_dt_adv()[source]#

Returns time derivative of conserved variables, h & hu

compute_dy_dt(dy=None)[source]#
abstract property t_scale[source]#
evolve_to(t)[source]#

Evolve the state to the specified time.

evolve(hist=False, t_final=None, steps=100, skip=10, show_plot=True, JT=False, fname=None, **kw)[source]#

Evolve SWE in time using Forward Euler

Arguments:#

hist: Bool

Returns list of states corresponding to evolver time steps.

t_final: float

Final time points in the evolution

stepsint

Number of intermediate steps to save history at.

skipint

Number of steps to skip between plots.

plot(ax=None)[source]#

Plot the data

class StateFV_BEC(experiment=None, Nx=2**10, Lx=100 * u.micron, nu=25 * u.micron**2 * u.Hz, t=0, x_TF=100 * u.micron, nj=None, m=1, mu=None, cfl=0.5, ntol=1e-06, t_final=np.inf, **kw)[source]#

Bases: StateFVBase

Units corresponding to \(1\mu m = 1\), \(\hbar=1\), \(1 amu = 1\)