def get_lawson_parameters(ni, Ti, settings, reaction='D_T_to_n_alpha'):
    """
    Lawson minimal confinement time [s], and maximal flux [s^-1] from each end assuming some fusion volume.
    T in [keV], ni in [m^-3].
    """
    sigma_v_fusion = get_sigma_v_fusion(Ti, reaction=reaction)
    MeV_to_J = define_electron_charge() * 1e6
    E_charged = get_E_charged(reaction=reaction) * MeV_to_J  # J
    kB_keV = define_electron_charge() * 1e3
    n_tau_lawson = 12 * kB_keV * Ti / (E_charged * sigma_v_fusion)
    tau_lawson = n_tau_lawson / ni
    flux_lawson = 0.5 / n_tau_lawson * settings['volume_main_cell'] * ni**2
    return tau_lawson, flux_lawson
def get_sigma_v_fusion_approx(T, reaction='D_T_to_n_alpha', n=None):
    """
    Approximation of <sigma*v> (Maxwell averaged reactivity), applicable for non-resonant reactions.
    Source:"2011 - Adelberger et al - Solar fusion cross sections. II. The pp chain and CNO cycles", eq. 8.
    T in [keV], n is number density in [cm^3], reactivity sigma*v in [m^3/s].
    """
    if reaction == 'D_D_to_p_T_n_He3':
        reactions = ['D_D_to_p_T', 'D_D_to_n_He3']
        branching_ratios = [0.5, 0.5]
        return sum([
            branching_ratio *
            get_sigma_v_fusion_approx(T, reaction=reaction_branch, n=n)
            for reaction_branch, branching_ratio in zip(
                reactions, branching_ratios)
        ])
    else:

        # constants
        A_1, A_2 = get_As_for_reaction(reaction=reaction)
        Z_1, Z_2 = get_Zs_for_reaction(reaction=reaction)
        m_p = define_proton_mass()  # kg
        m_r = m_p * A_1 * A_2 / (A_1 + A_2)  # reduced mass
        alpha = define_fine_structure_constant()
        e = define_electron_charge()
        c = define_speed_of_light()  # m/s
        c_cm = c * 1e2
        m_r_keV_over_c2 = m_r * c**2 / e / 1e3
        m_r_keV_cm = m_r_keV_over_c2 / c_cm**2

        # effective S factor
        E0 = T * (np.pi * alpha * Z_1 * Z_2 /
                  np.sqrt(2))**(2 / 3) * (m_r_keV_over_c2 / T)**(1 / 3)  # keV
        delta_E0 = T * 4 * np.sqrt(E0 / (3 * T))  # keV
        S0, S0_der, S0_der2 = get_astrophysical_S_factor(reaction=reaction)
        S_eff = S0 * (1 + 5 * T / (36 * E0)) + S0_der * E0 * (1 + 35 * T / (36 * E0)) \
                + 0.5 * S0_der2 * E0 ** 2 * (1 + 89 * T / (36 * E0))  # [keV * barn]
        barn = define_barn()
        barn_cm = barn * 1e4
        S_eff_cm2 = S_eff * barn_cm

        # electron screening factor
        if n is None:
            f0 = 1  # assume no electron screening
        else:
            zeta = ((0.5 * Z_1**2 / A_1 + 0.5 * Z_2**2 / A_2) + 0.92 *
                    (0.5 * Z_1 / A_1 + 0.5 * Z_2 / A_2))**0.5
            rho_kg_over_cm3 = n * m_r  # specific density [kg/cm^3] since n in [cm^3]
            rho0 = rho_kg_over_cm3 * 1e3  # [g/cm^3]
            T_eV = T * 1e3
            T_K = T_eV * define_factor_eV_to_K()
            T_6 = T_K / 1e6  # in 10^6 Kelvin
            f0 = np.exp(0.188 * Z_1 * Z_2 * zeta * rho0**0.5 * T_6**(-3 / 2))

        sigma_v_cm3_over_s = np.sqrt(
            2 / (m_r_keV_cm * T)) * delta_E0 / T * f0 * S_eff_cm2 * np.exp(
                -3 * E0 / T)
        sigma_v_m3_over_s = 1e-6 * sigma_v_cm3_over_s
        return sigma_v_m3_over_s
