Skip to content

Commit

Permalink
Allow the COSMO-SAC constants to be specified in the JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhbell committed Oct 29, 2024
1 parent 6c06ebb commit 894c304
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/teqp/models/activity/activity_models.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,16 @@ inline ResidualHelmholtzOverRTVariant ares_model_factory(const nlohmann::json& a
prof.ot = get_(el.at("ot"));
profiles.push_back(prof);
}
return COSMOSAC::COSMO3(A_COSMOSAC_A2, V_COSMOSAC_A3, profiles);
COSMOSAC::COSMO3Constants constants;
if (armodel.contains("constants")){
const auto &jconstants = armodel.at("constants");
constants.A_ES = jconstants.value("A_ES / kcal A^4 /(mol e^2)", constants.A_ES);
constants.B_ES = jconstants.value("B_ES / kcal A^4 K^2/(mol e^2)", constants.B_ES);
constants.fast_Gamma = jconstants.value("fast_Gamma", constants.fast_Gamma);
}
std::cout << constants.A_ES << std::endl;
std::cout << constants.B_ES << std::endl;
return COSMOSAC::COSMO3(A_COSMOSAC_A2, V_COSMOSAC_A3, profiles, constants);
}
else{
throw teqp::InvalidArgument("bad type of ares model: " + type);
Expand Down

0 comments on commit 894c304

Please sign in to comment.