transport.cpp, ifdefd old viscosity, initialized variables; basicsubs call viscosity();phreeqc, revert ineq_tol

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/branches/concrete@10569 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2015-12-14 20:35:26 +00:00
parent c15e56ad5b
commit 301d2d009c
3 changed files with 25 additions and 5 deletions

View File

@ -715,9 +715,9 @@ void Phreeqc::init(void)
/* from float.h, sets tolerance for cl1 routine */
ineq_tol = pow((long double) 10, (long double) -LDBL_DIG);
#else
//ineq_tol = pow((double) 10, (double) -DBL_DIG);
ineq_tol = pow((double) 10, (double) -DBL_DIG);
// appt:
ineq_tol = pow((double) 10, (double) -DBL_DIG + 2);
//ineq_tol = pow((double) 10, (double) -DBL_DIG + 2);
#endif
convergence_tolerance = 1e-8;
step_size = 100.;
@ -2529,4 +2529,4 @@ int Phreeqc::next_user_number(Keywords::KEYWORDS key)
assert(false);
return -999;
}
}
}

View File

@ -218,7 +218,6 @@ calc_SC(void)
SC_T = SC_298 * (viscos_298 / viscos_T)
*/
SC *= viscos_0_25 / viscos;
return (SC);
# endif
for (i = 0; i < count_s_x; i++)
@ -249,6 +248,7 @@ calc_SC(void)
Dw_T = Dw_298 * (T / 298) * (viscos_298 / viscos_T) give:
SC_T = SC_298 * (viscos_298 / viscos_T)
*/
viscosity();
SC *= viscos_0_25 / viscos;
return (SC);

View File

@ -896,7 +896,7 @@ int Phreeqc::
init_mix(void)
/* ---------------------------------------------------------------------- */
{
LDBLE dav, lav, mixf, mf12, maxmix, corr_disp, diffc_here, mD, dx = 0;
LDBLE dav, lav, mixf, mf12, maxmix, corr_disp, diffc_here, mD; //, dx = 0;
int i, l_nmix;
//std::vector<LDBLE> m, m1;
@ -1792,6 +1792,7 @@ multi_D(LDBLE DDt, int mobile_cell, int stagnant)
char token[MAX_LENGTH];
LDBLE mixf, temp;
first_c = last_c = -1;
current_x = sum_R = 0.0;
if (dV_dcell)
find_current = loop_f_c = 1; // calculate J_ij once for all cells, find smallest j_x, next with this j_x.
@ -2141,6 +2142,13 @@ find_J(int icell, int jcell, LDBLE mixf, LDBLE DDt, int stagnant)
cxxSurfaceCharge *s_charge_ptr, *s_charge_ptr1, *s_charge_ptr2;
char token[MAX_LENGTH], token1[MAX_LENGTH];
k_il = 0;
A_ij_il = mixf_il = 0.0;
Dz2c_il = 0.0;
cec1 = cec2 = cec12 = rc1 = rc2 = 0.0;
V_M_il = NULL;
dV = 0.0;
/* check for immediate return and interlayer diffusion calcs... */
if (interlayer_Dflag)
{
@ -4335,6 +4343,18 @@ viscosity(void)
mu1 = exp(Rb * S1);
viscos_0 = viscos = mu0 * mu1 / 1e3;
viscos_0_25 = 0.8900239182946;
//#define OLD_VISCOSITY
#ifdef OLD_VISCOSITY
viscos =
pow((LDBLE) 10.,
-(1.37023 * (tc_x - 20) +
0.000836 * (tc_x - 20) * (tc_x - 20)) / (109 + tc_x));
/* Huber et al., 2009, J. Phys. Chem. Ref. Data, Vol. 38, 101-125 */
viscos_0 = viscos;
viscos_0_25 = 0.88862;
#endif
return viscos;
}
/* ---------------------------------------------------------------------- */