Repository: PlasmaPy/PlasmaPy

Issue:
Add correct 3D Maxwellian formulae to docs
Currently the 3D Maxwellian docstrings have the formulae for 1D distributions; these should be replaced by the correct ones for 3D distributions:

http://plasmapy.readthedocs.io/en/master/api/plasmapy.physics.distribution.Maxwellian_velocity_3D.html#plasmapy.physics.distribution.Maxwellian_velocity_3D
http://plasmapy.readthedocs.io/en/master/api/plasmapy.physics.distribution.Maxwellian_speed_3D.html#plasmapy.physics.distribution.Maxwellian_speed_3D


Discussion:
This issue may need to be reformulated based on the discussion in Riot. I think the functions are written correctly, though the docstrings probably need clarification.

You mentioned wanting a 1 speed value argument for 3D. This might be achievable as a thin wrapper around the current 3D speed distribution function. You would take the one speed and then split it evenly among the 3 speed component arguments and call `Maxwellian_speed_3D` on it, I think. Though I don't think this kind of speed distribution will normalize correctly with a 1D integral (just integrating speed once), because the 3D normalization coefficient takes into account 3 integrations. The normalization issue is part of why I wrote `Maxwellian_speed_3D` the way I did, with 3 arguments.
Related to #451 
We need to make fixes as per [this comment](https://github.com/PlasmaPy/PlasmaPy/pull/451#issuecomment-387893432).

I'm still not entirely sure on the thermal velocities and equipartition portion... need to have a think...

Resolving patch:
diff --git a/plasmapy/examples/plot_distribution.py b/plasmapy/examples/plot_distribution.py
--- a/plasmapy/examples/plot_distribution.py
+++ b/plasmapy/examples/plot_distribution.py
@@ -29,8 +29,10 @@
 # plasma at a temperature of 30 000 K:
 
 
-p_dens = Maxwellian_1D(v=1 * u.m / u.s, T=30000 * u.K,
-                       particle='e', V_drift=0 * u.m / u.s)
+p_dens = Maxwellian_1D(v=1 * u.m / u.s,
+                       T=30000 * u.K,
+                       particle='e',
+                       v_drift=0 * u.m / u.s)
 print(p_dens)
 
 ############################################################
@@ -58,8 +60,8 @@
 # temperature:
 
 
-std = np.sqrt((Maxwellian_1D(v, T=T, particle='e') * v**2 * dv).sum())
-T_theo = (std**2 / k_B * m_e).to(u.K)
+std = np.sqrt((Maxwellian_1D(v, T=T, particle='e') * v ** 2 * dv).sum())
+T_theo = (std ** 2 / k_B * m_e).to(u.K)
 
 print('T from standard deviation:', T_theo)
 print('Initial T:', T)
diff --git a/plasmapy/physics/__init__.py b/plasmapy/physics/__init__.py
--- a/plasmapy/physics/__init__.py
+++ b/plasmapy/physics/__init__.py
@@ -17,8 +17,10 @@
                          cold_plasma_permittivity_SDP)
 
 from .distribution import (Maxwellian_1D,
+                           Maxwellian_velocity_2D,
                            Maxwellian_velocity_3D,
                            Maxwellian_speed_1D,
+                           Maxwellian_speed_2D,
                            Maxwellian_speed_3D,
                            kappa_velocity_3D,
                            kappa_velocity_1D)
diff --git a/plasmapy/physics/distribution.py b/plasmapy/physics/distribution.py
--- a/plasmapy/physics/distribution.py
+++ b/plasmapy/physics/distribution.py
@@ -9,14 +9,14 @@
 import numpy as np
 from scipy.special import gamma
 
-__all__ = [
-    "Maxwellian_1D",
-    "Maxwellian_velocity_3D",
-    "Maxwellian_speed_1D",
-    "Maxwellian_speed_3D",
-    "kappa_velocity_1D",
-    "kappa_velocity_3D",
-]
+__all__ = ["Maxwellian_1D",
+           "Maxwellian_velocity_2D",
+           "Maxwellian_velocity_3D",
+           "Maxwellian_speed_1D",
+           "Maxwellian_speed_2D",
+           "Maxwellian_speed_3D",
+           "kappa_velocity_1D",
+           "kappa_velocity_3D"]
 
 def _v_drift_units(v_drift):
     # Helper method to assign units to  v_drift if it takes a default value
@@ -30,13 +30,14 @@ def _v_drift_units(v_drift):
 def Maxwellian_1D(v,
                   T,
                   particle="e",
-                  V_drift=0,
+                  v_drift=0,
                   vTh=np.nan,
                   units="units"):
     r"""
-    pdf of velocity for a Maxwellian distribution.
+    Probability distribution function of velocity for a Maxwellian 
+    distribution in 1D.
 
-    Returns the probability at the velocity `v` in m/s
+    Returns the probability density function at the velocity `v` in m/s
     to find a particle `particle` in a plasma of temperature `T`
     following the Maxwellian distribution function.
 
@@ -53,7 +54,7 @@ def Maxwellian_1D(v,
         ``'D+'`` for deuterium, or ``'He-4 +1'`` for :math:`He_4^{+1}`
         (singly ionized helium-4)), which defaults to electrons.
 
-    V_drift: ~astropy.units.Quantity, optional
+    v_drift: ~astropy.units.Quantity, optional
         The drift velocity in units convertible to m/s.
 
     vTh: ~astropy.units.Quantity, optional
@@ -70,7 +71,7 @@ def Maxwellian_1D(v,
     Returns
     -------
     f : ~astropy.units.Quantity
-        Probability in units of Velocity^-1, normalized so that
+        Probability density in units of Velocity^-1, normalized so that
         :math:`\int_{-\infty}^{+\infty} f(v) dv = 1`.
 
     Raises
@@ -103,7 +104,7 @@ def Maxwellian_1D(v,
     >>> from plasmapy.physics import Maxwellian_1D
     >>> from astropy import units as u
     >>> v=1*u.m/u.s
-    >>> Maxwellian_1D(v=v, T= 30000*u.K, particle='e',V_drift=0*u.m/u.s)
+    >>> Maxwellian_1D(v=v, T=30000 * u.K, particle='e', v_drift=0 * u.m / u.s)
     <Quantity 5.91632969e-07 s / m>
     """
 
