Skip to content

Commit

Permalink
Merge pull request #80 from dlparkhurst/mix_error
Browse files Browse the repository at this point in the history
Mix error
  • Loading branch information
scharlton2 authored Oct 10, 2024
2 parents c129c83 + 0eb9a84 commit 9ef9915
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 16 deletions.
2 changes: 1 addition & 1 deletion database/pitzer.dat
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ PITZER
Mg+2 Na+ 0.07
Na+ Sr+2 0.051
OH- SO4-2 -0.013
-LAMDA
-LAMBDA
B(OH)3 Cl- 0.091
B(OH)3 K+ -0.14
B(OH)3 Na+ -0.097
Expand Down
20 changes: 20 additions & 0 deletions doc/RELEASE.TXT
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
Version @PHREEQC_VER@: @PHREEQC_DATE@

-----------------
October 8, 2024
-----------------
PHREEQC: Improved algorithem for transport of heat in TRANSPORT, and included
additional viscosity effects in transport calculations.

-----------------
October 8, 2024
-----------------
PHREEQC: Corrected spelling errors thoughout PHREEQC as supplied by Mike Toews.
Modified "lamda" to "lambda" internally as suggested by Toews, but "lamda" and
"lambda" are both acceptable in Ptzer database files for backward compatibility.

-----------------
October 8, 2024
-----------------
PHREEQC: Fixed bug in MIX that produced erroneous temperature and pressure
if the solutions being mixed did not have 1 kg of water.

Version 3.8.2: August 29, 2024
-----------------
August 27, 2024
-----------------
Expand Down
2 changes: 1 addition & 1 deletion mytest/pitzer-04.dat
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ PITZER
CO3-2 HCO3- -0.04
B3O3(OH)4- HCO3- -0.10
B4O5(OH)4-2 HCO3- -0.087
-LAMDA
-LAMBDA
Na+ CO2 0.1
K+ CO2 0.051
Mg+2 CO2 0.183
Expand Down
4 changes: 2 additions & 2 deletions src/global_structures.h
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ class M_S
};
// Pitzer definitions
typedef enum
{ TYPE_B0, TYPE_B1, TYPE_B2, TYPE_C0, TYPE_THETA, TYPE_LAMDA, TYPE_ZETA,
{ TYPE_B0, TYPE_B1, TYPE_B2, TYPE_C0, TYPE_THETA, TYPE_LAMBDA, TYPE_ZETA,
TYPE_PSI, TYPE_ETHETA, TYPE_ALPHAS, TYPE_MU, TYPE_ETA, TYPE_Other,
TYPE_SIT_EPSILON, TYPE_SIT_EPSILON_MU, TYPE_APHI
} pitz_param_type;
Expand Down Expand Up @@ -1613,7 +1613,7 @@ class pitz_param
LDBLE b2;
LDBLE c0;
LDBLE theta;
LDBLE lamda;
LDBLE lambda;
LDBLE zeta;
LDBLE psi;
LDBLE alphas;
Expand Down
24 changes: 12 additions & 12 deletions src/pitzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pitzer_tidy(void)
break;
case TYPE_B2:
case TYPE_THETA:
case TYPE_LAMDA:
case TYPE_LAMBDA:
case TYPE_ZETA:
case TYPE_PSI:
case TYPE_ETHETA:
Expand Down Expand Up @@ -464,14 +464,14 @@ pitzer_tidy(void)
}
*/
/*
* Tidy TYPE_LAMDA
* Tidy TYPE_LAMBDA
*/

/* Coef for Osmotic coefficient for TYPE_LAMDA */
/* Coef for Osmotic coefficient for TYPE_LAMBDA */

for (i = 0; i < (int)pitz_params.size(); i++)
{
if (pitz_params[i]->type == TYPE_LAMDA)
if (pitz_params[i]->type == TYPE_LAMBDA)
{
i0 = pitz_params[i]->ispec[0];
i1 = pitz_params[i]->ispec[1];
Expand All @@ -492,11 +492,11 @@ pitzer_tidy(void)
}
}
}
/* Debug TYPE_LAMDA coefficients */
/* Debug TYPE_LAMBDA coefficients */
/*
for (i = 0; i < (int)pitz_params.size(); i++)
{
if (pitz_params[i]->type == TYPE_LAMDA)
if (pitz_params[i]->type == TYPE_LAMBDA)
{
fprintf(stderr, "%s\t%s\n", pitz_params[i]->species[0], pitz_params[i]->species[1]);
fprintf(stderr, "%f\t%f\n", pitz_params[i]->ln_coef[0], pitz_params[i]->ln_coef[1]);
Expand Down Expand Up @@ -672,7 +672,7 @@ read_pitzer(void)
break;
case 5: /* lamda */
case 18: /* lambda */
pzp_type = TYPE_LAMDA;
pzp_type = TYPE_LAMBDA;
n = 2;
opt_save = OPTION_DEFAULT;
break;
Expand Down Expand Up @@ -820,8 +820,8 @@ calc_pitz_param(class pitz_param *pz_ptr, LDBLE TK, LDBLE TR)
case TYPE_THETA:
pz_ptr->U.theta = param;
break;
case TYPE_LAMDA:
pz_ptr->U.lamda = param;
case TYPE_LAMBDA:
pz_ptr->U.lambda = param;
break;
case TYPE_ZETA:
pz_ptr->U.zeta = param;
Expand Down Expand Up @@ -1062,7 +1062,7 @@ pitzer(void)
LGAMMA[i2] += M[i0] * M[i1] * param;
OSMOT += M[i0] * M[i1] * M[i2] * param;
break;
case TYPE_LAMDA:
case TYPE_LAMBDA:
LGAMMA[i0] += M[i1] * param * pitz_params[i]->ln_coef[0];
LGAMMA[i1] += M[i0] * param * pitz_params[i]->ln_coef[1];
OSMOT += M[i0] * M[i1] * param * pitz_params[i]->os_coef;
Expand Down Expand Up @@ -1380,7 +1380,7 @@ pitzer(void)
LGAMMA[i2] += M[i0] * M[i1] * param;
OSMOT += M[i0] * M[i1] * M[i2] * param;
break;
case TYPE_LAMDA:
case TYPE_LAMBDA:
LGAMMA[i0] += M[i1] * param * pitz_params[i]->ln_coef[0];
LGAMMA[i1] += M[i0] * param * pitz_params[i]->ln_coef[1];
OSMOT += M[i0] * M[i1] * param * pitz_params[i]->os_coef;
Expand Down Expand Up @@ -2688,7 +2688,7 @@ pitzer_make_lists(void)
for (int i = 0; i < (int)pitz_params.size(); i++)
{
/*
TYPE_B0, TYPE_B1, TYPE_B2, TYPE_C0, TYPE_THETA, TYPE_LAMDA, TYPE_ZETA,
TYPE_B0, TYPE_B1, TYPE_B2, TYPE_C0, TYPE_THETA, TYPE_LAMBDA, TYPE_ZETA,
TYPE_PSI, TYPE_ETHETA, TYPE_ALPHAS, TYPE_MU, TYPE_ETA, TYPE_Other,
TYPE_SIT_EPSILON, TYPE_SIT_EPSILON_MU
*/
Expand Down

0 comments on commit 9ef9915

Please # to comment.