Compute translational contributions to thermodynamic properties.
Uses ideal gas partition function (Sackur-Tetrode equation for entropy). E_trans = 3/2 * R * T S_trans = R * [5/2 + ln((2pimkT/h^2)^(3/2) * k*T/P)] Cv_trans = 3/2 * R
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | total_mass |
Total mass in amu |
||
| real(kind=dp), | intent(in) | :: | temperature |
Temperature in K |
||
| real(kind=dp), | intent(in) | :: | pressure |
Pressure in atm |
||
| real(kind=dp), | intent(out) | :: | E |
Thermal energy in Hartree |
||
| real(kind=dp), | intent(out) | :: | S |
Entropy in cal/(mol*K) |
||
| real(kind=dp), | intent(out) | :: | Cv |
Heat capacity in cal/(mol*K) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | private | :: | P_pa | ||||
| real(kind=dp), | private | :: | T | ||||
| real(kind=dp), | private | :: | V_molar | ||||
| real(kind=dp), | private | :: | lambda_cubed | ||||
| real(kind=dp), | private | :: | mass_kg | ||||
| real(kind=dp), | private | :: | qt |
pure subroutine compute_translational_thermo(total_mass, temperature, pressure, E, S, Cv) !! Compute translational contributions to thermodynamic properties. !! !! Uses ideal gas partition function (Sackur-Tetrode equation for entropy). !! E_trans = 3/2 * R * T !! S_trans = R * [5/2 + ln((2*pi*m*k*T/h^2)^(3/2) * k*T/P)] !! Cv_trans = 3/2 * R real(dp), intent(in) :: total_mass !! Total mass in amu real(dp), intent(in) :: temperature !! Temperature in K real(dp), intent(in) :: pressure !! Pressure in atm real(dp), intent(out) :: E !! Thermal energy in Hartree real(dp), intent(out) :: S !! Entropy in cal/(mol*K) real(dp), intent(out) :: Cv !! Heat capacity in cal/(mol*K) real(dp) :: mass_kg, T, P_pa real(dp) :: lambda_cubed, V_molar, qt ! Convert inputs to SI mass_kg = total_mass*AMU_TO_KG T = temperature P_pa = pressure*ATM_TO_PA ! Thermal de Broglie wavelength cubed: lambda^3 = (h^2 / (2*pi*m*k*T))^(3/2) lambda_cubed = (H_SI*H_SI/(2.0_dp*PI*mass_kg*KB_SI*T))**1.5_dp ! Molar volume at given T and P (ideal gas): V = R*T/P = k*T/P per molecule V_molar = KB_SI*T/P_pa ! m^3 per molecule ! Translational partition function per molecule qt = V_molar/lambda_cubed ! Thermal energy: E = 3/2 * R * T E = 1.5_dp*R_HARTREE*temperature ! Entropy (Sackur-Tetrode): S = R * [5/2 + ln(qt)] S = R_CALMOLK*(2.5_dp + log(qt)) ! Heat capacity: Cv = 3/2 * R Cv = 1.5_dp*R_CALMOLK end subroutine compute_translational_thermo