From 666e4b813e661c25f2999236819b76d3c5a04563 Mon Sep 17 00:00:00 2001 From: David Parkhurst Date: Mon, 15 Apr 2024 18:21:29 -0600 Subject: [PATCH] Issue 160 in phreeqc. llnl minimum temperature problem. There are several places where a SOLUTION is constructed to get lists or test the database. By default the SOLUTION is 25C, so if llnl has a minimum temperature greater (or maximum temperature less) than 25, an error is encountered. The fix is to change the temperature of the SOLUTIONs to the minimum temperature of the llnl grid if llnl is being used. --- IPhreeqc.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/IPhreeqc.cpp b/IPhreeqc.cpp index 11f57a0a..c71c42ac 100644 --- a/IPhreeqc.cpp +++ b/IPhreeqc.cpp @@ -1056,8 +1056,13 @@ int IPhreeqc::test_db(void) { std::ostringstream oss; int sn = this->PhreeqcPtr->next_user_number(Keywords::KEY_SOLUTION); - oss << "SOLUTION " << sn <<"; DELETE; -solution " << sn; - + //oss << "SOLUTION " << sn <<"; DELETE; -solution " << sn; + oss << "SOLUTION " << sn << ";"; + if (this->PhreeqcPtr->llnl_temp.size() > 0) + { + oss << "-temp " << this->PhreeqcPtr->llnl_temp[0] << ";"; + } + oss << "DELETE; -solution " << sn; this->PhreeqcPtr->set_reading_database(TRUE); int n = this->RunString(oss.str().c_str()); this->PhreeqcPtr->set_reading_database(FALSE);