def get_gamow_energy(reaction='D_T_to_n_alpha'):
    """
    Return Gamow energy (tunneling barrier) in [keV].
    Source: "Atzeni, Meyer-ter-Vehn - The Physics of Inertial Fusion", chapter 1.
    """
    # alpha_fine = 1 / 137.035999084 # fine structure constant
    A_1, A_2 = get_As_for_reaction(reaction=reaction)
    Z_1, Z_2 = get_Zs_for_reaction(reaction=reaction)
    A_r = A_1 * A_2 / (A_1 + A_2)  # reduced A
    # E_g = 986.1 * (Z_1 * Z_2) ** 2 * A_r # shortened form

    m_p = define_proton_mass()  # kg
    m_r = m_p * A_1 * A_2 / (A_1 + A_2)  # reduced mass
    alpha = define_fine_structure_constant()
    e = define_electron_charge()
    c = define_speed_of_light()  # m/s
    m_r_keV = m_r * c**2 / e / 1e3
    E_g = (np.pi * alpha * Z_1 * Z_2)**2 * 2 * m_r_keV

    return E_g
def get_fusion_sigma_v_E_reaction(T, reaction='D_T_to_n_alpha'):
    """
    Multiply sigma*v by the reaction energy and return in [J].
    T in [keV].
    """
    if reaction == 'D_D_to_p_T_n_He3':
        reactions = ['D_D_to_p_T', 'D_D_to_n_He3']
        branching_ratios = [0.5, 0.5]
        return sum([
            branching_ratio * get_sigma_v_fusion(T, reaction=reaction_branch) *
            get_E_reaction(reaction=reaction_branch)
            for reaction_branch, branching_ratio in zip(
                reactions, branching_ratios)
        ])

    else:
        sigma_v_E = get_sigma_v_fusion(
            T, reaction=reaction) * get_E_reaction(reaction=reaction)
    e = define_electron_charge()
    return sigma_v_E * 1e6 * e  # MeV to J
Beispiel #5
0
def get_specific_coulomb_scattering_rate(ne,
                                         Te,
                                         ni,
                                         Ti,
                                         settings,
                                         impact_specie='e',
                                         target_specie='i'):
    """
    Coulomb scattering rate based on the general formula of
    "2007 - Fundamenski et al - Comparison of Coulomb Collision Rates in the
    Plasma Physics and Magnetically Confined Fusion Literature"
    densities in m^-3 and temperatures in eV
    """
    eps0 = define_vacuum_permittivity()
    e = define_electron_charge()
    coulomb_log_dict = calculate_coulomb_logarithm(
        ne,
        Te,
        ni,
        Ti,
        Z=settings['Z_ion'],
        A=settings['A_atomic_weight'],
        coulomb_log_min=settings['coulomb_log_min'])

    if impact_specie == 'e':
        m_s1 = settings['me']
        Z_s1 = 1
        T_s1 = Te
    else:
        m_s1 = settings['mi']
        Z_s1 = settings['Z_ion']
        T_s1 = Ti

    if target_specie == 'e':
        m_s2 = settings['me']
        Z_s2 = 1
        T_s2 = Te
        n_s2 = ne
    else:
        m_s2 = settings['mi']
        Z_s2 = settings['Z_ion']
        T_s2 = Ti
        n_s2 = ni

    if impact_specie == 'e' and target_specie == 'e':
        coulomb_log = coulomb_log_dict['ee']
    elif impact_specie == 'i' and target_specie == 'i':
        coulomb_log = coulomb_log_dict['ii']
    elif (impact_specie == 'e'
          and target_specie == 'i') or (impact_specie == 'i'
                                        and target_specie == 'e'):
        # as a shortcut, check only the first cell temperatures to pick the correct temperature regine
        Ti_0 = settings['Ti_0']
        Te_0 = settings['Te_0']
        if Ti_0 / Te_0 > settings['mi'] / settings['me']:
            coulomb_log = coulomb_log_dict['ie_overheated_ions']
        else:
            if Te_0 > 10 * settings['Z_ion']**2.0:
                coulomb_log = coulomb_log_dict['ie_hot_electrons']
            else:
                coulomb_log = coulomb_log_dict['ie_cold_electrons']

    else:
        raise ValueError('invalid option for impact/target species.')
    scat_rate = 2 ** 0.5 / (12 * np.pi ** 1.5) * n_s2 * Z_s1 ** 2 * Z_s2 ** 2 * e ** 4 * coulomb_log / \
                (eps0 ** 2 * m_s1 ** 0.5 * (e * T_s1) ** 1.5) \
                * (1 + m_s1 / m_s2) / (1 + m_s1 / m_s2 * T_s1 / T_s2) ** 1.5
    return scat_rate