thermotools / KineticGas

Implementation of the Revised Enskog Theory for Mie fluids (RET-Mie) for computation of diffusion coefficients, thermal diffusion coefficients, viscosity and thermal conductivity
MIT License
3 stars 2 forks source link

Init with params #27

Closed vegardjervell closed 1 month ago

vegardjervell commented 1 month ago

Init now ensures that the equation of state uses the same parameters as the RET model (if applicable). This means that the models

kin1 = MieKinGas('AR', mole_weights=[m * Avogadro * 1e3, m * Avogadro * 1e3], sigma=[sigma, sigma], eps_div_k=[eps_div_k, eps_div_k], la=[6, 6], lr=[lr, lr])
kin2 = MieKinGas('AR,KR', mole_weights=[m * Avogadro * 1e3, m * Avogadro * 1e3],
                 sigma=[sigma, sigma], eps_div_k=[eps_div_k, eps_div_k], la=[6, 6], lr=[lr, lr])

will give identical output, as expected.

Made some modifications to get_Eij, which ensures that the output is the same for a single component mixture, and a binary mixture of identical components, also if x != [0.5, 0.5], which is the expected behaviour. Previously, pure fluid calculation in get_Eij used a hardcoded value of x=[0.5, 0.5], which could lead to confusing output when testing the method.