\[\newcommand{\vect}[1]{\vec{\boldsymbol{#1}}}
\newcommand{\uvect}[1]{\hat{\boldsymbol{#1}}}
\newcommand{\abs}[1]{\lvert#1\rvert}
\newcommand{\Abs}[1]{\left\lvert#1\right\rvert}
\newcommand{\norm}[1]{\lVert#1\rVert}
\newcommand{\I}{\mathrm{i}}
\newcommand{\ket}[1]{\left|#1\right\rangle}
\newcommand{\bra}[1]{\left\langle#1\right|}
\newcommand{\braket}[1]{\langle#1\rangle}
\newcommand{\Braket}[1]{\left\langle#1\right\rangle}
\newcommand{\op}[1]{\hat{#1}}
\newcommand{\mat}[1]{\underline{\boldsymbol{#1}}}
\providecommand{\d}{\mathrm{d}}
\renewcommand{\d}{\mathrm{d}}
\newcommand{\D}[1]{\mathcal{D}[#1]\;}
\newcommand{\pdiff}[3][]{\frac{\partial^{#1}#2}{\partial{#3}^{#1}}}
\newcommand{\diff}[3][]{\frac{\d^{#1} #2}{\d{#3}^{#1}}}
\newcommand{\ddiff}[3][]{\frac{\delta^{#1} #2}{\delta{#3}^{#1}}}
\newcommand{\floor}[1]{\left\lfloor#1\right\rfloor}
\newcommand{\ceil}[1]{\left\lceil#1\right\rceil}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\erfi}{erfi}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\sn}{sn}
\DeclareMathOperator{\cn}{cn}
\DeclareMathOperator{\dn}{dn}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\order}{O}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\span}{span}
\newcommand{\mylabel}[1]{\label{#1}\tag{#1}}
\newcommand{\degree}{\circ}
% These replace SIunitx. They should not be defined in LaTeX.
\newcommand{\SI}[2]{#1\;\mathrm{#2}}
\newcommand{\si}[1]{\mathrm{#1}}
\let\qty\SI
\let\unit\si
\newcommand{\squared}{{^{2}}}
\newcommand{\cubed}{{^{3}}}
\newcommand{\per}{/}
\newcommand{\tera}{T}
\newcommand{\giga}{G}
\newcommand{\mega}{M}
\newcommand{\kilo}{k}
\newcommand{\milli}{m}
\newcommand{\micro}{μ}
\newcommand{\nano}{n}
\newcommand{\kilogram}{\text{kg}\,}
\newcommand{\meter}{\text{m}\,}
\newcommand{\second}{\text{s}\,}
\newcommand{\ampere}{\text{A}\,}
\newcommand{\kelvin}{\text{K}\,}
\newcommand{\mol}{\text{mol}\,}
\newcommand{\candela}{\text{cd}\,}
\newcommand{\newton}{\text{N}\,}
\newcommand{\hertz}{\text{Hz}\,}
\newcommand{\pascal}{\text{Pa}\,}
\newcommand{\volt}{\text{V}\,}
\newcommand{\watt}{\text{W}\,}
\newcommand{\joule}{\text{J}\,}
\newcommand{\henry}{\text{H}\,}
\newcommand{\farad}{\text{F}\,}
\newcommand{\coulomb}{\text{C}\,}
\newcommand{\ohm}{\Omega\,}
\newcommand{\weber}{\text{Wb}\,}
\newcommand{\tesla}{\text{T}\,}
\newcommand{\degree}{\text{deg}\,}
\]
gpe.hydro_1d
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
- 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\)