# Path: proptools/constants.py



import numpy as np
from scipy.optimize import minimize
from proptools.constants import charge, amu_kg, g
"""Generic electric propulsion design equations."""
from __future__ import division


def thrust(I_b, V_b, m_ion):
    """Thrust of an electric thruster.

    Compute the ideal thrust of an electric thruster from the beam current and voltage,
    assuming singly charged ions and no beam divergence.

    Reference: Goebel and Katz, equation 2.3-8.

    Arguments:
        I_b (scalar): Beam current [units: ampere].
        V_b (scalar): Beam voltage [units: volt].
        m_ion (scalar): Ion mass [units: kilogram].

    Returns:
        scalar: Thrust force [units: newton].
    """

# Path: proptools/constants.py



# Path: proptools/electric/generic.py
import numpy as np
from scipy.optimize import minimize
from proptools.constants import charge, amu_kg, g

"""Generic electric propulsion design equations."""
from __future__ import division


def thrust(I_b, V_b, m_ion):
    """Thrust of an electric thruster.

    Compute the ideal thrust of an electric thruster from the beam current and voltage,
    assuming singly charged ions and no beam divergence.

    Reference: Goebel and Katz, equation 2.3-8.

    Arguments:
        I_b (scalar): Beam current [units: ampere].
        V_b (scalar): Beam voltage [units: volt].
        m_ion (scalar): Ion mass [units: kilogram].

    Returns:
        scalar: Thrust force [units: newton].
    """

    return (2 * (m_ion / charge) * V_b)**0.5 * I_b