def thermCond_norm(z, rho, kT): ''' Traslational thermal conductivity (for hydrogen gas) as in Devoto, "Transport properties of ionized monatomic gases"(1966) (see eq. (17)) ''' ne = iz.elec_dens(rho, z) Q = makeQ(kT, ne) # Total number density of free particles in gas (ne + nH+ + nH), assuming # complete dissociation: n_p = rho / (gau.me + gau.mp) n = np.array([ne, ne, n_p - ne]) m = np.array([gau.me, gau.mp, gau.me + gau.mp]) lprime = lambdaPrime(kT, n, m, Q) D = diffu(kT, rho, n, m, Q) E = Eij(D, m) DT = thermDiffu(kT, n, m, Q) addend = 0 idx = np.arange(len(n)) for ii, jj in it.product(idx, idx): addend += E[ii, jj] * DT[ii] * DT[jj] / (n[ii] * m[ii] * m[jj]) addend *= rho * gau.kB / n.sum() return addend + lprime
def thermCond_h_norm(z, rho, kT, corr=True, B=0.0): ''' Translational thermal conductivity (for H,H+ mixture gas (equilibrium hydrogen, but forgetting the free electrons)) as in Devoto, "Transport properties of ionized monatomic gases"(1966) (see eq. (17)) ''' ne = iz.elec_dens(rho, z) # I cannot keep all the collision integrals, as I have no e- Q = makeQ(kT, ne)[:, :, 1:, 1:] # Total number density of free particles in gas (ne + nH+ + nH), assuming # complete dissociation: n_p = rho / (gau.me + gau.mp) # number densities of gas components (H, H+) n = np.array([ne, n_p - ne]) # masses of gas components (H, H+) m = np.array([gau.mp, gau.me + gau.mp]) lprime = lambdaPrime(kT, n, m, Q) D = diffu(kT, rho, n, m, Q) E = Eij(D, m) DT = thermDiffu(kT, n, m, Q) addend = 0 idx = np.arange(len(n)) for ii, jj in it.product(idx, idx): addend += E[ii, jj] * DT[ii] * DT[jj] / (n[ii] * m[ii] * m[jj]) addend *= rho * gau.kB / n.sum() return addend + lprime
def thermCond_r_norm(z, rho, kT): ''' Reactive thermal conductivity (for hydrogen gas) as in Jesper Janssen's PhD Thesis, pag 97,98. For now I assume complete dissociation (not accurate at low T, around 3000,4000K) ''' T = kT / gau.kB ne = iz.elec_dens(rho, z) Q = makeQ(kT, ne) # Total number density of free particles in gas (ne + nH+ + nH), assuming # complete dissociation: n_p = rho / (gau.me + gau.mp) n = np.array([ne, ne, n_p - ne]) m = np.array([gau.me, gau.mp, gau.me + gau.mp]) # Omega_i,j^(l,s) Om, mu = Q2Om(Q, kT, m, ret_redmass=True) p = n.sum() * kT Dkl = 3 / 16 * (kT**2) / (p * mu * Om[0, 0, :, :]) # Stochiometric coefficients R = np.array([+1, +1, -1]) # I build the A quantity (it's just one real number, instead, if I had considered # also the dissociation reaction, it would have been a 2x2 matrix) A = 0 # Molar fractions x = n / n.sum() for kk in range(0, len(R) - 1): # species are 3, so 3-1=2 (last kk will be 1) for ll in range(kk + 1, len(R)): # Species are 3 (last ll will be 2) A += kT / (Dkl[kk, ll] * p) * x[kk] * x[ll] * (R[kk] / x[kk] - R[ll] / x[ll])**2 # Entalpy difference (in reaction e- + H+ <-> H) per particle, in erg # Original DH = 13.6 * 1.6e-12 # Test, I am not sure it is ok! DH += 5 / 2 * kT # See the reason for this at page 50 of Ema's INFN book (Q3) # print("WARNING: I did a test, I computed DH using ionization energy + 5/2*kB*T") # test, multiply by factor (delete later) # DH = DH * 1.25 lambda_r = 1 / (kT * T) * DH**2 / A return lambda_r
def elRes_norm_2(z, rho, kT): ''' El. resistivity of hydrogen as in paper "Transport coeff...",Devoto(1966), excluding ion current contribution. See eq. (29) ''' ne = iz.elec_dens(rho, z) Q = makeQ(kT, ne) # Total number density of free particles in gas (ne + nH+ + nH), assuming # complete dissociation: n_p = rho / (gau.me + gau.mp) n = np.array([ne, ne, n_p - ne]) m = np.array([gau.me, gau.mp, gau.mp + gau.me]) D = diffu(kT, rho, n, m, Q) Zi = np.array([-1.0, 1.0, 0.0]) sigma = gau.qe**2 * n.sum() / (rho * kT) * np.sum( n[1:] * m[1:] * Zi[1:] * D[0, 1:]) return 1 / sigma
def thermCond_e_norm(z, rho, kT, corr=True, B=0.0): ''' Translational thermal conductivity of electrons, as computed by Devoto in "Simplified expressions for the transport properties of ionized monatomic gases"(1967). See eq. 21. ''' ne = iz.elec_dens(rho, z) Q = makeQ(kT, ne) # Total number density of free particles in gas (ne + nH+ + nH), assuming # complete dissociation: n_p = rho / (gau.me + gau.mp) n = np.array([ne, ne, n_p - ne]) q11 = q_mp_simple(1, 1, n, Q) q12 = q_mp_simple(1, 2, n, Q) q22 = q_mp_simple(2, 2, n, Q) k = 75 * ne**2 * gau.kB / 8 * np.sqrt( 2 * np.pi * kT / gau.me) * (q11 - (q12**2) / q22)**-1 return k
def elRes_norm(z, rho, kT, ne=0): ''' Electrical resistivity of hydrogen as computed by Devoto in "Simplified expressions for the transport properties of ionized monatomic gases"(1967). See eq. 16, and take the 3rd approximation for D11. ''' # This should be fixed later! if ne == 0: ne = iz.elec_dens(rho, z) else: # Just a reminder print("Fix this crap!") n_p = rho / (gau.me + gau.mp) n = np.array([ne, ne, n_p - ne]) Q = makeQ(kT, ne) # Total number density of free particles in gas (ne + nH+ + nH), assuming # complete dissociation: # Ordinary diff coefficient, 3rd approx. D = diffu_ee(kT, rho, n, Q) eta = rho * kT / (gau.qe**2 * ne * n.sum() * gau.me * D) return eta
return Sigma2OmegaStar * np.pi # <codecell> # For testing purposes if __name__ == "__main__": # rho = 3.16116e-7 kT = 20000 * gau.kB rho = 3.16116e-7 # rho = 3.28e-5 # kT = 24000*gau.kB z = iz.ionizationSaha(rho, kT) prs = (1 + z) * rho / (gau.mp + gau.me) * kT ne = iz.elec_dens(rho, z) n_i = np.array([ne, ne, rho / (gau.mp + gau.me) - ne]) m_i = np.array([gau.me, gau.mp, gau.mp + gau.me]) Q = makeQ(kT, ne) # q00_h = q_mp_complete(0, 0, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q01_h = q_mp_complete(0, 1, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q10_h = q_mp_complete(1, 0, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q11_h = q_mp_complete(1, 1, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q12_h = q_mp_complete(1, 2, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q21_h = q_mp_complete(2, 1, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q22_h = q_mp_complete(2, 2, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q20_h = q_mp_complete(2, 0, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q02_h = q_mp_complete(0, 2, n_i[1:], m_i[1:], Qh[:,:,1:,1:]) # q00 = q_mp_simple(0, 0, n_i, Q)