diff --git a/PCSAFT.cpp b/PCSAFT.cpp index fecbc82..18bb135 100644 --- a/PCSAFT.cpp +++ b/PCSAFT.cpp @@ -6,9 +6,9 @@ #include "math.h" #include -const static double k_Boltzmann = 1.3806622169047228e-23; -const static double PI = 3.141592654; -const static double N_AV = 6.022e23; +const static double k_Boltzmann = 1.38064852e-23; +const static double PI = 3.14159265359; +const static double N_AV = 6.022140857e23; /// Coefficients for one fluid struct SAFTCoeffs{ @@ -103,7 +103,7 @@ class PCSAFTMixture{ } /// Convert from molar density to total number density of molecules in mol/Angstroms^3 - double rho_A3 = rhomolar*N_AV/10e30; //[molecules (not moles)/A^3] + double rho_A3 = rhomolar*N_AV/1e30; //[molecules (not moles)/A^3] double summer = 0; for (std::size_t i = 0; i < N; ++i){ @@ -136,7 +136,7 @@ class PCSAFTMixture{ double calc_p(double rhomolar, double T){ /// Convert from molar density to total number density of molecules in mol/Angstroms^3 - double rho_A3 = rhomolar*N_AV/10e30; //[molecules (not moles)/A^3] + double rho_A3 = rhomolar*N_AV/1e30; //[molecules (not moles)/A^3] double p = calc_Z(rhomolar, T)*k_Boltzmann*T*rho_A3*1e30; //[Pa] return p; @@ -249,4 +249,4 @@ int main(){ double B12 = mix.B12(1e-12, 300); std::cout << z0 << " " << B12 << std::endl; } -} \ No newline at end of file +}