mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Modification to use REACTION_PRESSURE for a
fixed-pressure gas phase. Fixed Basic function GAS_VM for a fixed-pressure gas phase. git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8532 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
e284f1167e
commit
38bfd3328b
@ -922,9 +922,13 @@ find_gas_vm(void)
|
||||
return (0);
|
||||
if (gas_unknown->moles < 1e-12)
|
||||
return (0);
|
||||
gas_phase_ptr->Set_total_moles(gas_unknown->moles);
|
||||
gas_phase_ptr->Set_volume(gas_phase_ptr->Get_total_moles() * R_LITER_ATM * tk_x /
|
||||
gas_phase_ptr->Get_total_p());
|
||||
if (gas_phase_ptr->Get_v_m() >= 0.01)
|
||||
gas_phase_ptr->Set_volume(gas_phase_ptr->Get_v_m() * gas_unknown->moles);
|
||||
}
|
||||
// also for non-PR gas phases...
|
||||
return (gas_phase_ptr->Get_volume() / gas_phase_ptr->Get_total_moles());
|
||||
return gas_phase_ptr->Get_volume() / gas_phase_ptr->Get_total_moles();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -3593,9 +3597,6 @@ void Phreeqc::
|
||||
basic_free(void)
|
||||
{
|
||||
delete this->basic_interpreter;
|
||||
|
||||
// Reset pointer to make sure we cannot attempt to free it twice (which obviously will result in a crash)
|
||||
this->basic_interpreter = 0;
|
||||
}
|
||||
|
||||
double Phreeqc::
|
||||
|
||||
7
step.cpp
7
step.cpp
@ -1211,6 +1211,13 @@ gas_phase_check(cxxGasPhase *gas_phase_ptr)
|
||||
|
||||
if (gas_phase_ptr == NULL)
|
||||
return (OK);
|
||||
// set gas pressure to reaction_pressure...
|
||||
if (use.Get_pressure_ptr() != NULL && gas_phase_ptr->Get_type() == cxxGasPhase::GP_PRESSURE)
|
||||
{
|
||||
gas_phase_ptr->Set_total_p(patm_x);
|
||||
k_temp(tc_x, patm_x);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that all elements are in solution for phases with zero mass
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user