Exemple #1
0
Fichier : rh.py Projet : fimay/hedp
    def solve_h(T_eV, rho_2,  u_s, Z, Abar, gamma=gamma, eos_tab=eos_tab):
        from hedp.eos.ionization import thomas_fermi_ionization
        T_eV = max(T_eV, TEMP_MIN)
        rho_2 = max(rho_2, RHO_MIN)
        Zbar = thomas_fermi_ionization(np.array([rho_2]), np.array([T_eV]), Z, Abar)
        if eos_tab is not None:
            gamma = 1 + eos_tab.q['Gamma', 't'](np.array([rho_2]), np.array([T_eV*eV2K])) 

        err =   T_eV  \
                 - Abar*m_p/(1 + Zbar)*(u_s*1e3)**2*\
                2*(gamma - 1)/((gamma  + 1)**2*(k_b*eV2K))
        return err
Exemple #2
0
    def solve_h(T_eV, rho_2, u_s, Z, Abar, gamma=gamma, eos_tab=eos_tab):
        from hedp.eos.ionization import thomas_fermi_ionization
        T_eV = max(T_eV, TEMP_MIN)
        rho_2 = max(rho_2, RHO_MIN)
        Zbar = thomas_fermi_ionization(np.array([rho_2]), np.array([T_eV]), Z,
                                       Abar)
        if eos_tab is not None:
            gamma = 1 + eos_tab.q['Gamma', 't'](np.array([rho_2]),
                                                np.array([T_eV * eV2K]))

        err =   T_eV  \
                 - Abar*m_p/(1 + Zbar)*(u_s*1e3)**2*\
                2*(gamma - 1)/((gamma  + 1)**2*(k_b*eV2K))
        return err
Exemple #3
0
def test_ei_collision_rate():
    """
    Check nu_ei Spitzer
    """
    from hedp.eos.ionization import thomas_fermi_ionization
    from hedp.plasma_physics import collision_rate

    dens = 2.7 
    temp = 1.0e3
    Z = 13.
    Abar = 26.98

    Zbar = thomas_fermi_ionization(dens, temp, Z, Abar)

    nu_ei = collision_rate(dens, temp, Abar, Zbar, kind='ei', source='Atzeni2004')
    nu_ei_ref = [2e15] # value taken from 
    # "Coupling of detailed configuration kinetics and hydrodynamics in materials submitted
    # to x-ray free-electron-laser irradiation" Peyrusse 2012, Fig 1.
    assert_allclose(nu_ei, nu_ei_ref)
Exemple #4
0
def test_ei_collision_rate():
    """
    Check nu_ei Spitzer
    """
    from hedp.eos.ionization import thomas_fermi_ionization
    from hedp.plasma_physics import collision_rate

    dens = 2.7
    temp = 1.0e3
    Z = 13.
    Abar = 26.98

    Zbar = thomas_fermi_ionization(dens, temp, Z, Abar)

    nu_ei = collision_rate(dens,
                           temp,
                           Abar,
                           Zbar,
                           kind='ei',
                           source='Atzeni2004')
    nu_ei_ref = [2e15]  # value taken from
    # "Coupling of detailed configuration kinetics and hydrodynamics in materials submitted
    # to x-ray free-electron-laser irradiation" Peyrusse 2012, Fig 1.
    assert_allclose(nu_ei, nu_ei_ref)