gpe.hydro_1d
============

.. py:module:: gpe.hydro_1d


Attributes
----------

.. autoapisummary::

   gpe.hydro_1d.u
   gpe.hydro_1d._TINY


Classes
-------

.. autoapisummary::

   gpe.hydro_1d.StateFVBase
   gpe.hydro_1d.StateFV_BEC


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

.. py:data:: u

.. py:data:: _TINY

.. py: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)

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


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


   .. py:attribute:: experiment
      :value: None



   .. py:attribute:: dx
      :value: 0.09765625



   .. py:attribute:: xyz


   .. py:attribute:: x_TF
      :value: 100.0



   .. py:attribute:: m
      :value: 1



   .. py:attribute:: mu
      :value: None



   .. py:attribute:: t
      :value: 0



   .. py:attribute:: ntol
      :value: 1e-06



   .. py:attribute:: cfl
      :value: 0.5



   .. py:attribute:: t_final


   .. py:attribute:: _nj0


   .. py:attribute:: dt


   .. py:attribute:: operator
      :value: 1



   .. py:property:: x

      Flat x abscissa as a numpy array.


   .. py:method:: get_nj()


   .. py:method:: set_nj(nj, pos=False)

      Set self.data from n and j.



   .. py:method:: get_n_TF(V_TF=None, V_ext=None, g=None)

      Return the Thomas Fermi density profile n_1D from mu.

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



   .. py:method:: get_V_TF(x_TF=None, V_ext=None)

      Return the Thomas Fermi chemical potential at x_TF.

      :param x_TF: Position defining the Thomas Fermi "radius".  (The external potential is
                   evaluated at this position and this is used to get `mu`.)
      :type x_TF: float



   .. py:method:: get_initial_nj(**kw)

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



   .. py:method:: get_Vext(d=0)

      Return potential or it's space derivative.



   .. py:method:: get_N()


   .. py:method:: apply_boundary_condition()

      Apply fixed boundary condition.



   .. py:method:: get_density()


   .. py:method:: get_current()


   .. py:method:: get_dt()

      Return dt satisfying von Neumann stability Condition



   .. py:method:: get_fluxes(h, hu, u)

      Return the fluxes of SWE
      Arguments:
      h: float
         height
      hu: float
         height times the speed
      u: float
         speed



   .. py:method:: get_dU_dt_diff()

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



   .. py:method:: get_dU_dt_adv()

      Returns time derivative of conserved variables, h & hu




   .. py:method:: compute_dy_dt(dy=None)


   .. py:property:: t_scale
      :abstractmethod:



   .. py:method:: evolve_to(t)

      Evolve the state to the specified time.



   .. py:method:: evolve(hist=False, t_final=None, steps=100, skip=10, show_plot=True, JT=False, fname=None, **kw)

      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
      steps : int
          Number of intermediate steps to save history at.
      skip : int
          Number of steps to skip between plots.



   .. py:method:: plot(ax=None)

      Plot the data



.. py: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)

   Bases: :py:obj:`StateFVBase`


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