@@ -113,7 +114,7 @@ def Maxwellian_1D(v,
         v = v.to(u.m / u.s)
         # Catching case where drift velocities have default values, they
         # need to be assigned units
-        V_drift = _v_drift_units(V_drift)
+        v_drift = _v_drift_units(v_drift)
         # convert temperature to Kelvins
         T = T.to(u.K, equivalencies=u.temperature_energy())
         if np.isnan(vTh):
@@ -132,7 +133,7 @@ def Maxwellian_1D(v,
     # Get thermal velocity squared
     vThSq = vTh ** 2
     # Get square of relative particle velocity
-    vSq = (v - V_drift) ** 2
+    vSq = (v - v_drift) ** 2
     # calculating distribution function
     coeff = (vThSq * np.pi) ** (-1 / 2)
     expTerm = np.exp(-vSq / vThSq)
@@ -143,23 +144,163 @@ def Maxwellian_1D(v,
         return distFunc
 
 
+def Maxwellian_velocity_2D(vx,
+                           vy,
+                           T,
+                           particle="e",
+                           vx_drift=0,
+                           vy_drift=0,
+                           vTh=np.nan,
+                           units="units"):
+    r"""
+    Probability distribution function of velocity for a Maxwellian 
+    distribution in 2D.
+
+    Return the probability density function for finding a particle with 
+    velocity components `vx` and `vy` in m/s in an equilibrium plasma of 
+    temperature `T` which follows the 2D Maxwellian distribution function. 
+    This function assumes Cartesian coordinates.
+
+    Parameters
+    ----------
+    vx: ~astropy.units.Quantity
+        The velocity in x-direction units convertible to m/s.
+
+    vy: ~astropy.units.Quantity
+        The velocity in y-direction units convertible to m/s.
+
+    T: ~astropy.units.Quantity
+        The temperature, preferably in Kelvin.
+
+    particle: str, optional
+        Representation of the particle species (e.g., ``'p'`` for protons,
+        ``'D+'`` for deuterium, or ``'He-4 +1'`` for :math:`He_4^{+1}`
+        (singly ionized helium-4)), which defaults to electrons.
+
+    vx_drift: ~astropy.units.Quantity, optional
+        The drift velocity in x-direction units convertible to m/s.
+
+    vy_drift: ~astropy.units.Quantity, optional
+        The drift velocity in y-direction units convertible to m/s.
+
+    vTh: ~astropy.units.Quantity, optional
+        Thermal velocity (most probable) in m/s. This is used for
+        optimization purposes to avoid re-calculating `vTh`, for example
+        when integrating over velocity-space.
+
+    units: str, optional
+        Selects whether to run function with units and unit checks (when
+        equal to "units") or to run as unitless (when equal to "unitless").
+        The unitless version is substantially faster for intensive
+        computations.
+
+    Returns
+    -------
+    f : ~astropy.units.Quantity
+        Probability density in Velocity^-1, normalized so that
+        :math:`\iiint_{0}^{\infty} f(\vec{v}) d\vec{v} = 1`.
+
+    Raises
+    ------
+    TypeError
+        A parameter argument is not a `~astropy.units.Quantity` and
+        cannot be converted into a `~astropy.units.Quantity`.
+
+    ~astropy.units.UnitConversionError
+        If the parameters is not in appropriate units.
+
+    ValueError
+        If the temperature is negative, or the particle mass or charge state
+        cannot be found.
+
+    Notes
+    -----
+    In 2D, the Maxwellian velocity distribution function describing
+    the distribution of particles with speed :math:`v` in a plasma with
+    temperature :math:`T` is given by:
+
+    .. math::
+
+        f = (\pi v_{Th}^2)^{-1} \exp \left [-(\vec{v} -
+        \vec{V}_{drift})^2 / v_{Th}^2 \right ]
+
+    where :math:`v_{Th} = \sqrt{2 k_B T / m}` is the thermal speed.
+
+    See also
+    --------
+    Maxwellian_1D
+
+    Example
+    -------
+    >>> from plasmapy.physics import Maxwellian_velocity_2D
+    >>> from astropy import units as u
+    >>> v=1 * u.m / u.s
+    >>> Maxwellian_velocity_2D(vx=v,
+    ... vy=v,
+    ... T=30000*u.K,
+    ... particle='e',
+    ... vx_drift=0 * u.m / u.s,
+    ... vy_drift=0 * u.m / u.s)
+    <Quantity 3.5002957e-13 s2 / m2>
+
+
+    """
+    if units == "units":
+        # unit checks and conversions
+        # checking velocity units
+        vx = vx.to(u.m / u.s)
+        vy = vy.to(u.m / u.s)
+        # catching case where drift velocities have default values, they
+        # need to be assigned units
+        vx_drift = _v_drift_units(vx_drift)
+        vy_drift = _v_drift_units(vy_drift)
+        # convert temperature to Kelvins
+        T = T.to(u.K, equivalencies=u.temperature_energy())
+        if np.isnan(vTh):
+            # get thermal velocity and thermal velocity squared
+            vTh = (parameters.thermal_speed(T,
+                                            particle=particle,
+                                            method="most_probable"))
+        elif not np.isnan(vTh):
+            # check units of thermal velocity
+            vTh = vTh.to(u.m / u.s)
+    elif np.isnan(vTh) and units == "unitless":
+        # assuming unitless temperature is in Kelvins
+        vTh = parameters.thermal_speed(T * u.K,
+                                       particle=particle,
+                                       method="most_probable").si.value
+    # accounting for thermal velocity in 2D
+    vThSq = vTh ** 2
+    # Get square of relative particle velocity
+    vSq = ((vx - vx_drift) ** 2 + (vy - vy_drift) ** 2)
+    # calculating distribution function
+    coeff = (vThSq * np.pi) ** (-1)
+    expTerm = np.exp(-vSq / vThSq)
+    distFunc = coeff * expTerm
+    if units == "units":
+        return distFunc.to((u.s / u.m)**2)
+    elif units == "unitless":
+        return distFunc
+
+
 def Maxwellian_velocity_3D(vx,
                            vy,
                            vz,
                            T,
                            particle="e",
-                           Vx_drift=0,
-                           Vy_drift=0,
-                           Vz_drift=0,
+                           vx_drift=0,
+                           vy_drift=0,
+                           vz_drift=0,
                            vTh=np.nan,
                            units="units"):
     r"""
-    pdf of velocity for a 3D Maxwellian distribution.
+    Probability distribution function of velocity for a Maxwellian 
+    distribution in 3D.
 
-    Return the probability of finding a particle with velocity components
-    `vx`, `vy`, and `vz` in m/s in an equilibrium plasma of temperature
-    `T` which follows the 3D Maxwellian distribution function. This
-    function assumes Cartesian coordinates.
+    Return the probability density function for finding a particle with 
+    velocity components `vx`, `vy`, and `vz` in m/s in an equilibrium 
+    plasma of temperature `T` which follows the 3D Maxwellian distribution 
+    function. This function assumes Cartesian coordinates.
 
     Parameters
     ----------
@@ -180,13 +321,13 @@ def Maxwellian_velocity_3D(vx,
         ``'D+'`` for deuterium, or ``'He-4 +1'`` for :math:`He_4^{+1}`
         (singly ionized helium-4)), which defaults to electrons.
 
-    Vx_drift: ~astropy.units.Quantity, optional
+    vx_drift: ~astropy.units.Quantity, optional
         The drift velocity in x-direction units convertible to m/s.
 
-    Vy_drift: ~astropy.units.Quantity, optional
+    vy_drift: ~astropy.units.Quantity, optional
         The drift velocity in y-direction units convertible to m/s.
 
-    Vz_drift: ~astropy.units.Quantity, optional
+    vz_drift: ~astropy.units.Quantity, optional
         The drift velocity in z-direction units convertible to m/s.
 
     vTh: ~astropy.units.Quantity, optional
@@ -203,7 +344,7 @@ def Maxwellian_velocity_3D(vx,
     Returns
     -------
     f : ~astropy.units.Quantity
-        Probability in Velocity^-1, normalized so that
+        Probability density in Velocity^-1, normalized so that
         :math:`\iiint_{0}^{\infty} f(\vec{v}) d\vec{v} = 1`.
 
     Raises
@@ -221,7 +362,7 @@ def Maxwellian_velocity_3D(vx,
 
     Notes
     -----
-    In one dimension, the Maxwellian speed distribution function describing
+    In 3D, the Maxwellian speed distribution function describing
     the distribution of particles with speed :math:`v` in a plasma with
     temperature :math:`T` is given by:
 
@@ -240,16 +381,16 @@ def Maxwellian_velocity_3D(vx,
     -------
     >>> from plasmapy.physics import Maxwellian_velocity_3D
     >>> from astropy import units as u
-    >>> v=1*u.m/u.s
+    >>> v=1 * u.m / u.s
     >>> Maxwellian_velocity_3D(vx=v,
     ... vy=v,
     ... vz=v,
-    ... T=30000*u.K,
+    ... T=30000 * u.K,
     ... particle='e',
-    ... Vx_drift=0*u.m/u.s,
-    ... Vy_drift=0*u.m/u.s,
-    ... Vz_drift=0*u.m/u.s)
-    <Quantity 3.98543031e-20 s3 / m3>
+    ... vx_drift=0 * u.m / u.s,
+    ... vy_drift=0 * u.m / u.s,
+    ... vz_drift=0 * u.m / u.s)
+    <Quantity 2.07089033e-19 s3 / m3>
 
 
     """
@@ -261,9 +402,9 @@ def Maxwellian_velocity_3D(vx,
         vz = vz.to(u.m / u.s)
         # catching case where drift velocities have default values, they
         # need to be assigned units
-        Vx_drift = _v_drift_units(Vx_drift)
-        Vy_drift = _v_drift_units(Vy_drift)
-        Vz_drift = _v_drift_units(Vz_drift)
+        vx_drift = _v_drift_units(vx_drift)
+        vy_drift = _v_drift_units(vy_drift)
+        vz_drift = _v_drift_units(vz_drift)
         # convert temperature to Kelvins
         T = T.to(u.K, equivalencies=u.temperature_energy())
         if np.isnan(vTh):
@@ -280,9 +421,9 @@ def Maxwellian_velocity_3D(vx,
                                        particle=particle,
                                        method="most_probable").si.value
     # accounting for thermal velocity in 3D
-    vThSq = 3 * vTh ** 2
+    vThSq = vTh ** 2
     # Get square of relative particle velocity
-    vSq = ((vx - Vx_drift) ** 2 + (vy - Vy_drift) ** 2 + (vz - Vz_drift) ** 2)
+    vSq = ((vx - vx_drift) ** 2 + (vy - vy_drift) ** 2 + (vz - vz_drift) ** 2)
     # calculating distribution function
     coeff = (vThSq * np.pi) ** (-3 / 2)
     expTerm = np.exp(-vSq / vThSq)
@@ -296,15 +437,16 @@ def Maxwellian_velocity_3D(vx,
 def Maxwellian_speed_1D(v,
                         T,
                         particle="e",
-                        V_drift=0,
+                        v_drift=0,
                         vTh=np.nan,
                         units="units"):
     r"""
-    pdf of speed for a Maxwellian distribution.
+    Probability distribution function of speed for a Maxwellian distribution
+    in 1D.
 
-    Return the probability of finding a particle with speed `v` in m/s
-    in an equilibrium plasma of temperature `T` which follows the
-    Maxwellian distribution function.
+    Return the probability density function for finding a particle with 
+    speed `v` in m/s in an equilibrium plasma of temperature `T` which 
+    follows the Maxwellian distribution function.
 
     Parameters
     ----------
@@ -319,7 +461,7 @@ def Maxwellian_speed_1D(v,
         for deuterium, or `'He-4 +1'` for :math:`He_4^{+1}`
         (singly ionized helium-4)), which defaults to electrons.
 
-    V_drift: ~astropy.units.Quantity
+    v_drift: ~astropy.units.Quantity
         The drift speed in units convertible to m/s.
 
     vTh: ~astropy.units.Quantity, optional
@@ -336,7 +478,7 @@ def Maxwellian_speed_1D(v,
     Returns
     -------
     f : ~astropy.units.Quantity
-        Probability in speed^-1, normalized so that
+        Probability density in speed^-1, normalized so that
         :math:`\int_{0}^{\infty} f(v) dv = 1`.
 
     Raises
@@ -360,7 +502,7 @@ def Maxwellian_speed_1D(v,
 
     .. math::
 
-       f(v) = 4\pi v^2 \frac{1}{(\pi v_{Th}^2)^{3/2}} \exp(-(v - V_{drift})^2 / v_{Th}^2 )
+       f(v) = 2 \frac{1}{(\pi v_{Th}^2)^{1/2}} \exp(-(v - V_{drift})^2 / v_{Th}^2 )
 
     where :math:`v_{Th} = \sqrt{2 k_B T / m}` is the thermal speed.
 
@@ -368,18 +510,143 @@ def Maxwellian_speed_1D(v,
     -------
     >>> from plasmapy.physics import Maxwellian_speed_1D
     >>> from astropy import units as u
-    >>> v=1*u.m/u.s
-    >>> Maxwellian_speed_1D(v=v, T= 30000*u.K, particle='e',V_drift=0*u.m/u.s)
-    <Quantity 2.60235754e-18 s / m>
+    >>> v=1 * u.m / u.s
+    >>> Maxwellian_speed_1D(v=v, T=30000 * u.K, particle='e', v_drift=0 * u.m / u.s)
+    <Quantity 1.18326594e-06 s / m>
+
+    """
+    if units == "units":
+        # unit checks and conversions
+        # checking velocity units
+        v = v.to(u.m / u.s)
+        # Catching case where drift velocities have default values, they
+        # need to be assigned units
+        v_drift = _v_drift_units(v_drift)
+        # convert temperature to Kelvins
+        T = T.to(u.K, equivalencies=u.temperature_energy())
+        if np.isnan(vTh):
+            # get thermal velocity and thermal velocity squared
+            vTh = (parameters.thermal_speed(T,
+                                            particle=particle,
+                                            method="most_probable"))
+        elif not np.isnan(vTh):
+            # check units of thermal velocity
+            vTh = vTh.to(u.m / u.s)
+    elif np.isnan(vTh) and units == "unitless":
+        # assuming unitless temperature is in Kelvins
+        vTh = (parameters.thermal_speed(T * u.K,
+                                        particle=particle,
+                                        method="most_probable")).si.value
+    # Get thermal velocity squared
+    vThSq = vTh ** 2
+    # Get square of relative particle velocity
+    vSq = (v - v_drift) ** 2
+    # calculating distribution function
+    coeff = 2 * (vThSq * np.pi) ** (-1 / 2)
+    expTerm = np.exp(-vSq / vThSq)
+    distFunc = coeff * expTerm
+    if units == "units":
+        return distFunc.to(u.s / u.m)
+    elif units == "unitless":
+        return distFunc
+
+
+def Maxwellian_speed_2D(v,
+                        T,
+                        particle="e",
+                        v_drift=0,
+                        vTh=np.nan,
+                        units="units"):
+    r"""
+    Probability distribution function of speed for a Maxwellian distribution
+    in 2D.
+
+    Return the probability density function of finding a particle with speed components
+    `vx` and `vy` in m/s in an equilibrium plasma of temperature
+    `T` which follows the 2D Maxwellian distribution function. This
+    function assumes Cartesian coordinates.
+
+    Parameters
+    ----------
+    v: ~astropy.units.Quantity
+        The speed in units convertible to m/s.
+
+    T: ~astropy.units.Quantity
+        The temperature, preferably in Kelvin.
+
+    particle: str, optional
+        Representation of the particle species(e.g., `'p'` for protons, `'D+'`
+        for deuterium, or `'He-4 +1'` for :math:`He_4^{+1}`
+        (singly ionized helium-4)), which defaults to electrons.
+
+    v_drift: ~astropy.units.Quantity
+        The drift speed in units convertible to m/s.
+
+    vTh: ~astropy.units.Quantity, optional
+        Thermal velocity (most probable) in m/s. This is used for
+        optimization purposes to avoid re-calculating vTh, for example
+        when integrating over velocity-space.
+
+    units: str, optional
+        Selects whether to run function with units and unit checks (when
+        equal to "units") or to run as unitless (when equal to "unitless").
+        The unitless version is substantially faster for intensive
+        computations.
+
+    Returns
+    -------
+    f : ~astropy.units.Quantity
+        Probability density in speed^-1, normalized so that:
+        :math:`\iiint_{0}^{\infty} f(\vec{v}) d\vec{v} = 1`.
+
+    Raises
+    ------
+    TypeError
+        A parameter argument is not a `~astropy.units.Quantity` and
+        cannot be converted into a `~astropy.units.Quantity`.
+
+    ~astropy.units.UnitConversionError
+        If the parameters is not in appropriate units.
+
+    ValueError
+        If the temperature is negative, or the particle mass or charge state
+        cannot be found.
+
+    Notes
+    -----
+    In 2D, the Maxwellian speed distribution function describing
+    the distribution of particles with speed :math:`v` in a plasma with
+    temperature :math:`T` is given by:
+
+    .. math::
+
+       f = 2 \pi \vec{v} (\pi v_{Th}^2)^{-1} \exp(-(\vec{v} -
+       \vec{V}_{drift})^2 / v_{Th}^2)
+
+    where :math:`v_{Th} = \sqrt{2 k_B T / m}` is the thermal speed.
+
+    See also
+    --------
+    Maxwellian_speed_1D
+
+    Example
+    -------
+    >>> from plasmapy.physics import Maxwellian_speed_2D
+    >>> from astropy import units as u
+    >>> v=1 * u.m / u.s
+    >>> Maxwellian_speed_2D(v=v, T=30000 * u.K, particle='e', v_drift=0 * u.m / u.s)
+    <Quantity 2.19930065e-12 s / m>
 
     """
+    if v_drift != 0:
+        raise NotImplementedError("Non-zero drift speed is work in progress.")
     if units == "units":
         # unit checks and conversions
         # checking velocity units
         v = v.to(u.m / u.s)
         # Catching case where drift velocity has default value, and
         # needs to be assigned units
-        V_drift = _v_drift_units(V_drift)
+        v_drift = _v_drift_units(v_drift)
         # convert temperature to Kelvins
         T = T.to(u.K, equivalencies=u.temperature_energy())
         if np.isnan(vTh):
@@ -398,10 +665,10 @@ def Maxwellian_speed_1D(v,
     # getting square of thermal speed
     vThSq = vTh ** 2
     # get square of relative particle speed
-    vSq = (v - V_drift) ** 2
+    vSq = (v - v_drift) ** 2
     # calculating distribution function
-    coeff1 = (np.pi * vThSq) ** (-3 / 2)
-    coeff2 = 4 * np.pi * vSq
+    coeff1 = (np.pi * vThSq) ** (-1)
+    coeff2 = 2 * np.pi * (v - v_drift)
     expTerm = np.exp(-vSq / vThSq)
     distFunc = coeff1 * coeff2 * expTerm
     if units == "units":
@@ -410,51 +677,36 @@ def Maxwellian_speed_1D(v,
         return distFunc
 
 
-def Maxwellian_speed_3D(vx,
-                        vy,
-                        vz,
+def Maxwellian_speed_3D(v,
                         T,
                         particle="e",
-                        Vx_drift=0,
-                        Vy_drift=0,
-                        Vz_drift=0,
+                        v_drift=0,
                         vTh=np.nan,
                         units="units"):
     r"""
-    pdf of speed for a 3D Maxwellian distribution.
+    Probability distribution function of speed for a Maxwellian
+    distribution in 3D.
 
-    Return the probability of finding a particle with speed components
-    `vx`, `vy`, and `vz` in m/s in an equilibrium plasma of temperature
-    `T` which follows the 3D Maxwellian distribution function. This
-    function assumes Cartesian coordinates.
+    Return the probability density function for finding a particle with 
+    speed components `vx`, `vy`, and `vz` in m/s in an equilibrium 
+    plasma of temperature `T` which follows the 3D Maxwellian 
+    distribution function. This function assumes Cartesian coordinates.
 
     Parameters
     ----------
-    vx: ~astropy.units.Quantity
-        The speed in x-direction units convertible to m/s.
-
-    vy: ~astropy.units.Quantity
-        The speed in y-direction units convertible to m/s.
-
-    vz: ~astropy.units.Quantity
-        The speed in z-direction units convertible to m/s.
+    v: ~astropy.units.Quantity
+        The speed in units convertible to m/s.
 
     T: ~astropy.units.Quantity
         The temperature, preferably in Kelvin.
 
     particle: str, optional
-        Representation of the particle species(e.g., 'p' for protons, 'D+'
-        for deuterium, or 'He-4 +1' for :math:`He_4^{+1}`
+        Representation of the particle species(e.g., `'p'` for protons, `'D+'`
+        for deuterium, or `'He-4 +1'` for :math:`He_4^{+1}`
         (singly ionized helium-4)), which defaults to electrons.
 
-    Vx_drift: ~astropy.units.Quantity
-        The drift speed in x-direction units convertible to m/s.
-
-    Vy_drift: ~astropy.units.Quantity
-        The drift speed in y-direction units convertible to m/s.
-
-    Vz_drift: ~astropy.units.Quantity
-        The drift speed in z-direction units convertible to m/s.
+    v_drift: ~astropy.units.Quantity
+        The drift speed in units convertible to m/s.
 
     vTh: ~astropy.units.Quantity, optional
         Thermal velocity (most probable) in m/s. This is used for
@@ -470,7 +722,7 @@ def Maxwellian_speed_3D(vx,
     Returns
     -------
     f : ~astropy.units.Quantity
-        Probability in speed^-1, normalized so that:
+        Probability density in speed^-1, normalized so that:
         :math:`\iiint_{0}^{\infty} f(\vec{v}) d\vec{v} = 1`.
 
     Raises
@@ -488,7 +740,7 @@ def Maxwellian_speed_3D(vx,
 
     Notes
     -----
-    In one dimension, the Maxwellian speed distribution function describing
+    In 3D, the Maxwellian speed distribution function describing
     the distribution of particles with speed :math:`v` in a plasma with
     temperature :math:`T` is given by:
 
@@ -507,29 +759,20 @@ def Maxwellian_speed_3D(vx,
     -------
     >>> from plasmapy.physics import Maxwellian_speed_3D
     >>> from astropy import units as u
-    >>> v=1*u.m/u.s
-    >>> Maxwellian_speed_3D(vx=v,
-    ... vy=v,
-    ... vz=v,
-    ... T=30000*u.K,
-    ... particle='e',
-    ... Vx_drift=0*u.m/u.s,
-    ... Vy_drift=0*u.m/u.s,
-    ... Vz_drift=0*u.m/u.s)
-    <Quantity 1.76238544e-53 s3 / m3>
+    >>> v=1 * u.m / u.s
+    >>> Maxwellian_speed_3D(v=v, T=30000*u.K, particle='e', v_drift=0 * u.m / u.s)
+    <Quantity 2.60235754e-18 s / m>
 
     """
+    if v_drift != 0:
+        raise NotImplementedError("Non-zero drift speed is work in progress.")
     if units == "units":
         # unit checks and conversions
         # checking velocity units
-        vx = vx.to(u.m / u.s)
-        vy = vy.to(u.m / u.s)
-        vz = vz.to(u.m / u.s)
-        # Catching case where drift velocities have default values, they
-        # need to be assigned units
-        Vx_drift = _v_drift_units(Vx_drift)
-        Vy_drift = _v_drift_units(Vy_drift)
-        Vz_drift = _v_drift_units(Vz_drift)
+        v = v.to(u.m / u.s)
+        # Catching case where drift velocity has default value, and
+        # needs to be assigned units
+        v_drift = _v_drift_units(v_drift)
         # convert temperature to Kelvins
         T = T.to(u.K, equivalencies=u.temperature_energy())
         if np.isnan(vTh):
@@ -545,29 +788,17 @@ def Maxwellian_speed_3D(vx,
         vTh = (parameters.thermal_speed(T * u.K,
                                         particle=particle,
                                         method="most_probable")).si.value
-    # getting distribution functions along each axis
-    fx = Maxwellian_speed_1D(vx,
-                             T,
-                             particle=particle,
-                             V_drift=Vx_drift,
-                             vTh=vTh,
-                             units=units)
-    fy = Maxwellian_speed_1D(vy,
-                             T,
-                             particle=particle,
-                             V_drift=Vy_drift,
-                             vTh=vTh,
-                             units=units)
-    fz = Maxwellian_speed_1D(vz,
-                             T,
-                             particle=particle,
-                             V_drift=Vz_drift,
-                             vTh=vTh,
-                             units=units)
-    # multiplying probabilities in each axis to get 3D probability
-    distFunc = fx * fy * fz
+    # getting square of thermal speed
+    vThSq = vTh ** 2
+    # get square of relative particle speed
+    vSq = (v - v_drift) ** 2
+    # calculating distribution function
+    coeff1 = (np.pi * vThSq) ** (-3 / 2)
+    coeff2 = 4 * np.pi * vSq
+    expTerm = np.exp(-vSq / vThSq)
+    distFunc = coeff1 * coeff2 * expTerm
     if units == "units":
-        return distFunc.to((u.s / u.m)**3)
+        return distFunc.to(u.s / u.m)
     elif units == "unitless":
         return distFunc
 
@@ -576,13 +807,13 @@ def kappa_velocity_1D(v,
                       T,
                       kappa,
                       particle="e",
-                      V_drift=0,
+                      v_drift=0,
                       vTh=np.nan,
                       units="units"):
     r"""
-    Return the probability at the velocity `v` in m/s
+    Return the probability density at the velocity `v` in m/s
     to find a particle `particle` in a plasma of temperature `T`
-    following the Kappa distribution function. The slope of the
+    following the Kappa distribution function in 1D. The slope of the
     tail of the Kappa distribution function is set by 'kappa', which
     must be greater than :math:`1/2`.
 
@@ -605,7 +836,7 @@ def kappa_velocity_1D(v,
         for deuterium, or `'He-4 +1'` for :math:`He_4^{+1}`
         (singly ionized helium-4)), which defaults to electrons.
 
-    V_drift: ~astropy.units.Quantity, optional
+    v_drift: ~astropy.units.Quantity, optional
         The drift velocity in units convertible to m/s.
 
     vTh: ~astropy.units.Quantity, optional
@@ -622,7 +853,7 @@ def kappa_velocity_1D(v,
     Returns
     -------
     f : ~astropy.units.Quantity
-        probability in Velocity^-1, normalized so that
+        Probability density in Velocity^-1, normalized so that
         :math:`\int_{-\infty}^{+\infty} f(v) dv = 1`.
 
     Raises
@@ -662,8 +893,8 @@ def kappa_velocity_1D(v,
     --------
     >>> from plasmapy.physics import kappa_velocity_1D
     >>> from astropy import units as u
-    >>> v=1*u.m/u.s
-    >>> kappa_velocity_1D(v=v, T=30000*u.K, kappa=4, particle='e',V_drift=0*u.m/u.s)
+    >>> v=1 * u.m / u.s
+    >>> kappa_velocity_1D(v=v, T=30000*u.K, kappa=4, particle='e', v_drift=0 * u.m / u.s)
     <Quantity 6.75549854e-07 s / m>
 
     See Also
@@ -680,11 +911,11 @@ def kappa_velocity_1D(v,
         v = v.to(u.m / u.s)
         # catching case where drift velocities have default values, they
         # need to be assigned units
-        if V_drift == 0:
-            if not isinstance(V_drift, astropy.units.quantity.Quantity):
-                V_drift = V_drift * u.m / u.s
+        if v_drift == 0:
+            if not isinstance(v_drift, astropy.units.quantity.Quantity):
+                v_drift = v_drift * u.m / u.s
         # checking units of drift velocities
-        V_drift = V_drift.to(u.m / u.s)
+        v_drift = v_drift.to(u.m / u.s)
         # convert temperature to Kelvins
         T = T.to(u.K, equivalencies=u.temperature_energy())
         if np.isnan(vTh):
@@ -703,7 +934,7 @@ def kappa_velocity_1D(v,
     # Get thermal velocity squared and accounting for 1D instead of 3D
     vThSq = vTh ** 2
     # Get square of relative particle velocity
-    vSq = (v - V_drift) ** 2
+    vSq = (v - v_drift) ** 2
     # calculating distribution function
     expTerm = (1 + vSq / (kappa * vThSq)) ** (-kappa)
     coeff1 = 1 / (np.sqrt(np.pi) * kappa ** (3 / 2) * vTh)
@@ -721,16 +952,17 @@ def kappa_velocity_3D(vx,
                       T,
                       kappa,
                       particle="e",
-                      Vx_drift=0,
-                      Vy_drift=0,
-                      Vz_drift=0,
+                      vx_drift=0,
+                      vy_drift=0,
+                      vz_drift=0,
                       vTh=np.nan,
                       units="units"):
     r"""
-    Return the probability of finding a particle with velocity components
-    `v_x`, `v_y`, and `v_z`in m/s in a suprathermal plasma of temperature
-    `T` and parameter 'kappa' which follows the 3D Kappa distribution function.
-    This function assumes Cartesian coordinates.
+    Return the probability density function for finding a particle with 
+    velocity components `v_x`, `v_y`, and `v_z`in m/s in a suprathermal 
+    plasma of temperature `T` and parameter 'kappa' which follows the 
+    3D Kappa distribution function. This function assumes Cartesian 
+    coordinates.
 
     Parameters
     ----------
@@ -757,13 +989,13 @@ def kappa_velocity_3D(vx,
         for deuterium, or 'He-4 +1' for :math:`He_4^{+1}` : singly ionized
         helium-4)), which defaults to electrons.
 
-    Vx_drift: ~astropy.units.Quantity, optional
+    vx_drift: ~astropy.units.Quantity, optional
         The drift velocity in x-direction units convertible to m/s.
 
-    Vy_drift: ~astropy.units.Quantity, optional
+    vy_drift: ~astropy.units.Quantity, optional
         The drift velocity in y-direction units convertible to m/s.
 
-    Vz_drift: ~astropy.units.Quantity, optional
+    vz_drift: ~astropy.units.Quantity, optional
         The drift velocity in z-direction units convertible to m/s.
 
     vTh: ~astropy.units.Quantity, optional
@@ -780,7 +1012,7 @@ def kappa_velocity_3D(vx,
     Returns
     -------
     f : ~astropy.units.Quantity
-        probability in Velocity^-1, normalized so that:
+        Probability density in Velocity^-1, normalized so that:
         :math:`\iiint_{0}^{\infty} f(\vec{v}) d\vec{v} = 1`
 
     Raises
@@ -824,16 +1056,16 @@ def kappa_velocity_3D(vx,
     -------
     >>> from plasmapy.physics import kappa_velocity_3D
     >>> from astropy import units as u
-    >>> v=1*u.m/u.s
+    >>> v=1 * u.m / u.s
     >>> kappa_velocity_3D(vx=v,
     ... vy=v,
     ... vz=v,
-    ... T=30000*u.K,
+    ... T=30000 * u.K,
     ... kappa=4,
     ... particle='e',
-    ... Vx_drift=0*u.m/u.s,
-    ... Vy_drift=0*u.m/u.s,
-    ... Vz_drift=0*u.m/u.s)
+    ... vx_drift=0 * u.m / u.s,
+    ... vy_drift=0 * u.m / u.s,
+    ... vz_drift=0 * u.m / u.s)
     <Quantity 3.7833988e-19 s3 / m3>
     """
     # must have kappa > 3/2 for distribution function to be valid
@@ -847,9 +1079,9 @@ def kappa_velocity_3D(vx,
         vz = vz.to(u.m / u.s)
         # Catching case where drift velocities have default values, they
         # need to be assigned units
-        Vx_drift = _v_drift_units(Vx_drift)
-        Vy_drift = _v_drift_units(Vy_drift)
-        Vz_drift = _v_drift_units(Vz_drift)
+        vx_drift = _v_drift_units(vx_drift)
+        vy_drift = _v_drift_units(vy_drift)
+        vz_drift = _v_drift_units(vz_drift)
         # convert temperature to Kelvins
         T = T.to(u.K, equivalencies=u.temperature_energy())
         if np.isnan(vTh):
@@ -868,7 +1100,7 @@ def kappa_velocity_3D(vx,
     # getting square of thermal velocity
     vThSq = vTh ** 2
     # Get square of relative particle velocity
-    vSq = ((vx - Vx_drift) ** 2 + (vy - Vy_drift) ** 2 + (vz - Vz_drift) ** 2)
+    vSq = ((vx - vx_drift) ** 2 + (vy - vy_drift) ** 2 + (vz - vz_drift) ** 2)
     # calculating distribution function
     expTerm = (1 + vSq / (kappa * vThSq)) ** (-(kappa + 1))
     coeff1 = 1 / (2 * np.pi * (kappa * vThSq) ** (3 / 2))


Test patch:
diff --git a/plasmapy/physics/tests/test_distribution.py b/plasmapy/physics/tests/test_distribution.py
--- a/plasmapy/physics/tests/test_distribution.py
+++ b/plasmapy/physics/tests/test_distribution.py
@@ -8,6 +8,8 @@
 from ...constants import (m_p, m_e, c, mu0, k_B, e, eps0, pi)
 from ..distribution import (Maxwellian_1D,
                             Maxwellian_speed_1D,
+                            Maxwellian_velocity_2D,
+                            Maxwellian_speed_2D,
                             Maxwellian_velocity_3D,
                             Maxwellian_speed_3D,
                             kappa_velocity_1D,
@@ -24,9 +26,9 @@ def setup_class(self):
         """initializing parameters for tests """
         self.T_e = 30000 * u.K
         self.v = 1e5 * u.m / u.s
-        self.V_drift = 1000000 * u.m / u.s
-        self.V_drift2 = 0 * u.m / u.s
-        self.V_drift3 = 1e5 * u.m / u.s
+        self.v_drift = 1000000 * u.m / u.s
+        self.v_drift2 = 0 * u.m / u.s
+        self.v_drift3 = 1e5 * u.m / u.s
         self.start = -5000
         self.stop = - self.start
         self.dv = 10000 * u.m / u.s
@@ -47,7 +49,7 @@ def test_max_noDrift(self):
         max_index = Maxwellian_1D(self.v_vect,
                                   T=self.T_e,
                                   particle=self.particle,
-                                  V_drift=0 * u.m / u.s
+                                  v_drift=0 * u.m / u.s
                                   ).argmax()
         assert np.isclose(self.v_vect[max_index].value, 0.0)
 
@@ -59,9 +61,9 @@ def test_max_drift(self):
         max_index = Maxwellian_1D(self.v_vect,
                                   T=self.T_e,
                                   particle=self.particle,
-                                  V_drift=self.V_drift
+                                  v_drift=self.v_drift
                                   ).argmax()
-        assert np.isclose(self.v_vect[max_index].value, self.V_drift.value)
+        assert np.isclose(self.v_vect[max_index].value, self.v_drift.value)
 
     def test_norm(self):
         """
@@ -180,7 +182,7 @@ def test_zero_drift_units(self):
         distFunc = Maxwellian_1D(v=self.v,
                                  T=self.T_e,
                                  particle=self.particle,
-                                 V_drift=self.V_drift2,
+                                 v_drift=self.v_drift2,
                                  units="units")
         errStr = (f"Distribution function should be {self.distFuncTrue} "
                   f"and not {distFunc}.")
@@ -197,7 +199,7 @@ def test_value_drift_units(self):
         distFunc = Maxwellian_1D(v=self.v,
                                  T=self.T_e,
                                  particle=self.particle,
-                                 V_drift=self.V_drift3,
+                                 v_drift=self.v_drift3,
                                  units="units")
         errStr = (f"Distribution function should be {testVal} "
                   f"and not {distFunc}.")
@@ -219,9 +221,10 @@ def setup_class(self):
                                  particle=self.particle,
                                  method="most_probable")
         self.v = 1e5 * u.m / u.s
-        self.V_drift = 0 * u.m / u.s
-        self.V_drift2 = 1e5 * u.m / u.s
-        self.distFuncTrue = 1.8057567503860518e-25
+        self.v_drift = 0 * u.m / u.s
+        self.v_drift2 = 1e5 * u.m / u.s
+        self.distFuncTrue = 1.72940389716217e-27
+        self.distFuncDrift = 2 * (self.vTh ** 2 * np.pi) ** (-1 / 2)
 
     def test_norm(self):
         """
@@ -313,7 +316,7 @@ def test_zero_drift_units(self):
         distFunc = Maxwellian_speed_1D(v=self.v,
                                        T=self.T,
                                        particle=self.particle,
-                                       V_drift=self.V_drift,
+                                       v_drift=self.v_drift,
                                        units="units")
         errStr = (f"Distribution function should be {self.distFuncTrue} "
                   f"and not {distFunc}.")
@@ -329,18 +332,18 @@ def test_value_drift_units(self):
         distFunc = Maxwellian_speed_1D(v=self.v,
                                        T=self.T,
                                        particle=self.particle,
-                                       V_drift=self.V_drift2,
+                                       v_drift=self.v_drift2,
                                        units="units")
         errStr = (f"Distribution function should be 0.0 "
                   f"and not {distFunc}.")
         assert np.isclose(distFunc.value,
-                          0.0,
+                          self.distFuncDrift.value,
                           rtol=1e-8,
                           atol=0.0), errStr
 
 
-# test class for Maxwellian_velocity_3D function
-class Test_Maxwellian_velocity_3D(object):
+# test class for Maxwellian_velocity_2D function
+class Test_Maxwellian_velocity_2D(object):
     @classmethod
     def setup_class(self):
         """initializing parameters for tests """
@@ -352,14 +355,11 @@ def setup_class(self):
                                  method="most_probable")
         self.vx = 1e5 * u.m / u.s
         self.vy = 1e5 * u.m / u.s
-        self.vz = 1e5 * u.m / u.s
-        self.Vx_drift = 0 * u.m / u.s
-        self.Vy_drift = 0 * u.m / u.s
-        self.Vz_drift = 0 * u.m / u.s
-        self.Vx_drift2 = 1e5 * u.m / u.s
-        self.Vy_drift2 = 1e5 * u.m / u.s
-        self.Vz_drift2 = 1e5 * u.m / u.s
-        self.distFuncTrue = 2.7654607627522045e-37
+        self.vx_drift = 0 * u.m / u.s
+        self.vy_drift = 0 * u.m / u.s
+        self.vx_drift2 = 1e5 * u.m / u.s
+        self.vy_drift2 = 1e5 * u.m / u.s
+        self.distFuncTrue = 7.477094598799251e-55
 
     def test_norm(self):
         """
@@ -370,24 +370,21 @@ def test_norm(self):
         # setting up integration from -10*vTh to 10*vTh, which is close to Inf
         infApprox = (10 * vTh)
         # integrating, this should be close to 1
-        integ = spint.tplquad(Maxwellian_velocity_3D,
+        integ = spint.dblquad(Maxwellian_velocity_2D,
                               -infApprox,
                               infApprox,
-                              lambda z: -infApprox,
-                              lambda z: infApprox,
-                              lambda z, y: -infApprox,
-                              lambda z, y: infApprox,
+                              lambda y: -infApprox,
+                              lambda y: infApprox,
                               args=(self.T,
                                     self.particle,
                                     0,
                                     0,
-                                    0,
                                     vTh,
                                     "unitless"),
                               epsabs=1e0,
                               epsrel=1e0,
                               )
-        # value returned from tplquad is (integral, error), we just need
+        # value returned from dblquad is (integral, error), we just need
         # the 1st
         integVal = integ[0]
         exceptStr = ("Integral of distribution function should be 1 "
@@ -401,9 +398,8 @@ def test_units_no_vTh(self):
         """
         Tests distribution function with units, but not passing vTh.
         """
-        distFunc = Maxwellian_velocity_3D(vx=self.vx,
+        distFunc = Maxwellian_velocity_2D(vx=self.vx,
                                           vy=self.vy,
-                                          vz=self.vz,
                                           T=self.T,
                                           particle=self.particle,
                                           units="units")
@@ -418,9 +414,8 @@ def test_units_vTh(self):
         """
         Tests distribution function with units and passing vTh.
         """
-        distFunc = Maxwellian_velocity_3D(vx=self.vx,
+        distFunc = Maxwellian_velocity_2D(vx=self.vx,
                                           vy=self.vy,
-                                          vz=self.vz,
                                           T=self.T,
                                           vTh=self.vTh,
                                           particle=self.particle,
@@ -439,9 +434,8 @@ def test_unitless_no_vTh(self):
         # converting T to SI then stripping units
         T = self.T.to(u.K, equivalencies=u.temperature_energy())
         T = T.si.value
-        distFunc = Maxwellian_velocity_3D(vx=self.vx.si.value,
+        distFunc = Maxwellian_velocity_2D(vx=self.vx.si.value,
                                           vy=self.vy.si.value,
-                                          vz=self.vz.si.value,
                                           T=T,
                                           particle=self.particle,
                                           units="unitless")
@@ -459,9 +453,8 @@ def test_unitless_vTh(self):
         # converting T to SI then stripping units
         T = self.T.to(u.K, equivalencies=u.temperature_energy())
         T = T.si.value
-        distFunc = Maxwellian_velocity_3D(vx=self.vx.si.value,
+        distFunc = Maxwellian_velocity_2D(vx=self.vx.si.value,
                                           vy=self.vy.si.value,
-                                          vz=self.vz.si.value,
                                           T=T,
                                           vTh=self.vTh.si.value,
                                           particle=self.particle,
@@ -478,14 +471,12 @@ def test_zero_drift_units(self):
         Testing inputting drift equal to 0 with units. These should just
         get passed and not have extra units applied to them.
         """
-        distFunc = Maxwellian_velocity_3D(vx=self.vx,
+        distFunc = Maxwellian_velocity_2D(vx=self.vx,
                                           vy=self.vy,
-                                          vz=self.vz,
                                           T=self.T,
                                           particle=self.particle,
-                                          Vx_drift=self.Vx_drift,
-                                          Vy_drift=self.Vy_drift,
-                                          Vz_drift=self.Vz_drift,
+                                          vx_drift=self.vx_drift,
+                                          vy_drift=self.vy_drift,
                                           units="units")
         errStr = (f"Distribution function should be {self.distFuncTrue} "
                   f"and not {distFunc}.")
@@ -498,15 +489,13 @@ def test_value_drift_units(self):
         """
         Testing vdrifts with values
         """
-        testVal = ((3 * self.vTh**2 * np.pi) ** (-3 / 2)).si.value
-        distFunc = Maxwellian_velocity_3D(vx=self.vx,
+        testVal = ((self.vTh**2 * np.pi) ** (-1)).si.value
+        distFunc = Maxwellian_velocity_2D(vx=self.vx,
                                           vy=self.vy,
-                                          vz=self.vz,
                                           T=self.T,
                                           particle=self.particle,
-                                          Vx_drift=self.Vx_drift2,
-                                          Vy_drift=self.Vy_drift2,
-                                          Vz_drift=self.Vz_drift2,
+                                          vx_drift=self.vx_drift2,
+                                          vy_drift=self.vy_drift2,
                                           units="units")
         errStr = (f"Distribution function should be {testVal} "
                   f"and not {distFunc}.")
@@ -516,8 +505,141 @@ def test_value_drift_units(self):
                           atol=0.0), errStr
 
 
-# test class for Maxwellian_speed_3D function
-class Test_Maxwellian_speed_3D(object):
+# test class for Maxwellian_speed_2D function
+class Test_Maxwellian_speed_2D(object):
+    @classmethod
+    def setup_class(self):
+        """initializing parameters for tests """
+        self.T = 1.0 * u.eV
+        self.particle = 'H+'
+        # get thermal velocity and thermal velocity squared
+        self.vTh = thermal_speed(self.T,
+                                 particle=self.particle,
+                                 method="most_probable")
+        self.v = 1e5 * u.m / u.s
+        self.v_drift = 0 * u.m / u.s
+        self.v_drift2 = 1e5 * u.m / u.s
+        self.distFuncTrue = 2.2148166449365907e-26
+
+    def test_norm(self):
+        """
+        Tests whether distribution function is normalized, and integrates to 1.
+        """
+        # setting up integration from 0 to 10*vTh
+        xData1D = np.arange(0, 10.001, 0.001) * self.vTh
+        yData1D = Maxwellian_speed_2D(v=xData1D,
+                                      T=self.T,
+                                      particle=self.particle)
+        # integrating, this should be close to 1
+        integ = spint.trapz(y=yData1D, x=xData1D)
+        exceptStr = "Integral of distribution function should be 1."
+        assert np.isclose(integ.value, 1), exceptStr
+
+    def test_units_no_vTh(self):
+        """
+        Tests distribution function with units, but not passing vTh.
+        """
+        distFunc = Maxwellian_speed_2D(v=self.v,
+                                       T=self.T,
+                                       particle=self.particle,
+                                       units="units")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc.value,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_units_vTh(self):
+        """
+        Tests distribution function with units and passing vTh.
+        """
+        distFunc = Maxwellian_speed_2D(v=self.v,
+                                       T=self.T,
+                                       vTh=self.vTh,
+                                       particle=self.particle,
+                                       units="units")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc.value,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_unitless_no_vTh(self):
+        """
+        Tests distribution function without units, and not passing vTh.
+        """
+        # converting T to SI then stripping units
+        T = self.T.to(u.K, equivalencies=u.temperature_energy())
+        T = T.si.value
+        distFunc = Maxwellian_speed_2D(v=self.v.si.value,
+                                       T=T,
+                                       particle=self.particle,
+                                       units="unitless")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_unitless_vTh(self):
+        """
+        Tests distribution function without units, and with passing vTh.
+        """
+        # converting T to SI then stripping units
+        T = self.T.to(u.K, equivalencies=u.temperature_energy())
+        T = T.si.value
+        distFunc = Maxwellian_speed_2D(v=self.v.si.value,
+                                       T=T,
+                                       vTh=self.vTh.si.value,
+                                       particle=self.particle,
+                                       units="unitless")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_zero_drift_units(self):
+        """
+        Testing inputting drift equal to 0 with units. These should just
+        get passed and not have extra units applied to them.
+        """
+        distFunc = Maxwellian_speed_2D(v=self.v,
+                                       T=self.T,
+                                       particle=self.particle,
+                                       v_drift=self.v_drift,
+                                       units="units")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc.value,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_value_drift_units(self):
+        """
+        Testing vdrifts with values
+        """
+        with pytest.raises(NotImplementedError):
+            distFunc = Maxwellian_speed_2D(v=self.v,
+                                           T=self.T,
+                                           particle=self.particle,
+                                           v_drift=self.v_drift2,
+                                           units="units")
+#        errStr = (f"Distribution function should be 0.0 "
+#                  f"and not {distFunc}.")
+#        assert np.isclose(distFunc.value,
+#                          0.0,
+#                          rtol=1e-8,
+#                          atol=0.0), errStr
+
+
+# test class for Maxwellian_velocity_3D function
+class Test_Maxwellian_velocity_3D(object):
     @classmethod
     def setup_class(self):
         """initializing parameters for tests """
@@ -530,13 +652,13 @@ def setup_class(self):
         self.vx = 1e5 * u.m / u.s
         self.vy = 1e5 * u.m / u.s
         self.vz = 1e5 * u.m / u.s
-        self.Vx_drift = 0 * u.m / u.s
-        self.Vy_drift = 0 * u.m / u.s
-        self.Vz_drift = 0 * u.m / u.s
-        self.Vx_drift2 = 1e5 * u.m / u.s
-        self.Vy_drift2 = 1e5 * u.m / u.s
-        self.Vz_drift2 = 1e5 * u.m / u.s
-        self.distFuncTrue = 5.888134761477178e-75
+        self.vx_drift = 0 * u.m / u.s
+        self.vy_drift = 0 * u.m / u.s
+        self.vz_drift = 0 * u.m / u.s
+        self.vx_drift2 = 1e5 * u.m / u.s
+        self.vy_drift2 = 1e5 * u.m / u.s
+        self.vz_drift2 = 1e5 * u.m / u.s
+        self.distFuncTrue = 6.465458269306909e-82
 
     def test_norm(self):
         """
@@ -544,15 +666,15 @@ def test_norm(self):
         """
         # converting vTh to unitless
         vTh = self.vTh.si.value
-        # setting up integration from 0 to 10*vTh, which is close to Inf
+        # setting up integration from -10*vTh to 10*vTh, which is close to Inf
         infApprox = (10 * vTh)
-        # integral should be close to 1
-        integ = spint.tplquad(Maxwellian_speed_3D,
-                              0,
+        # integrating, this should be close to 1
+        integ = spint.tplquad(Maxwellian_velocity_3D,
+                              -infApprox,
                               infApprox,
-                              lambda z: 0,
+                              lambda z: -infApprox,
                               lambda z: infApprox,
-                              lambda z, y: 0,
+                              lambda z, y: -infApprox,
                               lambda z, y: infApprox,
                               args=(self.T,
                                     self.particle,
@@ -568,7 +690,7 @@ def test_norm(self):
         # the 1st
         integVal = integ[0]
         exceptStr = ("Integral of distribution function should be 1 "
-                     f"and not {integVal}")
+                     f"and not {integVal}.")
         assert np.isclose(integVal,
                           1,
                           rtol=1e-3,
@@ -578,9 +700,156 @@ def test_units_no_vTh(self):
         """
         Tests distribution function with units, but not passing vTh.
         """
-        distFunc = Maxwellian_speed_3D(vx=self.vx,
-                                       vy=self.vy,
-                                       vz=self.vz,
+        distFunc = Maxwellian_velocity_3D(vx=self.vx,
+                                          vy=self.vy,
+                                          vz=self.vz,
+                                          T=self.T,
+                                          particle=self.particle,
+                                          units="units")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc.value,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_units_vTh(self):
+        """
+        Tests distribution function with units and passing vTh.
+        """
+        distFunc = Maxwellian_velocity_3D(vx=self.vx,
+                                          vy=self.vy,
+                                          vz=self.vz,
+                                          T=self.T,
+                                          vTh=self.vTh,
+                                          particle=self.particle,
+                                          units="units")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc.value,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_unitless_no_vTh(self):
+        """
+        Tests distribution function without units, and not passing vTh.
+        """
+        # converting T to SI then stripping units
+        T = self.T.to(u.K, equivalencies=u.temperature_energy())
+        T = T.si.value
+        distFunc = Maxwellian_velocity_3D(vx=self.vx.si.value,
+                                          vy=self.vy.si.value,
+                                          vz=self.vz.si.value,
+                                          T=T,
+                                          particle=self.particle,
+                                          units="unitless")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_unitless_vTh(self):
+        """
+        Tests distribution function without units, and with passing vTh.
+        """
+        # converting T to SI then stripping units
+        T = self.T.to(u.K, equivalencies=u.temperature_energy())
+        T = T.si.value
+        distFunc = Maxwellian_velocity_3D(vx=self.vx.si.value,
+                                          vy=self.vy.si.value,
+                                          vz=self.vz.si.value,
+                                          T=T,
+                                          vTh=self.vTh.si.value,
+                                          particle=self.particle,
+                                          units="unitless")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_zero_drift_units(self):
+        """
+        Testing inputting drift equal to 0 with units. These should just
+        get passed and not have extra units applied to them.
+        """
+        distFunc = Maxwellian_velocity_3D(vx=self.vx,
+                                          vy=self.vy,
+                                          vz=self.vz,
+                                          T=self.T,
+                                          particle=self.particle,
+                                          vx_drift=self.vx_drift,
+                                          vy_drift=self.vy_drift,
+                                          vz_drift=self.vz_drift,
+                                          units="units")
+        errStr = (f"Distribution function should be {self.distFuncTrue} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc.value,
+                          self.distFuncTrue,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+    def test_value_drift_units(self):
+        """
+        Testing vdrifts with values
+        """
+        testVal = ((self.vTh**2 * np.pi) ** (-3 / 2)).si.value
+        distFunc = Maxwellian_velocity_3D(vx=self.vx,
+                                          vy=self.vy,
+                                          vz=self.vz,
+                                          T=self.T,
+                                          particle=self.particle,
+                                          vx_drift=self.vx_drift2,
+                                          vy_drift=self.vy_drift2,
+                                          vz_drift=self.vz_drift2,
+                                          units="units")
+        errStr = (f"Distribution function should be {testVal} "
+                  f"and not {distFunc}.")
+        assert np.isclose(distFunc.value,
+                          testVal,
+                          rtol=1e-8,
+                          atol=0.0), errStr
+
+
+# test class for Maxwellian_speed_3D function
+class Test_Maxwellian_speed_3D(object):
+    @classmethod
+    def setup_class(self):
+        """initializing parameters for tests """
+        self.T = 1.0 * u.eV
+        self.particle = 'H+'
+        # get thermal velocity and thermal velocity squared
+        self.vTh = thermal_speed(self.T,
+                                 particle=self.particle,
+                                 method="most_probable")
+        self.v = 1e5 * u.m / u.s
+        self.v_drift = 0 * u.m / u.s
+        self.v_drift2 = 1e5 * u.m / u.s
+        self.distFuncTrue = 1.8057567503860518e-25
+
+    def test_norm(self):
+        """
+        Tests whether distribution function is normalized, and integrates to 1.
+        """
+        # setting up integration from 0 to 10*vTh
+        xData1D = np.arange(0, 10.01, 0.01) * self.vTh
+        yData1D = Maxwellian_speed_3D(v=xData1D,
+                                      T=self.T,
+                                      particle=self.particle)
+        # integrating, this should be close to 1
+        integ = spint.trapz(y=yData1D, x=xData1D)
+        exceptStr = "Integral of distribution function should be 1."
+        assert np.isclose(integ.value, 1), exceptStr
+
+    def test_units_no_vTh(self):
+        """
+        Tests distribution function with units, but not passing vTh.
+        """
+        distFunc = Maxwellian_speed_3D(v=self.v,
                                        T=self.T,
                                        particle=self.particle,
                                        units="units")
@@ -595,9 +864,7 @@ def test_units_vTh(self):
         """
         Tests distribution function with units and passing vTh.
         """
-        distFunc = Maxwellian_speed_3D(vx=self.vx,
-                                       vy=self.vy,
-                                       vz=self.vz,
+        distFunc = Maxwellian_speed_3D(v=self.v,
                                        T=self.T,
                                        vTh=self.vTh,
                                        particle=self.particle,
@@ -616,9 +883,7 @@ def test_unitless_no_vTh(self):
         # converting T to SI then stripping units
         T = self.T.to(u.K, equivalencies=u.temperature_energy())
         T = T.si.value
-        distFunc = Maxwellian_speed_3D(vx=self.vx.si.value,
-                                       vy=self.vy.si.value,
-                                       vz=self.vz.si.value,
+        distFunc = Maxwellian_speed_3D(v=self.v.si.value,
                                        T=T,
                                        particle=self.particle,
                                        units="unitless")
@@ -636,9 +901,7 @@ def test_unitless_vTh(self):
         # converting T to SI then stripping units
         T = self.T.to(u.K, equivalencies=u.temperature_energy())
         T = T.si.value
-        distFunc = Maxwellian_speed_3D(vx=self.vx.si.value,
-                                       vy=self.vy.si.value,
-                                       vz=self.vz.si.value,
+        distFunc = Maxwellian_speed_3D(v=self.v.si.value,
                                        T=T,
                                        vTh=self.vTh.si.value,
                                        particle=self.particle,
@@ -655,14 +918,10 @@ def test_zero_drift_units(self):
         Testing inputting drift equal to 0 with units. These should just
         get passed and not have extra units applied to them.
         """
-        distFunc = Maxwellian_speed_3D(vx=self.vx,
-                                       vy=self.vy,
-                                       vz=self.vz,
+        distFunc = Maxwellian_speed_3D(v=self.v,
                                        T=self.T,
                                        particle=self.particle,
-                                       Vx_drift=self.Vx_drift,
-                                       Vy_drift=self.Vy_drift,
-                                       Vz_drift=self.Vz_drift,
+                                       v_drift=self.v_drift,
                                        units="units")
         errStr = (f"Distribution function should be {self.distFuncTrue} "
                   f"and not {distFunc}.")
@@ -675,21 +934,18 @@ def test_value_drift_units(self):
         """
         Testing vdrifts with values
         """
-        distFunc = Maxwellian_speed_3D(vx=self.vx,
-                                       vy=self.vy,
-                                       vz=self.vz,
-                                       T=self.T,
-                                       particle=self.particle,
-                                       Vx_drift=self.Vx_drift2,
-                                       Vy_drift=self.Vy_drift2,
-                                       Vz_drift=self.Vz_drift2,
-                                       units="units")
-        errStr = (f"Distribution function should be 0.0 "
-                  f"and not {distFunc}.")
-        assert np.isclose(distFunc.value,
-                          0.0,
-                          rtol=1e-8,
-                          atol=0.0), errStr
+        with pytest.raises(NotImplementedError):
+            distFunc = Maxwellian_speed_3D(v=self.v,
+                                           T=self.T,
+                                           particle=self.particle,
+                                           v_drift=self.v_drift2,
+                                           units="units")
+#        errStr = (f"Distribution function should be 0.0 "
+#                  f"and not {distFunc}.")
+#        assert np.isclose(distFunc.value,
+#                          0.0,
+#                          rtol=1e-8,
+#                          atol=0.0), errStr
 
 
 # kappa
@@ -703,9 +959,9 @@ def setup_class(self):
         self.kappa = 4
         self.kappaInvalid = 3 / 2
         self.v = 1e5 * u.m / u.s
-        self.V_drift = 1000000 * u.m / u.s
-        self.V_drift2 = 0 * u.m / u.s
-        self.V_drift3 = 1e5 * u.m / u.s
+        self.v_drift = 1000000 * u.m / u.s
+        self.v_drift2 = 0 * u.m / u.s
+        self.v_drift3 = 1e5 * u.m / u.s
         self.start = -5000
         self.stop = -self.start
         self.dv = 10000 * u.m / u.s
@@ -739,7 +995,7 @@ def test_max_noDrift(self):
                                       T=self.T_e,
                                       kappa=self.kappa,
                                       particle=self.particle,
-                                      V_drift=0 * u.m / u.s).argmax()
+                                      v_drift=0 * u.m / u.s).argmax()
         assert np.isclose(self.v_vect[max_index].value, 0.0)
 
     def test_max_drift(self):
@@ -751,8 +1007,8 @@ def test_max_drift(self):
                                       T=self.T_e,
                                       kappa=self.kappa,
                                       particle=self.particle,
-                                      V_drift=self.V_drift).argmax()
-        assert np.isclose(self.v_vect[max_index].value, self.V_drift.value)
+                                      v_drift=self.v_drift).argmax()
+        assert np.isclose(self.v_vect[max_index].value, self.v_drift.value)
 
     def test_maxwellian_limit(self):
         """
@@ -884,7 +1140,7 @@ def test_zero_drift_units(self):
                                      T=self.T_e,
                                      kappa=self.kappa,
                                      particle=self.particle,
-                                     V_drift=self.V_drift2,
+                                     v_drift=self.v_drift2,
                                      units="units")
         errStr = (f"Distribution function should be {self.distFuncTrue} "
                   f"and not {distFunc}.")
@@ -902,7 +1158,7 @@ def test_value_drift_units(self):
                                      T=self.T_e,
                                      kappa=self.kappa,
                                      particle=self.particle,
-                                     V_drift=self.V_drift3,
+                                     v_drift=self.v_drift3,
                                      units="units")
         errStr = (f"Distribution function should be {testVal} "
                   f"and not {distFunc}.")
@@ -928,12 +1184,12 @@ def setup_class(self):
         self.vx = 1e5 * u.m / u.s
         self.vy = 1e5 * u.m / u.s
         self.vz = 1e5 * u.m / u.s
-        self.Vx_drift = 0 * u.m / u.s
-        self.Vy_drift = 0 * u.m / u.s
-        self.Vz_drift = 0 * u.m / u.s
-        self.Vx_drift2 = 1e5 * u.m / u.s
-        self.Vy_drift2 = 1e5 * u.m / u.s
-        self.Vz_drift2 = 1e5 * u.m / u.s
+        self.vx_drift = 0 * u.m / u.s
+        self.vy_drift = 0 * u.m / u.s
+        self.vz_drift = 0 * u.m / u.s
+        self.vx_drift2 = 1e5 * u.m / u.s
+        self.vy_drift2 = 1e5 * u.m / u.s
+        self.vz_drift2 = 1e5 * u.m / u.s
         self.distFuncTrue = 1.1847914288918793e-22
 
     def test_invalid_kappa(self):
@@ -962,9 +1218,9 @@ def test_invalid_kappa(self):
 #                                          T=self.T,
 #                                          kappa=kappaLarge,
 #                                          particle=self.particle,
-#                                          Vx_drift=self.Vx_drift2,
-#                                          Vy_drift=self.Vy_drift2,
-#                                          Vz_drift=self.Vz_drift2,
+#                                          vx_drift=self.vx_drift2,
+#                                          vy_drift=self.vy_drift2,
+#                                          vz_drift=self.vz_drift2,
 #                                          units="units")
 #        Teff =  self.T
 #        maxwellDistFunc = Maxwellian_velocity_3D(vx=self.vx,
@@ -972,9 +1228,9 @@ def test_invalid_kappa(self):
 #                                                 vz=self.vz,
 #                                                 T=Teff,
 #                                                 particle=self.particle,
-#                                                 Vx_drift=self.Vx_drift2,
-#                                                 Vy_drift=self.Vy_drift2,
-#                                                 Vz_drift=self.Vz_drift2,
+#                                                 vx_drift=self.vx_drift2,
+#                                                 vy_drift=self.vy_drift2,
+#                                                 vz_drift=self.vz_drift2,
 #                                                 units="units")
 #        errStr = (f"Distribution function should be {maxwellDistFunc} "
 #                  f"and not {kappaDistFunc}.")
@@ -1113,9 +1369,9 @@ def test_zero_drift_units(self):
                                      T=self.T,
                                      kappa=self.kappa,
                                      particle=self.particle,
-                                     Vx_drift=self.Vx_drift,
-                                     Vy_drift=self.Vy_drift,
-                                     Vz_drift=self.Vz_drift,
+                                     vx_drift=self.vx_drift,
+                                     vy_drift=self.vy_drift,
+                                     vz_drift=self.vz_drift,
                                      units="units")
         errStr = (f"Distribution function should be {self.distFuncTrue} "
                   f"and not {distFunc}.")
@@ -1135,9 +1391,9 @@ def test_value_drift_units(self):
                                      T=self.T,
                                      kappa=self.kappa,
                                      particle=self.particle,
-                                     Vx_drift=self.Vx_drift2,
-                                     Vy_drift=self.Vy_drift2,
-                                     Vz_drift=self.Vz_drift2,
+                                     vx_drift=self.vx_drift2,
+                                     vy_drift=self.vy_drift2,
+                                     vz_drift=self.vz_drift2,
                                      units="units")
         errStr = (f"Distribution function should be {testVal} "
                   f"and not {distFunc}.")