Skip to content

Commit

Permalink
Don't validate CPA and silence the Ar20 output
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhbell committed Mar 3, 2024
1 parent 7fb05cf commit d219378
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/tests/catch_test_association.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ TEST_CASE("Ethanol + water with CPA", "[association]"){
};
nlohmann::json j = {
{"kind", "CPA"},
{"validate", false},
{"model", jCPA}
};
auto model = teqp::cppinterface::make_model(j, false);
Expand Down
4 changes: 2 additions & 2 deletions src/tests/catch_test_multifluid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,14 @@ TEST_CASE("Ar20 for CO2", "[Ar20CO2]"){
auto f = [&rho, &z, &model](const auto Trecip){ return model.alphar(1.0/Trecip, rho, z); };

std::cout << std::setprecision(20);
std::cout << "T / K,rho / mol/m^3,multiprecision,autodiff,err2MP" << std::endl;
// std::cout << "T / K,rho / mol/m^3,multiprecision,autodiff,err2MP" << std::endl;
for (double T = 304.2; T < 340; T += 0.05){
my_float Trecip = 1.0/T;
my_float h = 1e-20;
auto mp = -teqp::centered_diff<2,6>(f, Trecip, h)*Trecip*Trecip; // cvr/R

using tdx = TDXDerivatives<decltype(model), double>;
auto ad = -tdx::get_Ar20(model, T, rho, z);
std::cout << T << "," << rho << "," << mp << "," << ad << "," << mp/ad-1 << std::endl;
// std::cout << T << "," << rho << "," << mp << "," << ad << "," << mp/ad-1 << std::endl;
}
}

0 comments on commit d219378

Please sign in to comment.