mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Hack for bug with pressure, caused ternary to have low pressure result.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9994 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
e7915af7ac
commit
2fcfd8e79f
11
gases.cpp
11
gases.cpp
@ -455,7 +455,16 @@ calc_PR(void)
|
||||
if (gas_phase_ptr->Get_type() == cxxGasPhase::GP_VOLUME)
|
||||
{
|
||||
V_m = gas_phase_ptr->Get_volume() / m_sum;
|
||||
P = R_TK / (V_m - b_sum) - a_aa_sum / (V_m * (V_m + 2 * b_sum) - b2);
|
||||
P = 0.0;
|
||||
while (P <= 0)
|
||||
{
|
||||
P = R_TK / (V_m - b_sum) - a_aa_sum / (V_m * (V_m + 2 * b_sum) - b2);
|
||||
if (P <= 0.0)
|
||||
{
|
||||
V_m *= 2.0;
|
||||
//a_aa_sum /= 2.0;
|
||||
}
|
||||
}
|
||||
if (iterations > 0 && P < 150 && V_m < 1.01)
|
||||
{
|
||||
// check for 3-roots...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user