Fixed gas_phase problem. total_p was reset for fixed pressure in a couple of places (prep and tidy).

Added test case ch4-valid and added to Makefile.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7643 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2013-04-24 19:13:03 +00:00
parent 4cb5d32f0d
commit ce037cb208
2 changed files with 8 additions and 2 deletions

View File

@ -4230,7 +4230,10 @@ calc_PR(std::vector<struct phase *> phase_ptrs, LDBLE P, LDBLE TK, LDBLE V_m)
}
if (gas_phase_ptr && iterations > 2)
{
gas_phase_ptr->Set_total_p(P);
if (gas_phase_ptr->Get_type() == cxxGasPhase::GP_VOLUME)
{
gas_phase_ptr->Set_total_p(P);
}
gas_phase_ptr->Set_v_m(V_m);
return (OK);
}

View File

@ -1005,7 +1005,10 @@ tidy_gas_phase(void)
}
V_m = calc_PR(phase_ptrs, P, gas_phase_ptr->Get_temperature(), 0);
gas_phase_ptr->Set_v_m(V_m);
gas_phase_ptr->Set_total_p(P);
if (gas_phase_ptr->Get_type() == cxxGasPhase::GP_VOLUME)
{
gas_phase_ptr->Set_total_p(P);
}
std::vector<cxxGasComp> gc = gas_phase_ptr->Get_gas_comps();
for (size_t j = 0; j < gas_phase_ptr->Get_gas_comps().size(); j++)
{