gpe.tube2
=========

.. py:module:: gpe.tube2

.. autoapi-nested-parse::

   Dynamics in elongated harmonic traps.

   See Expansion.md for details.



Attributes
----------

.. autoapisummary::

   gpe.tube2.u


Classes
-------

.. autoapisummary::

   gpe.tube2.StateGPEdrZ


Module Contents
---------------

.. py:data:: u

.. py:class:: StateGPEdrZ(ws=None, Omega=None, delta=None, **kw)

   Bases: :py:obj:`gpe.bec2.State`


   Effective 1D model for an elongated cloud implementing a modified form
   of the dr-GPE with dynamic rescaling in the y and z directions but not in
   the x direction.  The state here is $\Phi(Z, t)$ but `get_density()` has
   been modified to include the correct scaling.


   .. py:method:: get_ws(t=None)

      Return the trapping frequencies at time t.



   .. py:method:: init()

      Initialize the state.

      This method defines the basis positions, momenta, etc. for use later
      on.  We define these here rather than in the constructor `__init__()`
      so that the user can change them later and the reinitialize the state.
      We also call this function from the `pre_evolve_hook()` so that it is
      called before any evolution takes place.  For this reason, we should
      not modify the state here.



   .. py:property:: w0_perp

      Average perpendicular frequency at time t=0.


   .. py:method:: get_sigma2s(abs_Phi2s=None)


   .. py:method:: get_central_density(TF=False)

      Return the physical density (3d) along the central axis of the
      trap.

      :param TF: If True, then assume the transverse cloud is a TF profile (otherwise
                 use the internal Gaussian anzatz.)
      :type TF: bool



   .. py:method:: get_V_GPU()

      Return the complete potential `V` - internal and external.



   .. py:method:: get_energy_density(a=True, b=True, ab=True)

      Return the energy density.

      :param a: Include the energies associated with this species.  This includes the kinetic
                energy and the self-interaction, but no inter-species interactions.
      :type a: bool
      :param b: Include the energies associated with this species.  This includes the kinetic
                energy and the self-interaction, but no inter-species interactions.
      :type b: bool
      :param ab: Include only the interaction energy.
      :type ab: bool



   .. py:method:: _rhs(q, t)

      RHS for lambda(t) ODE.



   .. py:method:: get_lambdas()


   .. py:method:: _get_n_TF(V_TF, V_ext=None, m=None, g=None, state=None)

      Return the total TF density.  Assumes gaa = gbb = gab and
      populates only the lower band.

      :param V_g: (V_TF - V)/g.  The density will vanish where V=V_TF.
      :type V_g: float



   .. py:method:: get_mus_from_Vs_TF(Vs_TF)

      Return the corrected chemical potential from Vs_TF.

      :param Vs_TF: External potentials at the Thomas Fermi "radius".  (The external
                    potential is evaluated at this position and this is used to get
                    `mu`.)
      :type Vs_TF: (float, float)



   .. py:method:: get_Vs_TF_from_mus(mus)

      Return Vs_TF from the chemical potentials mus.

      :param mus: Physical chemical potentials (i.e. what you would pass to the minimizer).
      :type mus: (float, float)



