Copying new classes (cxx) and cpp files to src

Will remove cpp and header files and make phreeqc an external directory.




git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@785 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2006-02-16 00:21:39 +00:00
commit 60a1544019
199 changed files with 131134 additions and 0 deletions

233
Conc.cxx Normal file
View File

@ -0,0 +1,233 @@
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Conc.h"
#include "ISolution.h"
#include "Utils.h"
#include <cassert>
#define EXTERNAL extern
#include "global.h"
#include "phrqproto.h"
#include "phqalloc.h"
cxxConc::cxxConc(void)
: description(NULL)
, moles(0.0)
, input_conc(0.0)
, units(NULL)
, equation_name(NULL)
, phase_si(0.0)
, n_pe(-1)
, as(NULL)
, gfw(0.0)
//, skip(0);
//, phase(NULL)
{
}
cxxConc::cxxConc(struct conc *conc_ptr)
{
description = conc_ptr->description;
moles = conc_ptr->moles;
input_conc = conc_ptr->input_conc;
units = conc_ptr->units;
equation_name = conc_ptr->equation_name;
phase_si = conc_ptr->phase_si;
n_pe = conc_ptr->n_pe;
as = conc_ptr->as;
gfw = conc_ptr->gfw;
//skip = conc_ptr->skip;
//phase = conc_ptr->phase;
}
cxxConc::~cxxConc(void)
{
}
/*
struct conc *cxxConc::concarray(std::map <char *, double, CHARSTAR_LESS> &totals)
// for Solutions, not ISolutions
// takes a map of (elt name, moles)
// returns list of conc structures
{
struct conc *c;
c = (struct conc *) PHRQ_malloc((size_t) ((totals.size() + 1) * sizeof(struct conc)));
if (c == NULL) malloc_error();
int i = 0;
for (std::map <char *, double, CHARSTAR_LESS>::const_iterator it = totals.begin(); it != totals.end(); ++it) {
c[i].description = (char *)it->first;
c[i].moles = it->second;
c[i].input_conc = it->second;
c[i].units = NULL;
c[i].equation_name = NULL;
c[i].phase_si = 0.0;
c[i].n_pe = 0;
c[i].as = NULL;
c[i].gfw = 0.0;
//c[i].skip = 0;
c[i].phase = NULL;
i++;
}
c[i].description = NULL;
return(c);
}
*/
struct conc *cxxConc::cxxConc2conc(const std::set <cxxConc> &totals)
// for ISolutions
// takes a std::vector cxxConc structures
// returns list of conc structures
{
struct conc *c;
c = (struct conc *) PHRQ_malloc((size_t) ((totals.size() + 1) * sizeof(struct conc)));
if (c == NULL) malloc_error();
int i = 0;
for (std::set<cxxConc>::const_iterator it = totals.begin(); it != totals.end(); ++it) {
c[i].description = it->description;
c[i].moles = it->moles;
c[i].input_conc = it->input_conc;
c[i].units = it->units;
c[i].equation_name = it->equation_name;
c[i].phase_si = it->phase_si;
c[i].n_pe = it->n_pe;
c[i].as = it->as;
c[i].gfw = it->gfw;
//c[i].skip = 0;
c[i].phase = NULL;
i++;
}
c[i].description = NULL;
return(c);
}
#ifdef SKIP
cxxConc::STATUS_TYPE cxxConc::read(CParser& parser, cxxISolution& solution)
{
// std::string& str = parser.line();
std::string str = parser.line();
// defaults set in ctor
// Remove space between "kg" and "solution" or "water" in units
Utilities::replace("Kg", "kg", str);
Utilities::replace("KG", "kg", str);
while (Utilities::replace("kg ", "kg", str));
std::istream::pos_type ptr = 0;
//
// Read master species list for mass balance equation
//
std::string token;
std::string token1;
int count_redox_states = 0;
CParser::TOKEN_TYPE j;
while ( ((j = parser.copy_token(token, ptr)) == CParser::TT_UPPER ) ||
( token[0] == '[' ) ||
( Utilities::strcmp_nocase_arg1(token.c_str(), "ph") == 0 ) ||
( Utilities::strcmp_nocase_arg1(token.c_str(), "pe") == 0 ) )
{
++count_redox_states;
Utilities::replace("(+", "(", token);
if (count_redox_states > 1) token1 += " ";
token1 += token;
}
if (count_redox_states == 0) {
parser.incr_input_error();
parser.error_msg("No element or master species given for concentration input.", CParser::OT_CONTINUE);
return cxxConc::ERROR;
}
description = token1;
// Determine if reading alkalinity, allow equivalents for units
Utilities::str_tolower(token1);
bool alk = false;
if (token1.find("alk") == 0) {
alk = true;
}
// Read concentration
if (!(std::istringstream(token) >> this->input_conc)) {
std::ostringstream err;
err << "Concentration data error for " << token1 << " in solution input.";
parser.error_msg(err, CParser::OT_CONTINUE);
return cxxConc::ERROR;
}
if ( (j = parser.copy_token(token, ptr)) == CParser::TT_EMPTY) return cxxConc::OK;
// Read optional data
token1 = token;
// Check for units info
if (parser.check_units(token1, alk, false, solution.get_units(), false) == CParser::OK) {
if (parser.check_units(token1, alk, false, solution.get_units(), true) == CParser::OK) {
this->units = token1;
if ( (j = parser.copy_token(token, ptr)) == CParser::TT_EMPTY) return cxxConc::OK;
} else {
return cxxConc::ERROR;
}
}
// Check for "as" followed by formula to be used for gfw
token1 = token;
Utilities::str_tolower(token1);
if (token1.compare("as") == 0)
{
parser.copy_token(token, ptr);
this->as = token;
if ( (j = parser.copy_token(token, ptr)) == CParser::TT_EMPTY) return cxxConc::OK;
}
// Check for "gfw" followed by gram formula weight
else if (token1.compare("gfw") == 0)
{
if (parser.copy_token(token, ptr) != CParser::TT_DIGIT) {
parser.error_msg("Expecting gram formula weight.", CParser::OT_CONTINUE);
return cxxConc::ERROR;
} else {
parser.get_iss() >> this->gfw;
if ( (j = parser.copy_token(token, ptr)) == CParser::TT_EMPTY) return cxxConc::OK;
}
}
// Check for redox couple for pe
if ( Utilities::strcmp_nocase_arg1(token.c_str(), "pe") == 0 ) {
this->n_pe = cxxPe_Data::store(solution.pe, token);
if ( (j = parser.copy_token(token, ptr)) == CParser::TT_EMPTY) return cxxConc::OK;
} else if (token.find("/") != std::string::npos) {
if (parser.parse_couple(token) == CParser::OK) {
this->n_pe = cxxPe_Data::store(solution.pe, token);
if ( (j = parser.copy_token(token, ptr)) == CParser::TT_EMPTY) return cxxConc::OK;
} else {
return cxxConc::ERROR;
}
}
// Must have phase
this->equation_name = token;
if ( (j = parser.copy_token(token, ptr)) == CParser::TT_EMPTY) return cxxConc::OK;
// Check for saturation index
if (!(std::istringstream(token) >> this->phase_si))
{
parser.error_msg("Expected saturation index.", CParser::OT_CONTINUE);
return cxxConc::ERROR;
}
return cxxConc::OK;
}
#endif
#ifdef SKIP
void cxxConc::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
unsigned int i;
std::string indent0("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
s_oss << indent0;
s_oss << "<soln_total" ;
s_oss << " conc_desc=\"" << this->description << "\"" ;
s_oss << " conc_moles=\"" << this->moles << "\"" ;
s_oss << "\">" << std::endl;
}
#endif

70
Conc.h Normal file
View File

@ -0,0 +1,70 @@
#if !defined(CONC_H_INCLUDED)
#define CONC_H_INCLUDED
//#include "Parser.h"
#include "Utils.h"
#include <string>
#include <map> // std::map
#include <vector>
#include <set>
#include "char_star.h"
// forward declarations
class cxxISolution; // reqd for read and dump_xml
class cxxConc
{
public:
cxxConc(void);
cxxConc(struct conc *conc_ptr);
~cxxConc(void);
enum STATUS_TYPE {
ERROR = 0,
OK = 1
};
public:
//STATUS_TYPE read(CParser& parser, CSolution& sol);
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
double get_input_conc()const {return this->input_conc;}
void set_input_conc(double input_conc) {this->input_conc = input_conc;}
std::string get_equation_name()const {return this->equation_name;}
void set_equation_name(char * equation_name) {this->equation_name = equation_name;}
std::string get_description()const {return this->description;}
void set_description(char * description) {this->description = description;}
std::string get_units()const {return this->units;}
void set_units(char * units) {this->units = units;}
int get_n_pe()const {return this->n_pe;}
void set_n_pe(int n_pe) {this->n_pe = n_pe;}
//bool operator<(const cxxConc& conc)const { return (this->description < conc.description); }
bool operator<(const cxxConc& conc)const { return ::strcmp(this->description, conc.description) < 0; }
//static struct conc * concarray(std::map<char *, double, CHARSTAR_LESS> &t );
static struct conc * cxxConc2conc(const std::set<cxxConc> &t );
private:
char * description;
double moles;
double input_conc;
char * units;
char * equation_name;
//struct phase *phase;
double phase_si;
int n_pe;
char * as;
double gfw;
//int skip;
};
#endif // CONC_H_INCLUDED

554
ExchComp.cxx Normal file
View File

@ -0,0 +1,554 @@
// ExchComp.cxx: implementation of the cxxExchComp class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "ExchComp.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include "output.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxExchComp::cxxExchComp()
//
// default constructor for cxxExchComp
//
{
moles = 0.0;
la = 0.0;
charge_balance = 0.0;
phase_name = NULL;
phase_proportion = 0.0;
rate_name = NULL;
totals.type = cxxNameDouble::ND_ELT_MOLES;
formula_totals.type = cxxNameDouble::ND_ELT_MOLES;
}
cxxExchComp::cxxExchComp(struct exch_comp *exch_comp_ptr)
//
// constructor for cxxExchComp from struct exch_comp
//
:
formula_totals(exch_comp_ptr->formula_totals),
totals(exch_comp_ptr->totals)
{
formula = exch_comp_ptr->formula;
moles = exch_comp_ptr->moles;
// totals in constructor
//formula_totals in constructor
la = exch_comp_ptr->la;
charge_balance = exch_comp_ptr->charge_balance;
phase_name = exch_comp_ptr->phase_name;
phase_proportion = exch_comp_ptr->phase_proportion;
rate_name = exch_comp_ptr->rate_name;
formula_z = exch_comp_ptr->formula_z;
}
cxxExchComp::~cxxExchComp()
{
}
struct master *cxxExchComp::get_master()
{
struct master *master_ptr = NULL;
for (std::map <char *, double, CHARSTAR_LESS>::iterator it = totals.begin(); it != totals.end(); it++) {
/* Find master species */
char *eltName = it->first;
struct element *elt_ptr = element_store(eltName);
if (elt_ptr->master == NULL) {
std::ostringstream error_oss;
error_oss << "Master species not in data base for " << elt_ptr->name << std::endl;
//Utilities::error_msg(error_oss.str(), STOP);
error_msg(error_oss.str().c_str(), CONTINUE);
return(NULL);
}
if (elt_ptr->master->type != EX) continue;
master_ptr = elt_ptr->master;
break;
}
if (master_ptr == NULL) {
std::ostringstream error_oss;
error_oss << "Exchange formula does not contain an exchange master species, " << this->formula << std::endl;
//Utilities::error_msg(error_oss.str(), CONTINUE);
error_msg(error_oss.str().c_str(), CONTINUE);
}
return(master_ptr);
}
struct exch_comp *cxxExchComp::cxxExchComp2exch_comp(std::list<cxxExchComp>& el)
//
// Builds exch_comp structure from of cxxExchComp
//
{
struct exch_comp *exch_comp_ptr = (struct exch_comp *) PHRQ_malloc((size_t) (el.size() * sizeof(struct exch_comp)));
if (exch_comp_ptr == NULL) malloc_error();
int i = 0;
for (std::list<cxxExchComp>::iterator it = el.begin(); it != el.end(); ++it) {
exch_comp_ptr[i].formula = it->formula;
exch_comp_ptr[i].formula_z = it->formula_z;
exch_comp_ptr[i].totals = it->totals.elt_list();
exch_comp_ptr[i].moles = it->moles;
exch_comp_ptr[i].formula_totals = it->formula_totals.elt_list();
exch_comp_ptr[i].la = it->la;
exch_comp_ptr[i].charge_balance = it->charge_balance;
exch_comp_ptr[i].phase_name = it->phase_name;
exch_comp_ptr[i].phase_proportion = it->phase_proportion;
exch_comp_ptr[i].rate_name = it->rate_name;
exch_comp_ptr[i].master = it->get_master();
i++;
}
return(exch_comp_ptr);
}
void cxxExchComp::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing exch_comp message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Exch_Comp element and attributes
s_oss << indent0 << "formula=\"" << this->formula << "\"" << std::endl;
s_oss << indent0 << "moles=\"" << this->moles << "\"" << std::endl;
s_oss << indent0 << "la=\"" << this->la << "\"" << std::endl;
s_oss << indent0 << "charge_balance=\"" << this->charge_balance << "\"" << std::endl;
if (this->phase_name != NULL) {
s_oss << indent0 << "phase_name=\"" << this->phase_name << "\"" << std::endl;
}
if (this->rate_name != NULL) {
s_oss << indent0 << "rate_name=\"" << this->rate_name << "\"" << std::endl;
}
s_oss << indent0 << "phase_proportion=\"" << this->phase_proportion << "\"" << std::endl;
// totals
s_oss << indent0;
s_oss << "<totals " << std::endl;
this->totals.dump_xml(s_oss, indent + 1);
// formula_totals
s_oss << indent0;
s_oss << "<formula_totals " << std::endl;
this->formula_totals.dump_xml(s_oss, indent + 1);
}
void cxxExchComp::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing exch_comp message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Exch_Comp element and attributes
s_oss << indent0 << "-formula " << this->formula << std::endl;
s_oss << indent0 << "-moles " << this->moles << std::endl;
s_oss << indent0 << "-la " << this->la << std::endl;
s_oss << indent0 << "-charge_balance " << this->charge_balance << std::endl;
if (this->phase_name != NULL) {
s_oss << indent0 << "-phase_name " << this->phase_name << std::endl;
}
if (this->rate_name != NULL) {
s_oss << indent0 << "-rate_name " << this->rate_name << std::endl;
}
s_oss << indent0 << "-phase_proportion " << this->phase_proportion << std::endl;
s_oss << indent0 << "-formula_z " << this->formula_z << std::endl;
// totals
s_oss << indent0;
s_oss << "-totals" << std::endl;
this->totals.dump_raw(s_oss, indent + 1);
// formula_totals
s_oss << indent0;
s_oss << "-formula_totals" << std::endl;
this->formula_totals.dump_raw(s_oss, indent + 1);
}
void cxxExchComp::read_raw(CParser& parser)
{
std::string str;
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(10);
vopts.push_back("formula"); // 0
vopts.push_back("moles"); // 1
vopts.push_back("la"); // 2
vopts.push_back("charge_balance"); // 3
vopts.push_back("phase_name"); // 4
vopts.push_back("rate_name"); // 5
vopts.push_back("formula_z"); // 6
vopts.push_back("phase_proportion"); // 7
vopts.push_back("totals"); // 8
vopts.push_back("formula_totals"); // 9
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
opt_save = CParser::OPT_ERROR;
bool formula_defined(false);
bool moles_defined(false);
bool la_defined(false);
bool charge_balance_defined(false);
bool formula_z_defined(false);
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_KEYWORD;
// Allow return to Exchange for more processing
//parser.error_msg("Unknown input in EXCH_COMP read.", CParser::OT_CONTINUE);
//parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // formula
if (!(parser.get_iss() >> str))
{
this->formula = NULL;
parser.incr_input_error();
parser.error_msg("Expected string value for formula.", CParser::OT_CONTINUE);
} else {
this->formula = string_hsave(str.c_str());
}
formula_defined = true;
break;
case 1: // moles
if (!(parser.get_iss() >> this->moles))
{
this->moles = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for moles.", CParser::OT_CONTINUE);
}
moles_defined = true;
break;
case 2: // la
if (!(parser.get_iss() >> this->la))
{
this->la = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for la.", CParser::OT_CONTINUE);
}
la_defined = true;
break;
case 3: // charge_balance
if (!(parser.get_iss() >> this->charge_balance))
{
this->charge_balance = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for charge_balance.", CParser::OT_CONTINUE);
}
charge_balance_defined = true;
break;
case 4: // phase_name
if (!(parser.get_iss() >> str))
{
this->phase_name = NULL;
parser.incr_input_error();
parser.error_msg("Expected string value for phase_name.", CParser::OT_CONTINUE);
} else {
this->phase_name = string_hsave(str.c_str());
}
break;
case 5: // rate_name
if (!(parser.get_iss() >> str))
{
this->rate_name = NULL;
parser.incr_input_error();
parser.error_msg("Expected string value for rate_name.", CParser::OT_CONTINUE);
} else {
this->rate_name = string_hsave(str.c_str());
}
break;
case 6: // formula_z
if (!(parser.get_iss() >> this->formula_z))
{
this->formula_z = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for formula_z.", CParser::OT_CONTINUE);
}
formula_z_defined = true;
break;
case 7: // phase_proportion
if (!(parser.get_iss() >> this->phase_proportion))
{
this->phase_proportion = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for phase_proportion.", CParser::OT_CONTINUE);
}
break;
case 8: // totals
if ( this->totals.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected element name and molality for ExchComp totals.", CParser::OT_CONTINUE);
}
opt_save = 8;
break;
case 9: // formula_totals
if ( this->formula_totals.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected element name and molality for ExchComp formula totals.", CParser::OT_CONTINUE);
}
opt_save = 9;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
if (formula_defined == false) {
parser.incr_input_error();
parser.error_msg("Formula not defined for ExchComp input.", CParser::OT_CONTINUE);
}
if (moles_defined == false) {
parser.incr_input_error();
parser.error_msg("Moles not defined for ExchComp input.", CParser::OT_CONTINUE);
}
if (la_defined == false) {
parser.incr_input_error();
parser.error_msg("La not defined for ExchComp input.", CParser::OT_CONTINUE);
}
if (charge_balance_defined == false) {
parser.incr_input_error();
parser.error_msg("Charge_balance not defined for ExchComp input.", CParser::OT_CONTINUE);
}
if (formula_z_defined == false) {
parser.incr_input_error();
parser.error_msg("Formula_z not defined for ExchComp input.", CParser::OT_CONTINUE);
}
}
#ifdef SKIP
cxxExchComp& cxxExchComp::read(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(11);
vopts.push_back("temp"); // 0
vopts.push_back("temperature"); // 1
vopts.push_back("dens"); // 2
vopts.push_back("density"); // 3
vopts.push_back("units"); // 4
vopts.push_back("redox"); // 5
vopts.push_back("ph"); // 6
vopts.push_back("pe"); // 7
vopts.push_back("unit"); // 8
vopts.push_back("isotope"); // 9
vopts.push_back("water"); // 10
}
// const int count_opt_list = vopts.size();
cxxExchComp numkey;
// Read exch_comp number and description
numkey.read_number_description(parser);
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
CParser::TOKEN_TYPE j;
//cxxExchComp& sol = s_map[numkey.n_user()];
int default_pe = 0;
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPTION_DEFAULT)
{
ptr = next_char;
if (parser.copy_token(token, ptr) == CParser::TT_DIGIT) {
opt = 9;
}
}
switch (opt)
{
case CParser::OPTION_EOF:
break;
case CParser::OPTION_KEYWORD:
break;
case CParser::OPTION_ERROR:
opt = CParser::OPTION_EOF;
parser.error_msg("Unknown input in EXCH_COMP keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // temp
case 1: // temperature
if (!(parser.get_iss() >> sol.tc))
{
sol.tc = 25;
}
break;
case 2: // dens
case 3: // density
parser.get_iss() >> sol.density;
break;
case 4: // units
case 8: // unit
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.check_units(token, false, false, sol.units, true) == CParser::OK) {
sol.units = token;
} else {
parser.incr_input_error();
}
break;
case 5: // redox
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.parse_couple(token) == CParser::OK) {
default_pe = cxxPe_Data::store(sol.pe, token);
} else {
parser.incr_input_error();
}
break;
case 6: // ph
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.ph = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("H(1)");
sol.add(conc);
}
break;
case 7: // pe
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.exch_comp_pe = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("E");
sol.add(conc);
}
break;
case 9: // isotope
{
cxxIsotope isotope;
if (isotope.read(parser) == cxxIsotope::OK) {
sol.add(isotope);
}
}
break;
case 10: // water
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) {
sol.mass_water = 1.0;
} else if (j != CParser::TT_DIGIT) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for mass of water in exch_comp.", CParser::OT_CONTINUE);
} else {
std::istringstream(token) >> sol.mass_water;
}
break;
case CParser::OPTION_DEFAULT:
{
// Read concentration
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
} else {
sol.add(conc);
}
}
break;
}
if (opt == CParser::OPTION_EOF || opt == CParser::OPTION_KEYWORD) break;
}
#ifdef SKIP
//
// Sort totals by description
//
std::sort(sol.totals.begin(), sol.totals.end());
#endif
//
// fix up default units and default pe
//
std::string token1;
std::vector<cxxConc>::iterator iter = sol.totals.begin();
for (; iter != sol.totals.end(); ++iter)
{
token = (*iter).get_description();
Utilities::str_tolower(token);
if ((*iter).get_units().empty()) {
(*iter).set_units(sol.units);
} else {
bool alk = false;
if (token.find("alk") == 0) alk = true;
token1 = (*iter).get_units();
if (parser.check_units(token1, alk, true, sol.get_units(), true) == CParser::ERROR) {
parser.incr_input_error();
} else {
(*iter).set_units(token1);
}
}
if ((*iter).get_n_pe() < 0) {
(*iter).set_n_pe(default_pe);
}
}
sol.default_pe = default_pe;
return sol;
}
#endif

52
ExchComp.h Normal file
View File

@ -0,0 +1,52 @@
#if !defined(EXCHCOMP_H_INCLUDED)
#define EXCHCOMP_H_INCLUDED
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
class cxxExchComp
{
public:
cxxExchComp();
cxxExchComp(struct exch_comp *);
~cxxExchComp();
struct master *get_master();
char *get_phase_name()const {return this->phase_name;}
char *get_rate_name()const {return this->rate_name;}
static struct exch_comp *cxxExchComp2exch_comp(std::list<cxxExchComp>& el);
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
protected:
char * formula;
double moles;
cxxNameDouble formula_totals;
cxxNameDouble totals;
double la;
double charge_balance;
char *phase_name;
double phase_proportion;
char *rate_name;
double formula_z; // charge on formula
public:
};
#endif // !defined(EXCHCOMP_H_INCLUDED)

413
Exchange.cxx Normal file
View File

@ -0,0 +1,413 @@
// Exchange.cxx: implementation of the cxxExchange class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "Exchange.h"
#include "ExchComp.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxExchange::cxxExchange()
//
// default constructor for cxxExchange
//
: cxxNumKeyword()
{
pitzer_exchange_gammas = false;
}
cxxExchange::cxxExchange(struct exchange *exchange_ptr)
//
// constructor for cxxExchange from struct exchange
//
:
cxxNumKeyword()
{
int i;
this->set_description(exchange_ptr->description);
n_user = exchange_ptr->n_user;
n_user_end = exchange_ptr->n_user_end;
pitzer_exchange_gammas = (exchange_ptr->pitzer_exchange_gammas == TRUE);
for (i = 0; i < exchange_ptr->count_comps; i++) {
cxxExchComp ec(&(exchange_ptr->comps[i]));
exchComps.push_back(ec);
}
}
cxxExchange::~cxxExchange()
{
}
bool cxxExchange::get_related_phases()
{
for (std::list<cxxExchComp>::const_iterator it = this->exchComps.begin(); it != this->exchComps.end(); ++it) {
if (it->get_phase_name() == NULL) continue;
return(true);
}
return(false);
}
bool cxxExchange::get_related_rate()
{
for (std::list<cxxExchComp>::const_iterator it = this->exchComps.begin(); it != this->exchComps.end(); ++it) {
if (it->get_rate_name() == NULL) continue;
return(true);
}
return(false);
}
struct exchange *cxxExchange::cxxExchange2exchange()
//
// Builds a exchange structure from instance of cxxExchange
//
{
struct exchange *exchange_ptr = exchange_alloc();
exchange_ptr->description = this->get_description();
exchange_ptr->n_user = this->n_user;
exchange_ptr->n_user_end = this->n_user_end;
exchange_ptr->new_def = FALSE;
exchange_ptr->solution_equilibria = FALSE;
exchange_ptr->n_solution = -2;
exchange_ptr->related_phases = (int) this->get_related_phases();
exchange_ptr->related_rate = (int) this->get_related_rate();
exchange_ptr->pitzer_exchange_gammas = (int) this->pitzer_exchange_gammas;
exchange_ptr->count_comps = this->exchComps.size();
exchange_ptr->comps = (struct exch_comp *) free_check_null(exchange_ptr->comps);
exchange_ptr->comps = cxxExchComp::cxxExchComp2exch_comp(this->exchComps);
return(exchange_ptr);
}
void cxxExchange::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing exchange message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Exchange element and attributes
s_oss << indent0;
s_oss << "<exchange " << std::endl;
s_oss << indent1;
s_oss << "pitzer_exchange_gammas=\"" << this->pitzer_exchange_gammas << "\"" << std::endl;
// components
s_oss << indent1;
s_oss << "<component " << std::endl;
for (std::list<cxxExchComp>::const_iterator it = exchComps.begin(); it != exchComps.end(); ++it) {
it->dump_xml(s_oss, indent + 2);
}
return;
}
void cxxExchange::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing exchange message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Exchange element and attributes
s_oss << indent0;
s_oss << "EXCHANGE_RAW " << this->n_user << " " << this->description << std::endl;
s_oss << indent1;
s_oss << "-pitzer_exchange_gammas " << this->pitzer_exchange_gammas << std::endl;
// exchComps structures
for (std::list<cxxExchComp>::const_iterator it = exchComps.begin(); it != exchComps.end(); ++it) {
s_oss << indent1;
s_oss << "-component" << std::endl;
it->dump_raw(s_oss, indent + 2);
}
return;
}
void cxxExchange::read_raw(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(15);
vopts.push_back("pitzer_exchange_gammas"); // 0
vopts.push_back("component"); // 1
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
bool useLastLine(false);
// Read exchange number and description
this->read_number_description(parser);
opt_save = CParser::OPT_ERROR;
bool pitzer_exchange_gammas_defined(false);
for (;;)
{
int opt;
if (useLastLine == false) {
opt = parser.get_option(vopts, next_char);
} else {
opt = parser.getOptionFromLastLine(vopts, next_char);
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_EOF;
parser.error_msg("Unknown input in EXCH_COMP_RAW keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
useLastLine = false;
break;
case 0: // pitzer_exchange_gammas
if (!(parser.get_iss() >> this->pitzer_exchange_gammas))
{
this->pitzer_exchange_gammas = false;
parser.incr_input_error();
parser.error_msg("Expected boolean value for pitzer_exchange_gammas.", CParser::OT_CONTINUE);
}
pitzer_exchange_gammas_defined = true;
useLastLine = false;
break;
case 1: // component
{
cxxExchComp ec;
ec.read_raw(parser);
this->exchComps.push_back(ec);
}
useLastLine = true;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
if (pitzer_exchange_gammas_defined == false) {
parser.incr_input_error();
parser.error_msg("Pitzer_exchange_gammsa not defined for EXCHANGE_RAW input.", CParser::OT_CONTINUE);
}
}
#ifdef SKIP
cxxExchange& cxxExchange::read(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(11);
vopts.push_back("temp"); // 0
vopts.push_back("temperature"); // 1
vopts.push_back("dens"); // 2
vopts.push_back("density"); // 3
vopts.push_back("units"); // 4
vopts.push_back("redox"); // 5
vopts.push_back("ph"); // 6
vopts.push_back("pe"); // 7
vopts.push_back("unit"); // 8
vopts.push_back("isotope"); // 9
vopts.push_back("water"); // 10
}
// const int count_opt_list = vopts.size();
cxxExchange numkey;
// Read exchange number and description
numkey.read_number_description(parser);
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
CParser::TOKEN_TYPE j;
//cxxExchange& sol = s_map[numkey.n_user()];
int default_pe = 0;
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPTION_DEFAULT)
{
ptr = next_char;
if (parser.copy_token(token, ptr) == CParser::TT_DIGIT) {
opt = 9;
}
}
switch (opt)
{
case CParser::OPTION_EOF:
break;
case CParser::OPTION_KEYWORD:
break;
case CParser::OPTION_ERROR:
opt = CParser::OPTION_EOF;
parser.error_msg("Unknown input in EXCHANGE keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // temp
case 1: // temperature
if (!(parser.get_iss() >> sol.tc))
{
sol.tc = 25;
}
break;
case 2: // dens
case 3: // density
parser.get_iss() >> sol.density;
break;
case 4: // units
case 8: // unit
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.check_units(token, false, false, sol.units, true) == CParser::OK) {
sol.units = token;
} else {
parser.incr_input_error();
}
break;
case 5: // redox
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.parse_couple(token) == CParser::OK) {
default_pe = cxxPe_Data::store(sol.pe, token);
} else {
parser.incr_input_error();
}
break;
case 6: // ph
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.ph = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("H(1)");
sol.add(conc);
}
break;
case 7: // pe
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.exchange_pe = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("E");
sol.add(conc);
}
break;
case 9: // isotope
{
cxxIsotope isotope;
if (isotope.read(parser) == cxxIsotope::OK) {
sol.add(isotope);
}
}
break;
case 10: // water
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) {
sol.mass_water = 1.0;
} else if (j != CParser::TT_DIGIT) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for mass of water in exchange.", CParser::OT_CONTINUE);
} else {
std::istringstream(token) >> sol.mass_water;
}
break;
case CParser::OPTION_DEFAULT:
{
// Read concentration
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
} else {
sol.add(conc);
}
}
break;
}
if (opt == CParser::OPTION_EOF || opt == CParser::OPTION_KEYWORD) break;
}
#ifdef SKIP
//
// Sort totals by description
//
std::sort(sol.totals.begin(), sol.totals.end());
#endif
//
// fix up default units and default pe
//
std::string token1;
std::vector<cxxConc>::iterator iter = sol.totals.begin();
for (; iter != sol.totals.end(); ++iter)
{
token = (*iter).get_description();
Utilities::str_tolower(token);
if ((*iter).get_units().empty()) {
(*iter).set_units(sol.units);
} else {
bool alk = false;
if (token.find("alk") == 0) alk = true;
token1 = (*iter).get_units();
if (parser.check_units(token1, alk, true, sol.get_units(), true) == CParser::ERROR) {
parser.incr_input_error();
} else {
(*iter).set_units(token1);
}
}
if ((*iter).get_n_pe() < 0) {
(*iter).set_n_pe(default_pe);
}
}
sol.default_pe = default_pe;
return sol;
}
#endif

47
Exchange.h Normal file
View File

@ -0,0 +1,47 @@
#if !defined(EXCHANGE_H_INCLUDED)
#define EXCHANGE_H_INCLUDED
#include "NumKeyword.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
#include "ExchComp.h"
class cxxExchange : public cxxNumKeyword
{
public:
cxxExchange();
cxxExchange(struct exchange *);
~cxxExchange();
struct exchange *cxxExchange2exchange();
struct exch_comp *cxxExchComp2exch_comp();
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
bool get_related_phases(void);
bool get_related_rate(void);
protected:
std::list<cxxExchComp> exchComps;
bool pitzer_exchange_gammas;
public:
//static std::map<int, cxxExchange>& map;
};
#endif // !defined(EXCHANGE_H_INCLUDED)

474
GasPhase.cxx Normal file
View File

@ -0,0 +1,474 @@
// GasPhase.cxx: implementation of the cxxGasPhase class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "GasPhase.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxGasPhase::cxxGasPhase()
//
// default constructor for cxxGasPhase
//
: cxxNumKeyword()
{
total_p = 0;
volume = 0;
gasPhaseComps.type = cxxNameDouble::ND_NAME_COEF;
}
cxxGasPhase::cxxGasPhase(struct gas_phase *gas_phase_ptr)
//
// constructor for cxxGasPhase from struct gas_phase
//
:
cxxNumKeyword()
{
int i;
this->set_description(gas_phase_ptr->description);
n_user = gas_phase_ptr->n_user;
n_user_end = gas_phase_ptr->n_user_end;
if (gas_phase_ptr->type == PRESSURE) {
type = cxxGasPhase::GP_PRESSURE;
} else {
type = cxxGasPhase::GP_VOLUME;
}
total_p = gas_phase_ptr->total_p;
volume = gas_phase_ptr->volume;
// gas_phase components
for (i = 0; i < gas_phase_ptr->count_comps; i++) {
gasPhaseComps[gas_phase_ptr->comps[i].name] = gas_phase_ptr->comps[i].moles;
}
}
cxxGasPhase::~cxxGasPhase()
{
}
struct gas_comp * cxxGasPhase::cxxGasPhaseComp2gas_comp()
{
struct gas_comp *gas_comp_ptr(NULL);
if (this->gasPhaseComps.size() > 0) {
int i = 0;
int n;
gas_comp_ptr = (struct gas_comp *) PHRQ_malloc((size_t) (this->gasPhaseComps.size() * sizeof(struct gas_comp)));
if (gas_comp_ptr == NULL) malloc_error();
for (cxxNameDouble::iterator it = this->gasPhaseComps.begin(); it != this->gasPhaseComps.end(); it++) {
gas_comp_ptr[i].name = it->first;
gas_comp_ptr[i].phase = phase_bsearch(it->first, &n, TRUE);
gas_comp_ptr[i].p_read = 0;
gas_comp_ptr[i].moles = it->second;
gas_comp_ptr[i].initial_moles = 0;
i++;
}
}
return(gas_comp_ptr);
}
struct gas_phase *cxxGasPhase::cxxGasPhase2gas_phase()
//
// Builds a gas_phase structure from instance of cxxGasPhase
//
{
struct gas_phase *gas_phase_ptr = gas_phase_alloc();
gas_phase_ptr->description = this->get_description();
gas_phase_ptr->n_user = this->n_user;
gas_phase_ptr->n_user_end = this->n_user_end;
gas_phase_ptr->new_def = FALSE;
gas_phase_ptr->solution_equilibria = FALSE;
gas_phase_ptr->n_solution = -2;
if (this->type == cxxGasPhase::GP_PRESSURE) {
gas_phase_ptr->type = PRESSURE;
} else {
gas_phase_ptr->type = VOLUME;
}
gas_phase_ptr->total_p = this->total_p;
gas_phase_ptr->volume = this->volume;
gas_phase_ptr->temperature = 273.15;
// comps
gas_phase_ptr->count_comps = this->gasPhaseComps.size();
gas_phase_ptr->comps = (struct gas_comp *) free_check_null(gas_phase_ptr->comps);
gas_phase_ptr->comps = this->cxxGasPhaseComp2gas_comp();
return(gas_phase_ptr);
}
#ifdef SKIP
void cxxGasPhase::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing gas_phase message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// GasPhase element and attributes
s_oss << indent0;
s_oss << "<gas_phase " << std::endl;
s_oss << indent1;
s_oss << "pitzer_gas_phase_gammas=\"" << this->pitzer_gas_phase_gammas << "\"" << std::endl;
// components
s_oss << indent1;
s_oss << "<component " << std::endl;
for (std::list<cxxGasPhaseComp>::const_iterator it = gas_phaseComps.begin(); it != gas_phaseComps.end(); ++it) {
it->dump_xml(s_oss, indent + 2);
}
return;
}
#endif
void cxxGasPhase::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing gas_phase message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// GasPhase element and attributes
s_oss << indent0;
s_oss << "GAS_PHASE_RAW " << this->n_user << " " << this->description << std::endl;
s_oss << indent1;
s_oss << "-type " << this->type << std::endl;
s_oss << indent1;
s_oss << "-total_p " << this->total_p << std::endl;
s_oss << indent1;
s_oss << "-volume " << this->volume << std::endl;
// gasPhaseComps
s_oss << indent1;
s_oss << "-component" << std::endl;
this->gasPhaseComps.dump_raw(s_oss, indent + 2);
}
void cxxGasPhase::read_raw(CParser& parser)
{
int i;
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(15);
vopts.push_back("type"); //0
vopts.push_back("total_p"); //1
vopts.push_back("volume"); //2
vopts.push_back("component"); //3
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
bool useLastLine(false);
// Read gas_phase number and description
this->read_number_description(parser);
opt_save = CParser::OPT_ERROR;
bool type_defined(false);
bool total_p_defined(false);
bool volume_defined(false);
for (;;)
{
int opt;
if (useLastLine == false) {
opt = parser.get_option(vopts, next_char);
} else {
opt = parser.getOptionFromLastLine(vopts, next_char);
}
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_EOF;
parser.error_msg("Unknown input in GAS_PHASE_COMP_RAW keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
useLastLine = false;
break;
case 0: // type
if (!(parser.get_iss() >> i))
//if (!(parser.get_iss() >> (cxxGasPhase::GP_TYPE) this->type))
{
this->type = cxxGasPhase::GP_PRESSURE;
parser.incr_input_error();
parser.error_msg("Expected enum for type.", CParser::OT_CONTINUE);
} else {
this->type = (cxxGasPhase::GP_TYPE) i;
}
type_defined = true;
useLastLine = false;
break;
case 1: // total_p
if (!(parser.get_iss() >> this->total_p))
{
this->total_p = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for total_p.", CParser::OT_CONTINUE);
}
total_p_defined = true;
useLastLine = false;
break;
case 2: // volume
if (!(parser.get_iss() >> this->volume))
{
this->volume = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for volume.", CParser::OT_CONTINUE);
}
volume_defined = true;
useLastLine = false;
break;
case 3: // component
if ( this->gasPhaseComps.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected gas component name and moles for gasPhaseComps.", CParser::OT_CONTINUE);
}
opt_save = 3;
useLastLine = false;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
if (type_defined == false) {
parser.incr_input_error();
parser.error_msg("Type not defined for GAS_PHASE_RAW input.", CParser::OT_CONTINUE);
}
if (total_p_defined == false) {
parser.incr_input_error();
parser.error_msg("Total_p not defined for GAS_PHASE_RAW input.", CParser::OT_CONTINUE);
}
if (volume_defined == false) {
parser.incr_input_error();
parser.error_msg("Volume not defined for GAS_PHASE_RAW input.", CParser::OT_CONTINUE);
}
}
#ifdef SKIP
cxxGasPhase& cxxGasPhase::read(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(11);
vopts.push_back("temp"); // 0
vopts.push_back("temperature"); // 1
vopts.push_back("dens"); // 2
vopts.push_back("density"); // 3
vopts.push_back("units"); // 4
vopts.push_back("redox"); // 5
vopts.push_back("ph"); // 6
vopts.push_back("pe"); // 7
vopts.push_back("unit"); // 8
vopts.push_back("isotope"); // 9
vopts.push_back("water"); // 10
}
// const int count_opt_list = vopts.size();
cxxGasPhase numkey;
// Read gas_phase number and description
numkey.read_number_description(parser);
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
CParser::TOKEN_TYPE j;
//cxxGasPhase& sol = s_map[numkey.n_user()];
int default_pe = 0;
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPTION_DEFAULT)
{
ptr = next_char;
if (parser.copy_token(token, ptr) == CParser::TT_DIGIT) {
opt = 9;
}
}
switch (opt)
{
case CParser::OPTION_EOF:
break;
case CParser::OPTION_KEYWORD:
break;
case CParser::OPTION_ERROR:
opt = CParser::OPTION_EOF;
parser.error_msg("Unknown input in GAS_PHASE keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // temp
case 1: // temperature
if (!(parser.get_iss() >> sol.tc))
{
sol.tc = 25;
}
break;
case 2: // dens
case 3: // density
parser.get_iss() >> sol.density;
break;
case 4: // units
case 8: // unit
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.check_units(token, false, false, sol.units, true) == CParser::OK) {
sol.units = token;
} else {
parser.incr_input_error();
}
break;
case 5: // redox
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.parse_couple(token) == CParser::OK) {
default_pe = cxxPe_Data::store(sol.pe, token);
} else {
parser.incr_input_error();
}
break;
case 6: // ph
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.ph = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("H(1)");
sol.add(conc);
}
break;
case 7: // pe
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.gas_phase_pe = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("E");
sol.add(conc);
}
break;
case 9: // isotope
{
cxxIsotope isotope;
if (isotope.read(parser) == cxxIsotope::OK) {
sol.add(isotope);
}
}
break;
case 10: // water
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) {
sol.mass_water = 1.0;
} else if (j != CParser::TT_DIGIT) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for mass of water in gas_phase.", CParser::OT_CONTINUE);
} else {
std::istringstream(token) >> sol.mass_water;
}
break;
case CParser::OPTION_DEFAULT:
{
// Read concentration
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
} else {
sol.add(conc);
}
}
break;
}
if (opt == CParser::OPTION_EOF || opt == CParser::OPTION_KEYWORD) break;
}
#ifdef SKIP
//
// Sort totals by description
//
std::sort(sol.totals.begin(), sol.totals.end());
#endif
//
// fix up default units and default pe
//
std::string token1;
std::vector<cxxConc>::iterator iter = sol.totals.begin();
for (; iter != sol.totals.end(); ++iter)
{
token = (*iter).get_description();
Utilities::str_tolower(token);
if ((*iter).get_units().empty()) {
(*iter).set_units(sol.units);
} else {
bool alk = false;
if (token.find("alk") == 0) alk = true;
token1 = (*iter).get_units();
if (parser.check_units(token1, alk, true, sol.get_units(), true) == CParser::ERROR) {
parser.incr_input_error();
} else {
(*iter).set_units(token1);
}
}
if ((*iter).get_n_pe() < 0) {
(*iter).set_n_pe(default_pe);
}
}
sol.default_pe = default_pe;
return sol;
}
#endif

50
GasPhase.h Normal file
View File

@ -0,0 +1,50 @@
#if !defined(GASPHASE_H_INCLUDED)
#define GASPHASE_H_INCLUDED
#include "NumKeyword.h"
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
class cxxGasPhase : public cxxNumKeyword
{
public:
cxxGasPhase();
cxxGasPhase(struct gas_phase *);
~cxxGasPhase();
enum GP_TYPE {
GP_PRESSURE = 0,
GP_VOLUME = 1
};
struct gas_phase *cxxGasPhase2gas_phase();
struct gas_comp *cxxGasPhaseComp2gas_comp();
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
protected:
cxxNameDouble gasPhaseComps;
GP_TYPE type;
double total_p;
double volume;
public:
//static std::map<int, cxxGasPhase>& map;
};
#endif // !defined(GASPHASE_H_INCLUDED)

334
ISolution.cxx Normal file
View File

@ -0,0 +1,334 @@
// ISolution.cxx: implementation of the cxxSolutionxx class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "ISolution.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
//static std::map<int, cxxISolution> ss_map;
//std::map<int, cxxISolution>& cxxISolution::s_map = ss_map;
cxxISolution::cxxISolution()
:
units("mMol/kgw")
{
density = 1.0;
default_pe = -1;
}
cxxISolution::cxxISolution(struct solution *solution_ptr)
: cxxSolution(solution_ptr)
//, pe(cxxPe_Data::alloc())
{
density = solution_ptr->density;
units = solution_ptr->units;
// totals
for (int i = 0; solution_ptr->totals[i].description != NULL; i++) {
cxxConc c(&(solution_ptr->totals[i]));
concs.insert(c);
}
default_pe = solution_ptr->default_pe;
// pe_data
pes = pe_data_dup(solution_ptr->pe);
}
cxxISolution::~cxxISolution()
{
pe_data_free(this->pes);
}
struct solution *cxxISolution::cxxISolution2solution()
//
// Builds a solution structure from instance of cxxISolution
//
{
struct solution *soln_ptr = this->cxxSolution2solution();
soln_ptr->new_def = TRUE;
soln_ptr->density = this->density;
soln_ptr->units = string_hsave(this->units.c_str());
soln_ptr->default_pe = this->default_pe;
// pe
soln_ptr->pe = (struct pe_data *) pe_data_free(soln_ptr->pe);
soln_ptr->pe = pe_data_dup(this->pes);
// totals
soln_ptr->totals = (struct conc *) free_check_null(soln_ptr->totals);
soln_ptr->totals = cxxConc::cxxConc2conc(this->concs);
return(soln_ptr);
}
#ifdef SKIP
cxxISolution& cxxISolution::read(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(11);
vopts.push_back("temp"); // 0
vopts.push_back("temperature"); // 1
vopts.push_back("dens"); // 2
vopts.push_back("density"); // 3
vopts.push_back("units"); // 4
vopts.push_back("redox"); // 5
vopts.push_back("ph"); // 6
vopts.push_back("pe"); // 7
vopts.push_back("unit"); // 8
vopts.push_back("isotope"); // 9
vopts.push_back("water"); // 10
}
// const int count_opt_list = vopts.size();
cxxISolution numkey;
// Read solution number and description
numkey.read_number_description(parser);
// Malloc space for solution data
//// g_solution_map[numkey.n_user()] = numkey;
s_map[numkey.n_user()] = numkey;
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
CParser::TOKEN_TYPE j;
cxxISolution& sol = s_map[numkey.n_user()];
int default_pe = 0;
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPTION_DEFAULT)
{
ptr = next_char;
if (parser.copy_token(token, ptr) == CParser::TT_DIGIT) {
opt = 9;
}
}
switch (opt)
{
case CParser::OPTION_EOF:
break;
case CParser::OPTION_KEYWORD:
break;
case CParser::OPTION_ERROR:
opt = CParser::OPTION_EOF;
parser.error_msg("Unknown input in SOLUTION keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // temp
case 1: // temperature
if (!(parser.get_iss() >> sol.tc))
{
sol.tc = 25;
}
break;
case 2: // dens
case 3: // density
parser.get_iss() >> sol.density;
break;
case 4: // units
case 8: // unit
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.check_units(token, false, false, sol.units, true) == CParser::OK) {
sol.units = token;
} else {
parser.incr_input_error();
}
break;
case 5: // redox
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.parse_couple(token) == CParser::OK) {
default_pe = cxxPe_Data::store(sol.pe, token);
} else {
parser.incr_input_error();
}
break;
case 6: // ph
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.ph = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("H(1)");
sol.add(conc);
}
break;
case 7: // pe
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.solution_pe = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("E");
sol.add(conc);
}
break;
case 9: // isotope
{
cxxIsotope isotope;
if (isotope.read(parser) == cxxIsotope::OK) {
sol.add(isotope);
}
}
break;
case 10: // water
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) {
sol.mass_water = 1.0;
} else if (j != CParser::TT_DIGIT) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for mass of water in solution.", CParser::OT_CONTINUE);
} else {
std::istringstream(token) >> sol.mass_water;
}
break;
case CParser::OPTION_DEFAULT:
{
// Read concentration
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
} else {
sol.add(conc);
}
}
break;
}
if (opt == CParser::OPTION_EOF || opt == CParser::OPTION_KEYWORD) break;
}
#ifdef SKIP
//
// Sort totals by description
//
std::sort(sol.totals.begin(), sol.totals.end());
#endif
//
// fix up default units and default pe
//
std::string token1;
std::vector<cxxConc>::iterator iter = sol.totals.begin();
for (; iter != sol.totals.end(); ++iter)
{
token = (*iter).get_description();
Utilities::str_tolower(token);
if ((*iter).get_units().empty()) {
(*iter).set_units(sol.units);
} else {
bool alk = false;
if (token.find("alk") == 0) alk = true;
token1 = (*iter).get_units();
if (parser.check_units(token1, alk, true, sol.get_units(), true) == CParser::ERROR) {
parser.incr_input_error();
} else {
(*iter).set_units(token1);
}
}
if ((*iter).get_n_pe() < 0) {
(*iter).set_n_pe(default_pe);
}
}
sol.default_pe = default_pe;
return sol;
}
#endif
#ifdef SKIP
void cxxISolution::dump_xml(std::ostream& os, unsigned int indent)const
{
unsigned int i;
for(i = 0; i < indent; ++i) os << Utilities::INDENT;
os << "<solution>\n";
cxxNumKeyword::dump_xml(os, indent);
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "<temp>" << this->get_tc() << "</temp>" << "\n";
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "<pH>" << this->get_ph() << "</pH>" << "\n";
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "<pe>" << this->get_solution_pe() << "</pe>" << "\n";
assert(this->pe.size() > 0);
assert(this->default_pe >= 0);
assert(this->pe.size() > (unsigned int) this->default_pe);
//this->pe[this->default_pe].dump_xml(os, indent + 1);
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "<units>" << this->get_units() << "</units>" << "\n";
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "<density>" << this->get_density() << "</density>" << "\n";
// foreach conc
if (!this->totals.empty())
{
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "<totals>\n";
std::vector<cxxConc>::const_iterator iter = this->totals.begin();
for(; iter != this->totals.end(); ++iter)
{
(*iter).dump_xml(*this, os, indent + 2);
}
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "</totals>\n";
}
// foreach isotope
if (!this->isotopes.empty())
{
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "<isotopes>\n";
std::list<cxxIsotope>::const_iterator iter = this->isotopes.begin();
for(; iter != this->isotopes.end(); ++iter)
{
(*iter).dump_xml(os, indent + 2);
}
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "</isotopes>\n";
}
for(i = 0; i < indent + 1; ++i) os << Utilities::INDENT;
os << "<water>" << this->get_mass_water() << "</water>" << "\n";
for(i = 0; i < indent; ++i) os << Utilities::INDENT;
os << "</solution>" << "\n";
}
#endif

56
ISolution.h Normal file
View File

@ -0,0 +1,56 @@
#if !defined(ISOLUTION_H_INCLUDED)
#define ISOLUTION_H_INCLUDED
//#include "Parser.h"
#include "NumKeyword.h"
#include "Solution.h"
#include "Conc.h"
//#include "Isotope.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include <set> // std::set
class cxxISolution : public cxxSolution
{
public:
cxxISolution();
cxxISolution(struct solution *);
//cxxISolution(const cxxISolution&);
~cxxISolution();
//static cxxISolution& read(CParser& parser);
//void add(cxxConc conc) { this->concs.push_back(conc); }
struct solution *cxxISolution2solution();
double get_density()const {return this->density;}
void set_density(double density) {this->density = density;}
std::string get_units()const {return units;}
void set_units(std::string units) {units = units;}
//char * get_redox()const {return this->pe[this->default_pe].get_name();}
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
protected:
friend class cxxConc; // for this->pe access
double density;
std::string units;
std::set<cxxConc> concs;
//std::map <char *, struct reaction *> pe;
struct pe_data *pes;
int default_pe;
public:
//static std::map<int, cxxISolution>& map;
};
#endif // !defined(ISOLUTION_H_INCLUDED)

241
Isotope.cxx Normal file
View File

@ -0,0 +1,241 @@
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Isotope.h"
#include "Utils.h"
#include "Parser.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert>
#include <sstream> // std::ostrstream
cxxIsotope::cxxIsotope(void)
: isotope_number(0.0)
{
}
cxxIsotope::cxxIsotope(struct isotope *isotope_ptr)
{
isotope_number = isotope_ptr->isotope_number;
elt_name = isotope_ptr->elt_name;
isotope_name = isotope_ptr->isotope_name;
total = isotope_ptr->total;
ratio = isotope_ptr->ratio;
ratio_uncertainty = isotope_ptr->ratio_uncertainty;
}
cxxIsotope::~cxxIsotope(void)
{
}
struct isotope *cxxIsotope::list2isotope(std::list <cxxIsotope> &isolist)
// takes a std::list of cxxIsotope structures
// returns array of isotope structures
{
struct isotope *iso;
if (isolist.size() <= 0) {
return NULL;
} else {
iso = (struct isotope *) PHRQ_malloc((size_t) ((isolist.size()) * sizeof(struct isotope)));
if (iso == NULL) malloc_error();
int i = 0;
for (std::list <cxxIsotope>::iterator it = isolist.begin(); it != isolist.end(); ++it) {
iso[i].isotope_number = it->isotope_number;
iso[i].elt_name = it->elt_name;
iso[i].total = it->total;
iso[i].ratio = it->ratio;
iso[i].ratio_uncertainty = it->ratio_uncertainty;
iso[i].master = it->master();
iso[i].primary = it->primary();
i++;
}
}
return(iso);
}
#ifdef SKIP
std::string cxxIsotope::get_name()const
{
std::ostringstream oss;
//std::ostrstream oss;
oss << this->isotope_number << this->elt_name;
return oss.str();
}
#endif
void cxxIsotope::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
unsigned int i;
std::string indent0(""), indent1("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
s_oss << indent0;
s_oss << "<soln_isotope=\"" << std::endl;
s_oss << indent1;
s_oss << "iso_isotope_number=\"" << this->isotope_number << "\"" << std::endl;
s_oss << indent1;
s_oss << "iso_elt_name=\"" << this->elt_name << "\"" << std::endl;
s_oss << indent1;
s_oss << "iso_isotope_name=\"" << this->isotope_name << "\"" << std::endl;
s_oss << indent1;
s_oss << "iso_total=\"" << this->total << "\"" << std::endl;
s_oss << indent1;
s_oss << "iso_ratio=\"" << this->ratio << "\"" << std::endl;
if (this->ratio_uncertainty != NAN) {
s_oss << indent1;
s_oss << "iso_ratio_uncertainty=\"" << this->ratio_uncertainty << "\"" << std::endl;
}
s_oss << indent0;
s_oss << "\">" << std::endl;
}
void cxxIsotope::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
unsigned int i;
std::string indent0("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
s_oss << indent0;
s_oss << this->isotope_name << " ";
s_oss << this->isotope_number << " ";
s_oss << this->elt_name << " ";
s_oss << this->total << " ";
s_oss << this->ratio << " ";
if (this->ratio_uncertainty != NAN) {
s_oss << this->ratio_uncertainty << " ";
}
s_oss << std::endl;
}
CParser::STATUS_TYPE cxxIsotope::read_raw(CParser& parser)
{
std::string token;
std::istream::pos_type next_char;
CParser::TOKEN_TYPE j;
// isotope_name
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) {
this->isotope_name = NULL;
return(CParser::PARSER_OK);
}
this->isotope_name = string_hsave(token.c_str());
// isotope_number
if( !(parser.get_iss() >> isotope_number)) {
return CParser::PARSER_ERROR;
}
// elt_name
if( !(parser.get_iss() >> token)) {
return CParser::PARSER_ERROR;
}
this->elt_name = string_hsave(token.c_str());
// total
if( !(parser.get_iss() >> this->total)) {
return CParser::PARSER_ERROR;
}
// ratio
if( !(parser.get_iss() >> this->ratio)) {
return CParser::PARSER_ERROR;
}
// ratio_uncertainty
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) {
this->ratio_uncertainty = NAN;
} else if (j != CParser::TT_DIGIT) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for mass of water in solution.", CParser::OT_CONTINUE);
} else {
std::istringstream(token) >> this->ratio_uncertainty;
}
return CParser::PARSER_OK;
}
bool cxxIsotope::operator<(const cxxIsotope& isotope)const
{
int i = Utilities::strcmp_nocase(this->elt_name, isotope.elt_name);
if (i != 0) return (i < 0);
return ( this->isotope_number < isotope.isotope_number );
}
struct master *cxxIsotope::master(void)
{
return (master_bsearch(this->elt_name));
}
struct master *cxxIsotope::primary(void)
{
return (master_bsearch_primary(this->elt_name));
}
#ifdef SKIP
cxxIsotope::STATUS cxxIsotope::read(CParser& parser)
{
if ( !(parser.get_iss() >> this->isotope_number) ) {
assert(parser.get_iss().fail());
parser.incr_input_error();
parser.error_msg("Expected isotope name to"
" begin with an isotopic number.", CParser::OT_CONTINUE);
return ERROR;
}
assert(parser.get_iss().good() || parser.get_iss().eof());
// read and save element name
std::istringstream::int_type c = parser.get_iss().peek();
if ( c == std::char_traits<char>::eof() || !(::isupper(c)) ) {
parser.error_msg("Expecting element name.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
parser.incr_input_error();
return ERROR;
}
assert(parser.get_iss().good() || parser.get_iss().eof());
if ( !(parser.get_iss() >> this->elt_name) ) {
// should never get here
return ERROR;
}
assert(parser.get_iss().good() || parser.get_iss().eof());
assert(!this->elt_name.empty() && ::isupper(this->elt_name[0]));
// read and store isotope ratio
if ( !(parser.get_iss() >> this->ratio) ) {
assert(parser.get_iss().fail());
parser.incr_input_error();
parser.error_msg("Expected numeric value for isotope ratio.", CParser::OT_CONTINUE);
return ERROR;
}
assert(parser.get_iss().good() || parser.get_iss().eof());
// read and store isotope ratio
this->ratio_uncertainty_defined = false;
if ( !(parser.get_iss() >> this->ratio_uncertainty)) {
if ( !parser.get_iss().eof() ) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for uncertainty in isotope ratio.", CParser::OT_CONTINUE);
return ERROR;
}
} else {
this->ratio_uncertainty_defined = true;
}
assert(parser.get_iss().good() || parser.get_iss().eof());
return OK;
}
#endif

56
Isotope.h Normal file
View File

@ -0,0 +1,56 @@
#if !defined(ISOTOPE_H_INCLUDED)
#define ISOTOPE_H_INCLUDED
#include "Parser.h"
#include <ostream> // std::ostream
#include <string> // std::string
#include <list> // std::list
class cxxIsotope
{
public:
cxxIsotope(void);
cxxIsotope(struct isotope *isotope_ptr);
~cxxIsotope(void);
enum STATUS {
ERROR = 0,
OK = 1
};
//cxxIsotope::STATUS read(CParser& parser);
static struct isotope * list2isotope(std::list<cxxIsotope> &t);
void dump_xml(std::ostream& os, unsigned int indent)const;
void dump_raw(std::ostream& os, unsigned int indent)const;
CParser::STATUS_TYPE cxxIsotope::read_raw(CParser& parser);
char * get_isotope_name()const { return this->isotope_name;}
void set_isotope_name(char * cstring) { this->isotope_name = cstring;}
char * get_elt_name()const { return this->elt_name;}
void set_elt_name(char * cstring) { this->elt_name = cstring;}
double get_ratio()const { return this->ratio; }
double get_ratio_uncertainty()const { return this->ratio_uncertainty; }
bool get_ratio_uncertainty_defined()const { return this->ratio_uncertainty_defined; }
bool operator<(const cxxIsotope& conc)const;
struct master *master(void);
struct master *primary(void);
private:
double isotope_number;
char * elt_name;
char * isotope_name;
double total;
double ratio;
double ratio_uncertainty;
//struct master *master;
//struct master *primary;
bool ratio_uncertainty_defined;
};
#endif // ISOTOPE_H_INCLUDED

504
KineticsComp.cxx Normal file
View File

@ -0,0 +1,504 @@
// KineticsComp.cxx: implementation of the cxxKineticsComp class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "KineticsComp.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxKineticsComp::cxxKineticsComp()
//
// default constructor for cxxKineticsComp
//
{
rate_name = NULL;
tol = 1e-8;
m = 0.0;
m0 = 0.0;
moles = 0.0;
namecoef.type = cxxNameDouble::ND_NAME_COEF;
}
cxxKineticsComp::cxxKineticsComp(struct kinetics_comp *kinetics_comp_ptr)
//
// constructor for cxxKineticsComp from struct kinetics_comp
//
:
namecoef(kinetics_comp_ptr->list, kinetics_comp_ptr->count_list, cxxNameDouble::ND_NAME_COEF)
{
rate_name = kinetics_comp_ptr->rate_name;
tol = kinetics_comp_ptr->tol;
m = kinetics_comp_ptr->m;
m0 = kinetics_comp_ptr->m0;
moles = kinetics_comp_ptr->moles;
for (int i = 0; i < kinetics_comp_ptr->count_d_params; i++) {
this->d_params.push_back(kinetics_comp_ptr->d_params[i]);
}
}
cxxKineticsComp::~cxxKineticsComp()
{
}
struct kinetics_comp *cxxKineticsComp::cxxKineticsComp2kinetics_comp(std::list<cxxKineticsComp>& el)
//
// Builds kinetics_comp structure from of cxxKineticsComp
//
{
struct kinetics_comp *kinetics_comp_ptr = (struct kinetics_comp *) PHRQ_malloc((size_t) (el.size() * sizeof(struct kinetics_comp)));
if (kinetics_comp_ptr == NULL) malloc_error();
int i = 0;
for (std::list<cxxKineticsComp>::iterator it = el.begin(); it != el.end(); ++it) {
kinetics_comp_ptr[i].rate_name = it->rate_name;
kinetics_comp_ptr[i].list = it->namecoef.name_coef();
kinetics_comp_ptr[i].count_list = it->namecoef.size();
kinetics_comp_ptr[i].tol = it->tol;
kinetics_comp_ptr[i].m = it->m;
kinetics_comp_ptr[i].initial_moles = 0.;
kinetics_comp_ptr[i].m0 = it->m0;
kinetics_comp_ptr[i].moles = it->moles;
kinetics_comp_ptr[i].count_c_params = 0;
kinetics_comp_ptr[i].c_params = NULL;
/*
kinetics_comp_ptr[i].count_d_params = 0;
kinetics_comp_ptr[i].d_params = NULL;
*/
kinetics_comp_ptr[i].count_d_params = it->d_params.size();
kinetics_comp_ptr[i].d_params = NULL;
if (it->d_params.size() > 0) {
kinetics_comp_ptr[i].d_params = (double *) PHRQ_malloc((size_t) (it->d_params.size() * sizeof(double)));
if (kinetics_comp_ptr[i].d_params == NULL) malloc_error();
std::copy(it->d_params.begin(), it->d_params.end(), kinetics_comp_ptr[i].d_params);
}
i++;
}
return(kinetics_comp_ptr);
}
#ifdef SKIP
void cxxKineticsComp::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing kinetics_comp message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Kinetics_Comp element and attributes
s_oss << indent0 << "formula=\"" << this->formula << "\"" << std::endl;
s_oss << indent0 << "moles=\"" << this->moles << "\"" << std::endl;
s_oss << indent0 << "la=\"" << this->la << "\"" << std::endl;
s_oss << indent0 << "charge_balance=\"" << this->charge_balance << "\"" << std::endl;
if (this->phase_name != NULL) {
s_oss << indent0 << "phase_name=\"" << this->phase_name << "\"" << std::endl;
}
if (this->rate_name != NULL) {
s_oss << indent0 << "rate_name=\"" << this->rate_name << "\"" << std::endl;
}
s_oss << indent0 << "phase_proportion=\"" << this->phase_proportion << "\"" << std::endl;
// totals
s_oss << indent0;
s_oss << "<totals " << std::endl;
this->totals.dump_xml(s_oss, indent + 1);
// formula_totals
s_oss << indent0;
s_oss << "<formula_totals " << std::endl;
this->formula_totals.dump_xml(s_oss, indent + 1);
}
#endif
void cxxKineticsComp::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing kinetics_comp message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Kinetics_Comp element and attributes
s_oss << indent0 << "-rate_name " << this->rate_name << std::endl;
s_oss << indent0 << "-tol " << this->tol << std::endl;
s_oss << indent0 << "-m " << this->m << std::endl;
s_oss << indent0 << "-m0 " << this->m0 << std::endl;
s_oss << indent0 << "-moles " << this->moles << std::endl;
// namecoef
s_oss << indent0;
s_oss << "-namecoef" << std::endl;
this->namecoef.dump_raw(s_oss, indent + 1);
// d_params
s_oss << indent0;
s_oss << "-d_params" << std::endl;
{
int i = 0;
s_oss << indent1;
for (std::vector<double>::const_iterator it = d_params.begin(); it != d_params.end(); it++) {
if (i++ == 5) {
s_oss << std::endl;
s_oss << indent1;
i = 0;
}
s_oss << *it << " ";
}
s_oss << std::endl;
}
}
void cxxKineticsComp::read_raw(CParser& parser)
{
std::string str;
double d;
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(10);
vopts.push_back("rate_name"); // 0
vopts.push_back("tol"); // 1
vopts.push_back("m"); // 2
vopts.push_back("m0"); // 3
vopts.push_back("moles"); // 4
vopts.push_back("namecoef"); // 5
vopts.push_back("d_params"); // 6
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
opt_save = CParser::OPT_ERROR;
bool rate_name_defined(false);
bool tol_defined(false);
bool m_defined(false);
bool m0_defined(false);
bool moles_defined(false);
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_KEYWORD;
// Allow return to Kinetics for more processing
//parser.error_msg("Unknown input in KINETICS_COMP read.", CParser::OT_CONTINUE);
//parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // rate_name
if (!(parser.get_iss() >> str))
{
this->rate_name = NULL;
parser.incr_input_error();
parser.error_msg("Expected string value for rate_name.", CParser::OT_CONTINUE);
} else {
this->rate_name = string_hsave(str.c_str());
}
rate_name_defined = true;
break;
case 1: // tol
if (!(parser.get_iss() >> this->tol))
{
this->tol = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for tol.", CParser::OT_CONTINUE);
}
tol_defined = true;
break;
case 2: // m
if (!(parser.get_iss() >> this->m))
{
this->m = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for m.", CParser::OT_CONTINUE);
}
m_defined = true;
break;
case 3: // m0
if (!(parser.get_iss() >> this->m0))
{
this->m0 = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for m0.", CParser::OT_CONTINUE);
}
m0_defined = true;
break;
case 4: // moles
if (!(parser.get_iss() >> this->moles))
{
this->moles = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for moles.", CParser::OT_CONTINUE);
}
moles_defined = true;
break;
case 5: // namecoef
if ( this->namecoef.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected element name and molality for namecoef.", CParser::OT_CONTINUE);
}
opt_save = 5;
break;
case 6: // d_params
while (parser.copy_token(token, next_char) == CParser::TT_DIGIT) {
sscanf(token.c_str(), "%lf", &d);
this->d_params.push_back(d);
}
opt_save = 6;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
if (rate_name_defined == false) {
parser.incr_input_error();
parser.error_msg("Rate_name not defined for KineticsComp input.", CParser::OT_CONTINUE);
}
if (tol_defined == false) {
parser.incr_input_error();
parser.error_msg("Tol not defined for KineticsComp input.", CParser::OT_CONTINUE);
}
if (m_defined == false) {
parser.incr_input_error();
parser.error_msg("M not defined for KineticsComp input.", CParser::OT_CONTINUE);
}
if (m0_defined == false) {
parser.incr_input_error();
parser.error_msg("M0 not defined for KineticsComp input.", CParser::OT_CONTINUE);
}
if (moles_defined == false) {
parser.incr_input_error();
parser.error_msg("Moles not defined for KineticsComp input.", CParser::OT_CONTINUE);
}
}
#ifdef SKIP
cxxKineticsComp& cxxKineticsComp::read(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(11);
vopts.push_back("temp"); // 0
vopts.push_back("temperature"); // 1
vopts.push_back("dens"); // 2
vopts.push_back("density"); // 3
vopts.push_back("units"); // 4
vopts.push_back("redox"); // 5
vopts.push_back("ph"); // 6
vopts.push_back("pe"); // 7
vopts.push_back("unit"); // 8
vopts.push_back("isotope"); // 9
vopts.push_back("water"); // 10
}
// const int count_opt_list = vopts.size();
cxxKineticsComp numkey;
// Read kinetics_comp number and description
numkey.read_number_description(parser);
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
CParser::TOKEN_TYPE j;
//cxxKineticsComp& sol = s_map[numkey.n_user()];
int default_pe = 0;
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPTION_DEFAULT)
{
ptr = next_char;
if (parser.copy_token(token, ptr) == CParser::TT_DIGIT) {
opt = 9;
}
}
switch (opt)
{
case CParser::OPTION_EOF:
break;
case CParser::OPTION_KEYWORD:
break;
case CParser::OPTION_ERROR:
opt = CParser::OPTION_EOF;
parser.error_msg("Unknown input in KINETICS_COMP keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // temp
case 1: // temperature
if (!(parser.get_iss() >> sol.tc))
{
sol.tc = 25;
}
break;
case 2: // dens
case 3: // density
parser.get_iss() >> sol.density;
break;
case 4: // units
case 8: // unit
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.check_units(token, false, false, sol.units, true) == CParser::OK) {
sol.units = token;
} else {
parser.incr_input_error();
}
break;
case 5: // redox
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.parse_couple(token) == CParser::OK) {
default_pe = cxxPe_Data::store(sol.pe, token);
} else {
parser.incr_input_error();
}
break;
case 6: // ph
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.ph = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("H(1)");
sol.add(conc);
}
break;
case 7: // pe
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.kinetics_comp_pe = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("E");
sol.add(conc);
}
break;
case 9: // isotope
{
cxxIsotope isotope;
if (isotope.read(parser) == cxxIsotope::OK) {
sol.add(isotope);
}
}
break;
case 10: // water
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) {
sol.mass_water = 1.0;
} else if (j != CParser::TT_DIGIT) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for mass of water in kinetics_comp.", CParser::OT_CONTINUE);
} else {
std::istringstream(token) >> sol.mass_water;
}
break;
case CParser::OPTION_DEFAULT:
{
// Read concentration
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
} else {
sol.add(conc);
}
}
break;
}
if (opt == CParser::OPTION_EOF || opt == CParser::OPTION_KEYWORD) break;
}
#ifdef SKIP
//
// Sort totals by description
//
std::sort(sol.totals.begin(), sol.totals.end());
#endif
//
// fix up default units and default pe
//
std::string token1;
std::vector<cxxConc>::iterator iter = sol.totals.begin();
for (; iter != sol.totals.end(); ++iter)
{
token = (*iter).get_description();
Utilities::str_tolower(token);
if ((*iter).get_units().empty()) {
(*iter).set_units(sol.units);
} else {
bool alk = false;
if (token.find("alk") == 0) alk = true;
token1 = (*iter).get_units();
if (parser.check_units(token1, alk, true, sol.get_units(), true) == CParser::ERROR) {
parser.incr_input_error();
} else {
(*iter).set_units(token1);
}
}
if ((*iter).get_n_pe() < 0) {
(*iter).set_n_pe(default_pe);
}
}
sol.default_pe = default_pe;
return sol;
}
#endif

44
KineticsComp.h Normal file
View File

@ -0,0 +1,44 @@
#if !defined(KINETICSCOMP_H_INCLUDED)
#define KINETICSCOMP_H_INCLUDED
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
class cxxKineticsComp
{
public:
cxxKineticsComp();
cxxKineticsComp(struct kinetics_comp *);
~cxxKineticsComp();
static struct kinetics_comp *cxxKineticsComp2kinetics_comp(std::list<cxxKineticsComp>& el);
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
protected:
char * rate_name;
cxxNameDouble namecoef;
double tol;
double m;
double m0;
double moles;
std::vector<double> d_params;
public:
};
#endif // !defined(KINETICSCOMP_H_INCLUDED)

538
KineticsCxx.cxx Normal file
View File

@ -0,0 +1,538 @@
// Kinetics.cxx: implementation of the cxxKinetics class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "KineticsCxx.h"
#include "KineticsComp.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxKinetics::cxxKinetics()
//
// default constructor for cxxKinetics
//
: cxxNumKeyword()
{
step_divide = 1.0;
rk = 3;
bad_step_max = 500;
use_cvode = false;
totals.type = cxxNameDouble::ND_ELT_MOLES;
}
cxxKinetics::cxxKinetics(struct kinetics *kinetics_ptr)
//
// constructor for cxxKinetics from struct kinetics
//
:
cxxNumKeyword(),
totals(kinetics_ptr->totals)
{
int i;
this->set_description(kinetics_ptr->description);
n_user = kinetics_ptr->n_user;
n_user_end = kinetics_ptr->n_user_end;
step_divide = kinetics_ptr->step_divide;
rk = kinetics_ptr->rk;
bad_step_max = kinetics_ptr->bad_step_max;
use_cvode = (kinetics_ptr->use_cvode == TRUE);
// kinetics components
for (i = 0; i < kinetics_ptr->count_comps; i++) {
cxxKineticsComp ec(&(kinetics_ptr->comps[i]));
this->kineticsComps.push_back(ec);
}
// steps
for (i = 0; i < kinetics_ptr->count_steps; i++) {
this->steps.push_back(kinetics_ptr->steps[i]);
}
}
cxxKinetics::~cxxKinetics()
{
}
struct kinetics *cxxKinetics::cxxKinetics2kinetics()
//
// Builds a kinetics structure from instance of cxxKinetics
//
{
struct kinetics *kinetics_ptr = kinetics_alloc();
kinetics_ptr->description = this->get_description();
kinetics_ptr->n_user = this->n_user;
kinetics_ptr->n_user_end = this->n_user_end;
kinetics_ptr->step_divide = this->step_divide;
kinetics_ptr->rk = this->rk;
kinetics_ptr->bad_step_max = this->bad_step_max;
kinetics_ptr->use_cvode = (int) this->use_cvode;
// totals
kinetics_ptr->totals = this->totals.elt_list();
// comps
kinetics_ptr->count_comps = this->kineticsComps.size();
kinetics_ptr->comps = (struct kinetics_comp *) free_check_null(kinetics_ptr->comps);
kinetics_ptr->comps = cxxKineticsComp::cxxKineticsComp2kinetics_comp(this->kineticsComps);
// steps
kinetics_ptr->count_steps = this->steps.size();
kinetics_ptr->steps = (double *) free_check_null(kinetics_ptr->steps);
if (this->steps.size() > 0) {
kinetics_ptr->steps = (double *) PHRQ_malloc((size_t) (this->steps.size() * sizeof(double)));
if (kinetics_ptr->steps == NULL) malloc_error();
std::copy(this->steps.begin(), this->steps.end(), kinetics_ptr->steps);
/*
int i = 0;
for (std::vector<double>::iterator it = this->steps.begin(); it != this->steps.end(); it++) {
kinetics_ptr->steps[i] = *it;
}
*/
}
return(kinetics_ptr);
}
#ifdef SKIP
void cxxKinetics::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing kinetics message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Kinetics element and attributes
s_oss << indent0;
s_oss << "<kinetics " << std::endl;
s_oss << indent1;
s_oss << "pitzer_kinetics_gammas=\"" << this->pitzer_kinetics_gammas << "\"" << std::endl;
// components
s_oss << indent1;
s_oss << "<component " << std::endl;
for (std::list<cxxKineticsComp>::const_iterator it = kineticsComps.begin(); it != kineticsComps.end(); ++it) {
it->dump_xml(s_oss, indent + 2);
}
return;
}
#endif
void cxxKinetics::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing kinetics message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Kinetics element and attributes
s_oss << indent0;
s_oss << "KINETICS_RAW " << this->n_user << " " << this->description << std::endl;
s_oss << indent1;
s_oss << "-step_divide " << this->step_divide << std::endl;
s_oss << indent1;
s_oss << "-rk " << this->rk << std::endl;
s_oss << indent1;
s_oss << "-bad_step_max " << this->bad_step_max << std::endl;
s_oss << indent1;
s_oss << "-use_cvode " << this->use_cvode << std::endl;
// kineticsComps structures
for (std::list<cxxKineticsComp>::const_iterator it = kineticsComps.begin(); it != kineticsComps.end(); ++it) {
s_oss << indent1;
s_oss << "-component" << std::endl;
it->dump_raw(s_oss, indent + 2);
}
// totals
s_oss << indent1;
s_oss << "-totals " << std::endl;
this->totals.dump_raw(s_oss, indent + 2);
// steps
s_oss << indent1;
s_oss << "-steps " << std::endl;
{
int i = 0;
s_oss << indent2;
for (std::vector<double>::const_iterator it = this->steps.begin(); it != this->steps.end(); it++) {
if (i++ == 5) {
s_oss << std::endl;
s_oss << indent2;
i = 0;
}
s_oss << *it << " ";
}
s_oss << std::endl;
}
return;
}
void cxxKinetics::read_raw(CParser& parser)
{
double d;
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(15);
vopts.push_back("step_divide");
vopts.push_back("rk");
vopts.push_back("bad_step_max");
vopts.push_back("use_cvode");
vopts.push_back("component");
vopts.push_back("totals");
vopts.push_back("steps");
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
bool useLastLine(false);
// Read kinetics number and description
this->read_number_description(parser);
opt_save = CParser::OPT_ERROR;
bool step_divide_defined(false);
bool rk_defined(false);
bool bad_step_max_defined(false);
bool use_cvode_defined(false);
for (;;)
{
int opt;
if (useLastLine == false) {
opt = parser.get_option(vopts, next_char);
} else {
opt = parser.getOptionFromLastLine(vopts, next_char);
}
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_EOF;
parser.error_msg("Unknown input in KINETICS_COMP_RAW keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
useLastLine = false;
break;
case 0: // step_divide
if (!(parser.get_iss() >> this->step_divide))
{
this->step_divide = 1.0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for step_divide.", CParser::OT_CONTINUE);
}
step_divide_defined = true;
useLastLine = false;
break;
case 1: // rk
if (!(parser.get_iss() >> this->rk))
{
this->rk = 3;
parser.incr_input_error();
parser.error_msg("Expected integer value for rk.", CParser::OT_CONTINUE);
}
rk_defined = true;
useLastLine = false;
break;
case 2: // bad_step_max
if (!(parser.get_iss() >> this->bad_step_max))
{
this->bad_step_max = 500;
parser.incr_input_error();
parser.error_msg("Expected integer value for bad_step_max.", CParser::OT_CONTINUE);
}
bad_step_max_defined = true;
useLastLine = false;
break;
case 3: // use_cvode
if (!(parser.get_iss() >> this->use_cvode))
{
this->use_cvode = false;
parser.incr_input_error();
parser.error_msg("Expected boolean value for use_cvode.", CParser::OT_CONTINUE);
}
use_cvode_defined = true;
useLastLine = false;
break;
case 4: // component
{
cxxKineticsComp kc;
kc.read_raw(parser);
this->kineticsComps.push_back(kc);
}
useLastLine = true;
break;
case 5: // totals
if ( this->totals.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected element name and molality for KineticsComp totals.", CParser::OT_CONTINUE);
}
opt_save = 5;
useLastLine = false;
case 6: // steps
while (parser.copy_token(token, next_char) == CParser::TT_DIGIT) {
//sscanf(token.c_str(), "%lf", &d);
//this->steps.push_back(d);
std::istringstream iss(token);
if (!(iss >> d)) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for steps.", CParser::OT_CONTINUE);
} else {
this->steps.push_back(d);
}
}
opt_save = 6;
useLastLine = false;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
if (step_divide_defined == false) {
parser.incr_input_error();
parser.error_msg("Step_divide not defined for KINETICS_RAW input.", CParser::OT_CONTINUE);
}
if (rk_defined == false) {
parser.incr_input_error();
parser.error_msg("Rk not defined for KINETICS_RAW input.", CParser::OT_CONTINUE);
}
if (bad_step_max_defined == false) {
parser.incr_input_error();
parser.error_msg("Bad_step_max not defined for KINETICS_RAW input.", CParser::OT_CONTINUE);
}
if (use_cvode_defined == false) {
parser.incr_input_error();
parser.error_msg("Use_cvode not defined for KINETICS_RAW input.", CParser::OT_CONTINUE);
}
}
#ifdef SKIP
cxxKinetics& cxxKinetics::read(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(11);
vopts.push_back("temp"); // 0
vopts.push_back("temperature"); // 1
vopts.push_back("dens"); // 2
vopts.push_back("density"); // 3
vopts.push_back("units"); // 4
vopts.push_back("redox"); // 5
vopts.push_back("ph"); // 6
vopts.push_back("pe"); // 7
vopts.push_back("unit"); // 8
vopts.push_back("isotope"); // 9
vopts.push_back("water"); // 10
}
// const int count_opt_list = vopts.size();
cxxKinetics numkey;
// Read kinetics number and description
numkey.read_number_description(parser);
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
CParser::TOKEN_TYPE j;
//cxxKinetics& sol = s_map[numkey.n_user()];
int default_pe = 0;
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPTION_DEFAULT)
{
ptr = next_char;
if (parser.copy_token(token, ptr) == CParser::TT_DIGIT) {
opt = 9;
}
}
switch (opt)
{
case CParser::OPTION_EOF:
break;
case CParser::OPTION_KEYWORD:
break;
case CParser::OPTION_ERROR:
opt = CParser::OPTION_EOF;
parser.error_msg("Unknown input in KINETICS keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // temp
case 1: // temperature
if (!(parser.get_iss() >> sol.tc))
{
sol.tc = 25;
}
break;
case 2: // dens
case 3: // density
parser.get_iss() >> sol.density;
break;
case 4: // units
case 8: // unit
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.check_units(token, false, false, sol.units, true) == CParser::OK) {
sol.units = token;
} else {
parser.incr_input_error();
}
break;
case 5: // redox
if (parser.copy_token(token, next_char) == CParser::TT_EMPTY) break;
if (parser.parse_couple(token) == CParser::OK) {
default_pe = cxxPe_Data::store(sol.pe, token);
} else {
parser.incr_input_error();
}
break;
case 6: // ph
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.ph = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("H(1)");
sol.add(conc);
}
break;
case 7: // pe
{
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
break;
}
sol.kinetics_pe = conc.get_input_conc();
if (conc.get_equation_name().empty()) {
break;
}
conc.set_description("E");
sol.add(conc);
}
break;
case 9: // isotope
{
cxxIsotope isotope;
if (isotope.read(parser) == cxxIsotope::OK) {
sol.add(isotope);
}
}
break;
case 10: // water
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) {
sol.mass_water = 1.0;
} else if (j != CParser::TT_DIGIT) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for mass of water in kinetics.", CParser::OT_CONTINUE);
} else {
std::istringstream(token) >> sol.mass_water;
}
break;
case CParser::OPTION_DEFAULT:
{
// Read concentration
cxxConc conc;
if (conc.read(parser, sol) == cxxConc::ERROR) {
parser.incr_input_error();
} else {
sol.add(conc);
}
}
break;
}
if (opt == CParser::OPTION_EOF || opt == CParser::OPTION_KEYWORD) break;
}
#ifdef SKIP
//
// Sort totals by description
//
std::sort(sol.totals.begin(), sol.totals.end());
#endif
//
// fix up default units and default pe
//
std::string token1;
std::vector<cxxConc>::iterator iter = sol.totals.begin();
for (; iter != sol.totals.end(); ++iter)
{
token = (*iter).get_description();
Utilities::str_tolower(token);
if ((*iter).get_units().empty()) {
(*iter).set_units(sol.units);
} else {
bool alk = false;
if (token.find("alk") == 0) alk = true;
token1 = (*iter).get_units();
if (parser.check_units(token1, alk, true, sol.get_units(), true) == CParser::ERROR) {
parser.incr_input_error();
} else {
(*iter).set_units(token1);
}
}
if ((*iter).get_n_pe() < 0) {
(*iter).set_n_pe(default_pe);
}
}
sol.default_pe = default_pe;
return sol;
}
#endif

51
KineticsCxx.h Normal file
View File

@ -0,0 +1,51 @@
#if !defined(KINETICS_H_INCLUDED)
#define KINETICS_H_INCLUDED
#include "NumKeyword.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
#include "KineticsComp.h"
class cxxKinetics : public cxxNumKeyword
{
public:
cxxKinetics();
cxxKinetics(struct kinetics *);
~cxxKinetics();
struct kinetics *cxxKinetics2kinetics();
struct kinetics_comp *cxxKineticsComp2kinetics_comp();
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
bool get_related_phases(void);
bool get_related_rate(void);
protected:
std::list<cxxKineticsComp> kineticsComps;
std::vector<double> steps;
cxxNameDouble totals;
double step_divide;
int rk;
int bad_step_max;
bool use_cvode;
public:
//static std::map<int, cxxKinetics>& map;
};
#endif // !defined(KINETICS_H_INCLUDED)

348
Makefile Normal file
View File

@ -0,0 +1,348 @@
#
# Make file for PHREEQC
#
# $(CURDIR) is current directory
TOPDIR:=$(CURDIR)/..
PROGRAM=phreeqcsax
EXE=$(TOPDIR)/bin/$(PROGRAM)
EXE=$(PROGRAM)
SRC:=$(CURDIR)
# Do not print commands before executing
#.SILENT:
# Provides compatibility with GNU make
#.SUFFIXES:
# Change to pawd if using automounter
PWD=pwd
# Change to C compiler on your system
CC=gcc
USE_XML=TRUE
XERCESCROOT=/z/parkplace/home/dlpark/packages/xerces-c-src_2_7_0
# Change to C compiler options on your system
ifdef OPTIMIZE
CCFLAGS=-O3 -Wall -ansi -pedantic -I${XERCESCROOT}/include # -frounding-math # -pg
CCFLAGS_MODEL=-O2 -Wall -ansi -pedantic # -pg
else
CCFLAGS=-g -Wall -ansi -pedantic -I${XERCESCROOT}/include # -frounding-math # -pg
CCFLAGS_MODEL=-g -Wall -ansi -pedantic # -pg
endif
# Remove the following definition if you do not have
# gmp (Gnu Multiple Precision) package on your system
INVERSE_CL1MP=TRUE
LOADFLAGS= -lm -lxerces-c # -pg
PLATFORM= LINUX
CXX= g++ -c -D${PLATFORM} -D_REENTRANT -fpic
ifdef OPTIMIZE
CXXFLAGS= -O3
else
CXXFLAGS= -Wall -g
endif
LINK= g++ -D${PLATFORM} -fpic
PLATFORM_LIB_LINK_OPTIONS=-L/usr/lib -L/usr/local/lib
EXTRA_LINK_OPTIONS=-lc
LIBRARY_NAMES= -lxerces-c
LIBRARY_SEARCH_PATHS= -L${XERCESCROOT}/lib # -L/home/dlpark/lib #
INCLUDES= -I${XERCESCROOT}/include
#.c.o :
# ${CC} ${CCFLAGS} -c -o $@ $<
#%.o : $(SRC)/%.c
# ${CC} ${CCFLAGS} -c -o $@ $<
%.o : $(SRC)/%.cpp
${CXX} ${CXXFLAGS} $(INCLUDES) -c -o $@ $<
%.o : $(SRC)/%.cxx
${CXX} ${CXXFLAGS} $(INCLUDES) -c -o $@ $<
# Location to copy scripts on installation
BINDIR=$(HOME)/bin
OBJECTS= main.o \
advection.o \
basic.o \
basicsubs.o \
cl1.o \
input.o \
integrate.o \
inverse.o \
isotopes.o \
kinetics.o \
mainsubs.o \
output.o \
model.o \
p2clib.o \
parse.o \
phreeqc_files.o \
phqalloc.o \
prep.o \
print.o \
read.o \
readtr.o \
spread.o \
step.o \
structures.o \
tally.o \
tidy.o \
transport.o \
utilities.o \
cvdense.o \
cvode.o \
dense.o \
nvector.o \
nvector_serial.o \
smalldense.o \
sundialsmath.o \
dw.o \
pitzer.o \
pitzer_structures.o \
CLASS_OBJECTS= Conc.o \
Exchange.o \
ExchComp.o \
GasPhase.o \
ISolution.o \
Isotope.o \
KineticsCxx.o \
KineticsComp.o \
Mix.o \
NameDouble.o \
NumKeyword.o \
Parser.o \
PPassemblage.o \
PPassemblageComp.o \
Reaction.o \
ReadClass.o \
Solution.o \
SSassemblage.o \
SSassemblageSS.o \
Surface.o \
SurfComp.o \
SurfCharge.o \
Temperature.o \
Utils.o
OBJECTS += $(CLASS_OBJECTS)
ifdef USE_XML
OBJECTS += SAXPhreeqc.o
endif
ifdef INVERSE_CL1MP
LOADFLAGS += /z/parkplace/usr/lib/libgmp.a
CCFLAGS += -DINVERSE_CL1MP
CXXFLAGS += -DINVERSE_CL1MP
OBJECTS += cl1mp.o
endif
all: $(EXE)
install:
#
# Create directory for binary and scripts if necessary
#
if [ ! -d $(BINDIR) ]; \
then \
mkdir $(BINDIR); \
echo Created directory $(BINDIR); \
fi
#
# Put path name of current directory into script for
# locating data files, put script in top directory,
# put symbolic link in BINDIR
#
cd $(TOPDIR); dir1=`$(PWD)`/bin; cd $(BINDIR); if [ `$(PWD)` = $$dir1 ]; \
then \
echo "Can not install to $(BINDIR). Choose another directory."; \
exit 4 ; \
fi
cd $(TOPDIR); \
rm -f $(BINDIR)/$(PROGRAM); \
rm -f $(PROGRAM); \
sed "s?TOPDIR=.\{0,80\}?TOPDIR=`$(PWD)`?" bin/$(PROGRAM).orig > $(PROGRAM); \
chmod 755 $(PROGRAM)
cd $(TOPDIR); dir1=`$(PWD)`; cd $(BINDIR); if [ `$(PWD)` != $$dir1 ]; then \
ln -s $$dir1/$(PROGRAM) $(BINDIR); \
echo Symbolic link for $(PROGRAM) has been placed in $(BINDIR). ; \
fi
#
# Check that all necessary files are in place.
#
if [ -f $(BINDIR)/$(PROGRAM) -a \
-f $(TOPDIR)/bin/$(PROGRAM) -a \
-f $(TOPDIR)/$(PROGRAM) ]; \
then echo "Installation complete."; \
else echo "Installation incomplete."; \
for FILE in $(BINDIR)/$(PROGRAM) \
$(TOPDIR)/bin/$(PROGRAM) $(TOPDIR)/$(PROGRAM) ; \
do \
if [ ! -f $$FILE ]; then echo $$FILE is missing.; fi; \
done; \
fi
echo "Add directory $(BINDIR) to PATH."
clean:
rm -f $(BINDIR)/$(PROGRAM)
rm -f $(TOPDIR)/bin/$(PROGRAM)
rm -f $(TOPDIR)/src/*.o
rm -f $(SUN_DIR)/bin/$(PROGRAM)
rm -f $(SUN_DIR)/src/*.o
rm -f $(TOPDIR)/src/$(PROGRAM)
rm -f $(DEBUG_DIR)/src/*.o
echo Removed object and executable files generated by make.
$(EXE): $(OBJECTS)
echo $(TOPDIR)
ifdef USE_XML
${LINK} ${PLATFORM_LIB_LINK_OPTIONS} ${OBJECTS} -o $(EXE) ${LIBRARY_SEARCH_PATHS} ${LIBRARY_NAMES} ${EXTRA_LINK_OPTIONS} ${LOADFLAGS}
else
$(CC) -o $(EXE) $(OBJECTS) $(LOADFLAGS) # -L/z/estespark/home/dlpark/packages/efence -lefence
endif
echo Compilation complete, $(EXE).
advection.o: $(SRC)/advection.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
basic.o: $(SRC)/basic.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/p2c.h
basicsubs.o: $(SRC)/basicsubs.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
cl1.o: $(SRC)/cl1.cpp $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqtype.h
cl1mp.o: $(SRC)/cl1mp.cpp $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqtype.h
cvdense.o: $(SRC)/cvdense.cpp $(SRC)/cvdense.h $(SRC)/cvode.h $(SRC)/sundialstypes.h $(SRC)/phrqtype.h $(SRC)/nvector.h $(SRC)/dense.h $(SRC)/smalldense.h $(SRC)/sundialsmath.h $(SRC)/output.h $(SRC)/phqalloc.h
cvode.o: $(SRC)/cvode.cpp $(SRC)/cvode.h $(SRC)/sundialstypes.h $(SRC)/phrqtype.h $(SRC)/nvector.h $(SRC)/sundialsmath.h $(SRC)/output.h $(SRC)/kinetics.h $(SRC)/phqalloc.h
dense.o: $(SRC)/dense.cpp $(SRC)/sundialstypes.h $(SRC)/phrqtype.h $(SRC)/sundialsmath.h $(SRC)/dense.h $(SRC)/smalldense.h $(SRC)/output.h $(SRC)/phqalloc.h
input.o: $(SRC)/input.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/input.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/phqalloc.h
integrate.o: $(SRC)/integrate.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
inverse.o: $(SRC)/inverse.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
isotopes.o: $(SRC)/isotopes.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
kinetics.o: $(SRC)/kinetics.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/sundialstypes.h $(SRC)/cvode.h $(SRC)/nvector.h $(SRC)/cvdense.h $(SRC)/dense.h $(SRC)/smalldense.h $(SRC)/nvector_serial.h $(SRC)/kinetics.h
main.o: $(SRC)/main.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/input.h
mainsubs.o: $(SRC)/mainsubs.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/input.h
model.o: $(SRC)/model.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
${CC} $(SRC)/model.cpp ${CCFLAGS_MODEL} -c -o model.o #-ffloat-store
nvector.o: $(SRC)/nvector.cpp $(SRC)/nvector.h $(SRC)/sundialstypes.h $(SRC)/phrqtype.h $(SRC)/output.h
nvector_serial.o: $(SRC)/nvector_serial.cpp $(SRC)/nvector_serial.h $(SRC)/nvector.h $(SRC)/sundialstypes.h $(SRC)/phrqtype.h $(SRC)/sundialsmath.h $(SRC)/output.h $(SRC)/phqalloc.h
output.o: $(SRC)/output.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/phqalloc.h
p2clib.o: $(SRC)/p2clib.cpp $(SRC)/p2c.h $(SRC)/output.h
parse.o: $(SRC)/parse.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
phqalloc.o: $(SRC)/phqalloc.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/output.h
phreeqc_files.o: $(SRC)/phreeqc_files.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/input.h
pitzer.o: $(SRC)/pitzer.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/pitzer.h
dw.o: $(SRC)/dw.cpp $(SRC)/pitzer.h
pitzer_structures.o: $(SRC)/pitzer_structures.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h $(SRC)/pitzer.h
prep.o: $(SRC)/prep.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
prep.o: $(SRC)/prep.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
print.o: $(SRC)/print.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
read.o: $(SRC)/read.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
readtr.o: $(SRC)/readtr.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
SAXPhreeqc.o: $(SRC)/SAXPhreeqc.cpp $(SRC)/SAXPhreeqc.h $(SRC)/SaxPhreeqcHandlers.h
${CXX} ${CXXFLAGS} $(INCLUDES) -o SAXPhreeqc.o $(SRC)/SAXPhreeqc.cpp
smalldense.o: $(SRC)/smalldense.cpp $(SRC)/smalldense.h $(SRC)/sundialstypes.h $(SRC)/phrqtype.h $(SRC)/sundialsmath.h $(SRC)/output.h $(SRC)/phqalloc.h
spread.o: $(SRC)/spread.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
step.o: $(SRC)/step.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
structures.o: $(SRC)/structures.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
sundialsmath.o: $(SRC)/sundialsmath.cpp $(SRC)/sundialsmath.h $(SRC)/sundialstypes.h $(SRC)/phrqtype.h $(SRC)/output.h
tally.o: $(SRC)/tally.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
tidy.o: $(SRC)/tidy.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
transport.o: $(SRC)/transport.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
utilities.o: $(SRC)/utilities.cpp $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/output.h $(SRC)/phrqproto.h
Conc.o: $(SRC)/Conc.cxx $(SRC)/Conc.h $(SRC)/Utils.h $(SRC)/char_star.h $(SRC)/ISolution.h $(SRC)/NumKeyword.h \
$(SRC)/Parser.h $(SRC)/Solution.h $(SRC)/Isotope.h $(SRC)/NameDouble.h $(SRC)/global.h $(SRC)/phrqtype.h \
$(SRC)/phrqproto.h $(SRC)/phqalloc.h
Exchange.o: $(SRC)/Exchange.cxx $(SRC)/Utils.h $(SRC)/Exchange.h $(SRC)/NumKeyword.h Parser.h \
$(SRC)/char_star.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/ExchComp.h $(SRC)/NameDouble.h $(SRC)/phqalloc.h \
$(SRC)/phrqproto.h
ExchComp.o: $(SRC)/ExchComp.cxx $(SRC)/Utils.h $(SRC)/ExchComp.h $(SRC)/NameDouble.h $(SRC)/global.h \
$(SRC)/phrqtype.h $(SRC)/char_star.h $(SRC)/Parser.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
GasPhase.o: $(SRC)/GasPhase.cxx $(SRC)/Utils.h $(SRC)/GasPhase.h $(SRC)/NumKeyword.h $(SRC)/Parser.h \
$(SRC)/char_star.h $(SRC)/NameDouble.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
ISolution.o: $(SRC)/ISolution.cxx $(SRC)/ISolution.h $(SRC)/NumKeyword.h $(SRC)/Parser.h $(SRC)/char_star.h \
$(SRC)/Solution.h $(SRC)/Isotope.h $(SRC)/Conc.h $(SRC)/Utils.h $(SRC)/NameDouble.h $(SRC)/global.h $(SRC)/phrqtype.h \
$(SRC)/phqalloc.h $(SRC)/phrqproto.h
Isotope.o: $(SRC)/Isotope.cxx $(SRC)/Isotope.h $(SRC)/Parser.h $(SRC)/char_star.h $(SRC)/Utils.h $(SRC)/global.h \
$(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
KineticsComp.o: $(SRC)/KineticsComp.cxx $(SRC)/Utils.h $(SRC)/KineticsComp.h $(SRC)/NameDouble.h \
$(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/char_star.h $(SRC)/Parser.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
KineticsCxx.o: $(SRC)/KineticsCxx.cxx $(SRC)/Utils.h $(SRC)/KineticsCxx.h $(SRC)/NumKeyword.h $(SRC)/Parser.h \
$(SRC)/char_star.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/KineticsComp.h $(SRC)/NameDouble.h $(SRC)/phqalloc.h \
$(SRC)/phrqproto.h
Mix.o: $(SRC)/Mix.cxx $(SRC)/Utils.h $(SRC)/Mix.h $(SRC)/NumKeyword.h $(SRC)/Parser.h $(SRC)/char_star.h $(SRC)/global.h \
$(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
NameDouble.o: $(SRC)/NameDouble.cxx $(SRC)/Utils.h $(SRC)/Conc.h $(SRC)/char_star.h $(SRC)/NameDouble.h \
$(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/Parser.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
NumKeyword.o: $(SRC)/NumKeyword.cxx $(SRC)/NumKeyword.h $(SRC)/Parser.h $(SRC)/char_star.h
Reaction.o: $(SRC)/Reaction.cxx $(SRC)/Utils.h $(SRC)/Reaction.h $(SRC)/NumKeyword.h $(SRC)/Parser.h \
$(SRC)/char_star.h $(SRC)/NameDouble.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
ReadClass.o: $(SRC)/ReadClass.cpp
Parser.o: $(SRC)/Parser.cxx $(SRC)/Parser.h $(SRC)/char_star.h $(SRC)/Utils.h
PPassemblageComp.o: $(SRC)/PPassemblageComp.cxx $(SRC)/Utils.h $(SRC)/NameDouble.h \
$(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/char_star.h $(SRC)/Parser.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
PPassemblage.o: $(SRC)/PPassemblage.cxx $(SRC)/Utils.h $(SRC)/PPassemblage.h $(SRC)/NumKeyword.h \
$(SRC)/Parser.h $(SRC)/char_star.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/PPassemblageComp.h \
$(SRC)/NameDouble.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
Solution.o: $(SRC)/Solution.cxx $(SRC)/Utils.h $(SRC)/Solution.h $(SRC)/NumKeyword.h $(SRC)/Parser.h \
$(SRC)/char_star.h $(SRC)/Isotope.h $(SRC)/Conc.h $(SRC)/NameDouble.h $(SRC)/global.h $(SRC)/phrqtype.h \
$(SRC)/phqalloc.h $(SRC)/phrqproto.h $(SRC)/ISolution.h
SSassemblage.o: $(SRC)/SSassemblage.cxx $(SRC)/Utils.h $(SRC)/SSassemblage.h $(SRC)/NumKeyword.h \
$(SRC)/Parser.h $(SRC)/char_star.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/SSassemblageSS.h \
$(SRC)/NameDouble.h $(SRC)/SSassemblageSS.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
SSassemblageSS.o: $(SRC)/SSassemblageSS.cxx $(SRC)/Utils.h $(SRC)/SSassemblageSS.h \
$(SRC)/NameDouble.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/char_star.h $(SRC)/Parser.h $(SRC)/phqalloc.h \
$(SRC)/phrqproto.h
Surface.o: $(SRC)/Surface.cxx $(SRC)/Utils.h $(SRC)/Surface.h $(SRC)/NumKeyword.h $(SRC)/Parser.h \
$(SRC)/char_star.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/SurfComp.h $(SRC)/NameDouble.h $(SRC)/phqalloc.h \
$(SRC)/phrqproto.h
SurfComp.o: $(SRC)/SurfComp.cxx $(SRC)/Utils.h $(SRC)/SurfComp.h $(SRC)/NameDouble.h $(SRC)/global.h \
$(SRC)/phrqtype.h $(SRC)/char_star.h $(SRC)/Parser.h $(SRC)/phqalloc.h $(SRC)/phrqproto.h
Temperature.o: $(SRC)/Temperature.cxx $(SRC)/Utils.h $(SRC)/Temperature.h $(SRC)/NumKeyword.h \
$(SRC)/Parser.h $(SRC)/char_star.h $(SRC)/NameDouble.h $(SRC)/global.h $(SRC)/phrqtype.h $(SRC)/phqalloc.h \
$(SRC)/phrqproto.h
Utils.o: $(SRC)/Utils.cxx $(SRC)/Utils.h $(SRC)/Parser.h $(SRC)/char_star.h
-include $(SRC)/distribution.mk

200
Mix.cxx Normal file
View File

@ -0,0 +1,200 @@
// Mix.cxx: implementation of the cxxMix class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "Mix.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxMix::cxxMix()
//
// default constructor for cxxMix
//
: cxxNumKeyword()
{
}
cxxMix::cxxMix(struct mix *mix_ptr)
//
// constructor for cxxMix from struct mix
//
:
cxxNumKeyword()
{
int i;
this->set_description(mix_ptr->description);
this->n_user = mix_ptr->n_user;
this->n_user_end = mix_ptr->n_user_end;
// comps
if (mix_ptr->count_comps > 0) {
for (i = 0; i < mix_ptr->count_comps; i++) {
this->mixComps[mix_ptr->comps[i].n_solution] = mix_ptr->comps[i].fraction;
}
}
}
cxxMix::~cxxMix()
{
}
struct mix *cxxMix::cxxMix2mix()
//
// Builds a mix structure from instance of cxxMix
//
{
struct mix *mix_ptr;
mix_ptr = (struct mix *) PHRQ_malloc(sizeof (struct mix));
if (mix_ptr == NULL) malloc_error();
mix_ptr->description = this->get_description();
mix_ptr->n_user = this->n_user;
mix_ptr->n_user_end = this->n_user_end;
// comps
mix_ptr->comps = NULL;
if (this->mixComps.size() > 0) {
int i = 0;
mix_ptr->comps = (struct mix_comp *) PHRQ_malloc((size_t) (this->mixComps.size() * sizeof(struct mix_comp)));
if (mix_ptr->comps == NULL) malloc_error();
for (std::map<int, double>::iterator it = mixComps.begin(); it != mixComps.end(); it++) {
mix_ptr->comps[i].n_solution = it->first;
mix_ptr->comps[i].fraction = it->second;
i++;
}
}
mix_ptr->count_comps = this->mixComps.size();
return(mix_ptr);
}
#ifdef SKIP
void cxxMix::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing mix message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Mix element and attributes
s_oss << indent0;
s_oss << "<mix " << std::endl;
s_oss << indent1;
s_oss << "pitzer_mix_gammas=\"" << this->pitzer_mix_gammas << "\"" << std::endl;
// components
s_oss << indent1;
s_oss << "<component " << std::endl;
for (std::list<cxxMixComp>::const_iterator it = mixComps.begin(); it != mixComps.end(); ++it) {
it->dump_xml(s_oss, indent + 2);
}
return;
}
#endif
void cxxMix::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing mix message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Mix element and attributes
s_oss << indent0;
s_oss << "MIX " << this->n_user << " " << this->description << std::endl;
for (std::map<int, double>::const_iterator it = this->mixComps.begin(); it != this->mixComps.end(); it++) {
s_oss << indent1 << it->first << " " << it->second << std::endl;
}
}
void cxxMix::read_raw(CParser& parser)
{
int i;
double d;
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(15);
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
bool useLastLine(false);
// Read mix number and description
this->read_number_description(parser);
opt_save = CParser::OPT_DEFAULT;
for (;;)
{
int opt;
if (useLastLine == false) {
opt = parser.get_option(vopts, next_char);
} else {
opt = parser.getOptionFromLastLine(vopts, next_char);
}
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_ERROR:
opt = CParser::OPT_EOF;
parser.error_msg("Unknown input in MIX_COMP_RAW keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
useLastLine = false;
break;
case CParser::OPT_DEFAULT: // solution number, mix fraction
if (parser.copy_token(token, next_char) != CParser::TT_EMPTY) {
std::istringstream iss(token);
if (!(iss >> i))
{
parser.incr_input_error();
parser.error_msg("Expected integer value for solution number.", CParser::OT_CONTINUE);
break;
}
if (!(parser.get_iss() >> d))
{
parser.incr_input_error();
parser.error_msg("Expected numeric value for solution fraction.", CParser::OT_CONTINUE);
break;
}
this->mixComps[i] = d;
}
opt_save = CParser::OPT_DEFAULT;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
}

39
Mix.h Normal file
View File

@ -0,0 +1,39 @@
#if !defined(MIX_H_INCLUDED)
#define MIX_H_INCLUDED
#include "NumKeyword.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
class cxxMix : public cxxNumKeyword
{
public:
cxxMix();
cxxMix(struct mix *);
~cxxMix();
struct mix *cxxMix2mix();
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
protected:
std::map<int, double> mixComps;
public:
//static std::map<int, cxxMix>& map;
};
#endif // !defined(MIX_H_INCLUDED)

259
NameDouble.cxx Normal file
View File

@ -0,0 +1,259 @@
// NameDouble.cxx: implementation of the cxxNameDouble class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "Conc.h"
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
#include <map> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxNameDouble::cxxNameDouble()
//
// default constructor for cxxNameDouble
//
{
}
cxxNameDouble::cxxNameDouble(struct elt_list *elt_list_ptr)
//
// constructor for cxxNameDouble from list of elt_list
//
{
int i;
if (elt_list_ptr != NULL) {
for (i = 0; elt_list_ptr[i].elt != NULL; i++) {
(*this)[elt_list_ptr[i].elt->name] = elt_list_ptr[i].coef;
}
}
this->type = ND_ELT_MOLES;
}
cxxNameDouble::cxxNameDouble(struct conc *tots)
//
// constructor for cxxNameDouble from list of elt_list
//
{
int i;
for (i = 0; tots[i].description != NULL; i++) {
(*this)[tots[i].description] = tots[i].moles;
}
this->type = ND_ELT_MOLES;
}
cxxNameDouble::cxxNameDouble(struct master_activity *ma, int count, cxxNameDouble::ND_TYPE)
//
// constructor for cxxNameDouble from list of elt_list
//
{
int i;
for (i = 0; i < count; i++) {
if (ma[i].description == NULL) continue;
(*this)[ma[i].description] = ma[i].la;
}
this->type = ND_SPECIES_LA;
}
cxxNameDouble::cxxNameDouble(struct name_coef *nc, int count, cxxNameDouble::ND_TYPE)
//
// constructor for cxxNameDouble from list of elt_list
//
{
int i;
for (i = 0; i < count; i++) {
if (nc[i].name == NULL) continue;
(*this)[nc[i].name] = nc[i].coef;
}
this->type = ND_NAME_COEF;
}
cxxNameDouble::~cxxNameDouble()
{
}
struct elt_list *cxxNameDouble::elt_list()
//
// Builds a exch_comp structure from instance of cxxNameDouble
//
{
assert (this->type == cxxNameDouble::ND_ELT_MOLES);
struct elt_list *elt_list_ptr = (struct elt_list *) PHRQ_malloc((size_t)((this->size() + 1) *sizeof(struct elt_list)));
if (elt_list_ptr == NULL) malloc_error();
int i = 0;
for (iterator it = this->begin(); it != this->end(); ++it) {
elt_list_ptr[i].elt = element_store(it->first);
elt_list_ptr[i].coef = it->second;
i++;
}
elt_list_ptr[i].elt = NULL;
elt_list_ptr[i].coef = 0;
return(elt_list_ptr);
}
struct master_activity *cxxNameDouble::master_activity()const
//
// Builds a list of master_activity structures from instance of cxxNameDouble
//
{
int i = 0;
assert (this->type == cxxNameDouble::ND_SPECIES_LA || this->type == cxxNameDouble::ND_SPECIES_GAMMA);
struct master_activity *master_activity_ptr = NULL;
switch ((*this).type) {
case cxxNameDouble::ND_SPECIES_LA:
{
master_activity_ptr= (struct master_activity *) PHRQ_malloc((size_t) (((*this).size() + 1) * sizeof(struct master_activity)));
if (master_activity_ptr == NULL) malloc_error();
for (const_iterator it = (*this).begin(); it != (*this).end(); it++) {
master_activity_ptr[i].description = (char *)it->first;
master_activity_ptr[i].la = it->second;
i++;
}
}
master_activity_ptr[i].description = NULL;
break;
case cxxNameDouble::ND_SPECIES_GAMMA:
{
if ((*this).size() > 0) {
master_activity_ptr = (struct master_activity *) PHRQ_malloc((size_t) (((*this).size()) * sizeof(struct master_activity)));
if (master_activity_ptr == NULL) malloc_error();
for (const_iterator it = (*this).begin(); it != (*this).end(); it++) {
master_activity_ptr[i].description = (char *)it->first;
master_activity_ptr[i].la = it->second;
i++;
}
}
}
break;
case cxxNameDouble::ND_ELT_MOLES:
case cxxNameDouble::ND_NAME_COEF:
break;
}
return(master_activity_ptr);
}
struct conc *cxxNameDouble::conc()const
// for Solutions, not ISolutions
// takes a map of (elt name, moles)
// returns list of conc structures
{
struct conc *c;
assert (this->type == cxxNameDouble::ND_ELT_MOLES);
c = (struct conc *) PHRQ_malloc((size_t) (((*this).size() + 1) * sizeof(struct conc)));
if (c == NULL) malloc_error();
int i = 0;
for (const_iterator it = (*this).begin(); it != (*this).end(); ++it) {
c[i].description = (char *)it->first;
c[i].moles = it->second;
c[i].input_conc = it->second;
c[i].units = NULL;
c[i].equation_name = NULL;
c[i].phase_si = 0.0;
c[i].n_pe = 0;
c[i].as = NULL;
c[i].gfw = 0.0;
//c[i].skip = 0;
c[i].phase = NULL;
i++;
}
c[i].description = NULL;
return(c);
}
struct name_coef *cxxNameDouble::name_coef()const
//
// Builds a name_coef structure from instance of cxxNameDouble
//
{
assert (this->type == cxxNameDouble::ND_NAME_COEF);
struct name_coef *name_coef_ptr = (struct name_coef *) PHRQ_malloc((size_t)((this->size()) *sizeof(struct name_coef)));
if (name_coef_ptr == NULL) malloc_error();
int i = 0;
for (const_iterator it = (*this).begin(); it != (*this).end(); ++it) {
name_coef_ptr[i].name = it->first;
name_coef_ptr[i].coef = it->second;
i++;
}
return(name_coef_ptr);
}
void cxxNameDouble::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing exch_comp message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
std::string xmlElement, xmlAtt1, xmlAtt2;
switch ((*this).type) {
case cxxNameDouble::ND_SPECIES_LA:
xmlElement = "<soln_m_a ";
xmlAtt1 = " m_a_desc=\"";
xmlAtt1 = " m_a_la=\"";
break;
case cxxNameDouble::ND_SPECIES_GAMMA:
xmlElement = "<soln_s_g ";
xmlAtt1 = " m_a_desc=\"";
xmlAtt1 = " m_a_la=\"";
break;
case cxxNameDouble::ND_ELT_MOLES:
xmlElement = "<soln_total ";
xmlAtt1 = " conc_desc=\"";
xmlAtt1 = " conc_moles=\"";
break;
case cxxNameDouble::ND_NAME_COEF:
xmlElement = "<NameCoef ";
xmlAtt1 = " name=\"";
xmlAtt1 = " coef=\"";
break;
}
for (const_iterator it = (*this).begin(); it != (*this).end(); it++) {
s_oss << indent0;
s_oss << xmlElement << xmlAtt1 << it->first << xmlAtt2 << it->second << "/>" << std::endl;
}
}
void cxxNameDouble::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing exch_comp message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for (const_iterator it = (*this).begin(); it != (*this).end(); it++) {
s_oss << indent0;
s_oss << it->first << " " << it->second << std::endl;
}
}
CParser::STATUS_TYPE cxxNameDouble::read_raw(CParser& parser, std::istream::pos_type& pos)
{
std::string token;
char * ctoken;
double d;
CParser::TOKEN_TYPE j;
//m_line_iss.seekg(pos);
j = parser.copy_token(token, pos);
if (j == CParser::TT_EMPTY) return CParser::PARSER_OK;
if( !(parser.get_iss() >> d)) {
return CParser::PARSER_ERROR;
}
ctoken = string_hsave(token.c_str());
(*this)[ctoken] = d;
return CParser::PARSER_OK;
}

57
NameDouble.h Normal file
View File

@ -0,0 +1,57 @@
#if !defined(NAMEDOUBLE_H_INCLUDED)
#define NAMEDOUBLE_H_INCLUDED
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
#include "Parser.h"
class cxxNameDouble : public std::map <char *, double, CHARSTAR_LESS>
{
public:
enum ND_TYPE {
ND_ELT_MOLES = 1,
ND_SPECIES_LA = 2,
ND_SPECIES_GAMMA = 3,
ND_NAME_COEF = 4
};
cxxNameDouble();
cxxNameDouble(struct elt_list *);
cxxNameDouble(struct conc *);
cxxNameDouble(struct master_activity *ma, int count, ND_TYPE);
cxxNameDouble(struct name_coef *nc, int count, ND_TYPE);
~cxxNameDouble();
struct elt_list *elt_list();
struct master_activity *master_activity()const;
struct conc *conc()const;
struct name_coef *name_coef()const;
void cxxNameDouble::dump_xml(std::ostream& s_oss, unsigned int indent)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
CParser::STATUS_TYPE read_raw(CParser& parser, std::istream::pos_type& pos);
enum ND_TYPE type;
protected:
//std::map <char *, double, CHARSTAR_LESS> totals;
public:
//static std::map<int, cxxNameDouble>& map;
};
#endif // !defined(NAMEDOUBLE_H_INCLUDED)

138
NumKeyword.cxx Normal file
View File

@ -0,0 +1,138 @@
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
// NumKeyword.cxx: implementation of the cxxNumKeyword class.
//
//////////////////////////////////////////////////////////////////////
#include "NumKeyword.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxNumKeyword::cxxNumKeyword()
{
}
cxxNumKeyword::~cxxNumKeyword()
{
}
void cxxNumKeyword::dump_xml(std::ostream& os, unsigned int indent)const
{
unsigned int i;
for(i = 0; i < indent + 1; ++i) os << " ";
os << "<n_user>" << this->n_user << "</n_user>" << "\n";
for(i = 0; i < indent + 1; ++i) os << " ";
os << "<n_user_end>" << this->n_user_end << "</n_user_end>" << "\n";
for(i = 0; i < indent + 1; ++i) os << " ";
os << "<Description>" << this->description << "</Description>" << "\n";
}
void cxxNumKeyword::read_number_description(CParser& parser)
{
std::string keyword;
std::istream::pos_type ptr;
// skip keyword
parser.copy_token(keyword, ptr);
std::istream::pos_type ptr1 = ptr;
std::string::size_type pos;
std::string token;
if (parser.copy_token(token, ptr) != CParser::TT_DIGIT)
{
this->n_user = 1;
this->n_user_end = 1;
} else {
std::istringstream iss(token);
iss >> this->n_user;
this->n_user_end = this->n_user;
std::string token1;
iss >> token1;
if ( (pos = token1.find_first_of("-")) != std::string::npos ) {
token1.replace(pos, 1, " ");
std::istringstream iss1(token1);
iss1 >> this->n_user_end;
// ptr1 = ptr;
}
}
/*
else if ( (pos = token.find_first_of("-")) != std::string::npos )
{
token.replace(pos, 1, " ");
std::istringstream iss(token);
if (!(iss >> this->n_user >> this->n_user_end))
{
std::ostringstream err_oss;
if (parser.next_keyword() >= 0)
{
err_oss << "Reading number range for " << keyword << ".";
}
else
{
err_oss << "Reading number range for keyword.";
}
parser.error_msg(err_oss, CParser::OT_CONTINUE);
parser.incr_input_error();
}
ptr1 = ptr;
}
else
{
std::istringstream iss(token);
iss >> this->n_user;
this->n_user_end = this->n_user;
ptr1 = ptr;
}
*/
// reset get position
//parser.get_iss().seekg(ptr1);
// skip whitespace
while (::isspace(parser.get_iss().peek())) parser.get_iss().ignore();
// copy description
std::getline(parser.get_iss(), this->description);
}
void cxxNumKeyword::read_number_description(std::istream& is)
{
// KEYWORD [[1[-20]] [This is the description]]
// eat keyword
std::string token;
is >> token;
// skip whitespace
while (::isspace(is.peek())) is.ignore();
if (::isdigit(is.peek()))
{
is >> this->n_user;
char ch = is.peek();
if (ch == '-')
{
is >> ch; // eat '-'
is >> this->n_user_end;
}
else
{
this->n_user_end = this->n_user;
}
}
else
{
this->n_user = this->n_user_end = 1;
}
while (::isspace(is.peek())) is.ignore();
std::getline(is, this->description);
}

43
NumKeyword.h Normal file
View File

@ -0,0 +1,43 @@
#if !defined(NUMKEYWORD_H_INCLUDED)
#define NUMKEYWORD_H_INCLUDED
#include "Parser.h"
#include <ostream> // std::ostream
#include <string> // std::string
//#define EXTERNAL extern
//#include "global.h"
//#include "phrqproto.h"
extern char *string_duplicate(const char *);
class cxxNumKeyword
{
public:
cxxNumKeyword();
virtual ~cxxNumKeyword();
char * get_description()const { return string_duplicate(this->description.c_str()); }
void set_description(std::string str) { this->description = str; }
void set_description(char * str) { if (str != NULL) this->description = str; }
int get_n_user()const { return this->n_user; }
void set_n_user(int user) { this->n_user = user; }
int get_n_user_end()const { return this->n_user_end; }
void set_n_user_end(int user_end) { this->n_user_end = user_end; }
bool operator<(const cxxNumKeyword& key)const { return (this->n_user < key.n_user); }
virtual void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void read_number_description(CParser& parser);
protected:
int n_user;
int n_user_end;
std::string description;
private:
void read_number_description(std::istream& is);
};
#endif // !defined(NUMKEYWORD_H_INCLUDED)

191
PPassemblage.cxx Normal file
View File

@ -0,0 +1,191 @@
// PPassemblage.cxx: implementation of the cxxPPassemblage class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "PPassemblage.h"
#include "PPassemblageComp.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxPPassemblage::cxxPPassemblage()
//
// default constructor for cxxPPassemblage
//
: cxxNumKeyword()
{
eltList.type = cxxNameDouble::ND_ELT_MOLES;
}
cxxPPassemblage::cxxPPassemblage(struct pp_assemblage *pp_assemblage_ptr)
//
// constructor for cxxPPassemblage from struct PPassemblage
//
:
cxxNumKeyword(),
eltList(pp_assemblage_ptr->next_elt)
{
int i;
this->set_description(pp_assemblage_ptr->description);
n_user = pp_assemblage_ptr->n_user;
n_user_end = pp_assemblage_ptr->n_user_end;
for (i = 0; i < pp_assemblage_ptr->count_comps; i++) {
cxxPPassemblageComp ppComp(&(pp_assemblage_ptr->pure_phases[i]));
ppAssemblageComps.push_back(ppComp);
}
}
cxxPPassemblage::~cxxPPassemblage()
{
}
struct pp_assemblage *cxxPPassemblage::cxxPPassemblage2pp_assemblage()
//
// Builds a pp_assemblage structure from instance of cxxPPassemblage
//
{
struct pp_assemblage *pp_assemblage_ptr = pp_assemblage_alloc();
pp_assemblage_ptr->description = this->get_description();
pp_assemblage_ptr->n_user = this->n_user;
pp_assemblage_ptr->n_user_end = this->n_user_end;
pp_assemblage_ptr->new_def = FALSE;
pp_assemblage_ptr->count_comps = this->ppAssemblageComps.size();
pp_assemblage_ptr->pure_phases = (struct pure_phase *) free_check_null(pp_assemblage_ptr->pure_phases);
pp_assemblage_ptr->pure_phases = cxxPPassemblageComp::cxxPPassemblageComp2pure_phase(this->ppAssemblageComps);
pp_assemblage_ptr->next_elt = this->eltList.elt_list();
return(pp_assemblage_ptr);
}
void cxxPPassemblage::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing PPassemblage message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// PPassemblage element and attributes
s_oss << indent0;
s_oss << "<EQUILIBRIUM_PHASES " << std::endl;
// eltList
this->eltList.dump_xml(s_oss, indent + 1);
// ppAssemblageComps
s_oss << indent1;
s_oss << "<pure_phases " << std::endl;
for (std::list<cxxPPassemblageComp>::const_iterator it = ppAssemblageComps.begin(); it != ppAssemblageComps.end(); ++it) {
it->dump_xml(s_oss, indent + 2);
}
}
void cxxPPassemblage::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing PPassemblage message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// PPassemblage element and attributes
s_oss << indent0;
s_oss << "EQUILIBRIUM_PHASES_RAW " << this->n_user << " " << this->description << std::endl;
// eltList
s_oss << indent1;
s_oss << "-eltList " << std::endl;
this->eltList.dump_raw(s_oss, indent + 2);
// ppAssemblagComps
for (std::list<cxxPPassemblageComp>::const_iterator it = ppAssemblageComps.begin(); it != ppAssemblageComps.end(); ++it) {
s_oss << indent1;
s_oss << "-component" << std::endl;
it->dump_raw(s_oss, indent + 2);
}
}
void cxxPPassemblage::read_raw(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(15);
vopts.push_back("eltlist"); // 0
vopts.push_back("component"); // 1
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
bool useLastLine(false);
// Read PPassemblage number and description
this->read_number_description(parser);
opt_save = CParser::OPT_ERROR;
for (;;)
{
int opt;
if (useLastLine == false) {
opt = parser.get_option(vopts, next_char);
} else {
opt = parser.getOptionFromLastLine(vopts, next_char);
}
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_EOF;
parser.error_msg("Unknown input in EQUILIBRIUM_PHASES_RAW keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
useLastLine = false;
break;
case 0: // eltList
if ( this->eltList.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected element name and moles for totals.", CParser::OT_CONTINUE);
}
opt_save = 0;
break;
case 1: // component
{
cxxPPassemblageComp ppComp;
ppComp.read_raw(parser);
this->ppAssemblageComps.push_back(ppComp);
}
useLastLine = true;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
}

43
PPassemblage.h Normal file
View File

@ -0,0 +1,43 @@
#if !defined(PPASSEMBLAGE_H_INCLUDED)
#define PPASSEMBLAGE_H_INCLUDED
#include "NumKeyword.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
#include "PPassemblageComp.h"
class cxxPPassemblage : public cxxNumKeyword
{
public:
cxxPPassemblage();
cxxPPassemblage(struct pp_assemblage *);
~cxxPPassemblage();
struct pp_assemblage *cxxPPassemblage2pp_assemblage();
struct pure_phase *cxxPPassemblageComp2pure_phase();
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
protected:
std::list<cxxPPassemblageComp> ppAssemblageComps;
cxxNameDouble eltList;
public:
//static std::map<int, cxxPPassemblage>& map;
};
#endif // !defined(PPASSEMBLAGE_H_INCLUDED)

278
PPassemblageComp.cxx Normal file
View File

@ -0,0 +1,278 @@
// PPassemblageComp.cxx: implementation of the cxxPPassemblageComp class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "PPassemblageComp.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxPPassemblageComp::cxxPPassemblageComp()
//
// default constructor for cxxPPassemblageComp
//
{
name = NULL;
add_formula = NULL;
si = 0;
moles = 0;
delta = 0;
initial_moles = 0;
dissolve_only = false;
}
cxxPPassemblageComp::cxxPPassemblageComp(struct pure_phase *pure_phase_ptr)
//
// constructor for cxxPPassemblageComp from struct pure_phase
//
{
name = pure_phase_ptr->name;
add_formula = pure_phase_ptr->add_formula;
si = pure_phase_ptr->si;
moles = pure_phase_ptr->moles;
delta = pure_phase_ptr->delta;
initial_moles = pure_phase_ptr->initial_moles;
dissolve_only = ( pure_phase_ptr->dissolve_only == TRUE);
}
cxxPPassemblageComp::~cxxPPassemblageComp()
{
}
struct phase *cxxPPassemblageComp::get_phase() {
int i;
return phase_bsearch(this->name, &i, FALSE);
}
struct pure_phase *cxxPPassemblageComp::cxxPPassemblageComp2pure_phase(std::list<cxxPPassemblageComp>& el)
//
// Builds pure_phase structure from of cxxPPassemblageComp
//
{
struct pure_phase *pure_phase_ptr = (struct pure_phase *) PHRQ_malloc((size_t) (el.size() * sizeof(struct pure_phase)));
if (pure_phase_ptr == NULL) malloc_error();
int i = 0;
for (std::list<cxxPPassemblageComp>::iterator it = el.begin(); it != el.end(); ++it) {
pure_phase_ptr[i].phase = it->get_phase();
pure_phase_ptr[i].name = it->name;
pure_phase_ptr[i].add_formula = it->add_formula;
pure_phase_ptr[i].si = it->si;
pure_phase_ptr[i].moles = it->moles;
pure_phase_ptr[i].delta = it->delta;
pure_phase_ptr[i].initial_moles = it->initial_moles;
pure_phase_ptr[i].dissolve_only = (int) it->dissolve_only;
i++;
}
return(pure_phase_ptr);
}
void cxxPPassemblageComp::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing pure_phase message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Pure_Phase element and attributes
s_oss << indent0 << "name=\"" << this->name << "\"" << std::endl;
s_oss << indent0 << "add_formula=\"" << this->add_formula << "\"" << std::endl;
s_oss << indent0 << "si=\"" << this->si << "\"" << std::endl;
s_oss << indent0 << "moles=\"" << this->moles << "\"" << std::endl;
s_oss << indent0 << "delta=\"" << this->delta << "\"" << std::endl;
s_oss << indent0 << "initial_moles=\"" << this->initial_moles << "\"" << std::endl;
s_oss << indent0 << "dissolve_only=\"" << this->dissolve_only << "\"" << std::endl;
}
void cxxPPassemblageComp::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing pure_phase message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Pure_Phase element and attributes
if (this->name != NULL) s_oss << indent0 << "-name " << this->name << std::endl;
if (this->add_formula != NULL) s_oss << indent0 << "-add_formula " << this->add_formula << std::endl;
s_oss << indent0 << "-si " << this->si << std::endl;
s_oss << indent0 << "-moles " << this->moles << std::endl;
s_oss << indent0 << "-delta " << this->delta << std::endl;
s_oss << indent0 << "-initial_moles " << this->initial_moles << std::endl;
s_oss << indent0 << "-dissolve_only " << this->dissolve_only << std::endl;
}
void cxxPPassemblageComp::read_raw(CParser& parser)
{
std::string str;
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(10);
vopts.push_back("name"); // 0
vopts.push_back("add_formula"); // 1
vopts.push_back("si"); // 2
vopts.push_back("moles"); // 3
vopts.push_back("delta"); // 4
vopts.push_back("initial_moles"); // 5
vopts.push_back("dissolve_only"); // 6
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
opt_save = CParser::OPT_ERROR;
bool name_defined(false);
bool si_defined(false);
bool moles_defined(false);
bool delta_defined(false);
bool initial_moles_defined(false);
bool dissolve_only_defined(false);
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_KEYWORD;
// Allow return to Exchange for more processing
//parser.error_msg("Unknown input in PURE_PHASE read.", CParser::OT_CONTINUE);
//parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // name
if (!(parser.get_iss() >> str))
{
this->name = NULL;
parser.incr_input_error();
parser.error_msg("Expected string value for name.", CParser::OT_CONTINUE);
} else {
this->name = string_hsave(str.c_str());
}
name_defined = true;
break;
case 1: // add_formula
if (!(parser.get_iss() >> str))
{
this->add_formula = NULL;
parser.incr_input_error();
parser.error_msg("Expected string value for add_formula.", CParser::OT_CONTINUE);
} else {
this->add_formula = string_hsave(str.c_str());
}
break;
case 2: // si
if (!(parser.get_iss() >> this->si))
{
this->si = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for si.", CParser::OT_CONTINUE);
}
si_defined = true;
break;
case 3: // moles
if (!(parser.get_iss() >> this->moles))
{
this->moles = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for moles.", CParser::OT_CONTINUE);
}
moles_defined = true;
break;
case 4: // delta
if (!(parser.get_iss() >> this->delta))
{
this->delta = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for delta.", CParser::OT_CONTINUE);
}
delta_defined = true;
break;
case 5: // initial_moles
if (!(parser.get_iss() >> this->initial_moles))
{
this->initial_moles = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for initial_moles.", CParser::OT_CONTINUE);
}
initial_moles_defined = true;
break;
case 6: // dissolve_only
if (!(parser.get_iss() >> this->dissolve_only))
{
this->dissolve_only = false;
parser.incr_input_error();
parser.error_msg("Expected boolean value for dissolve_only.", CParser::OT_CONTINUE);
}
dissolve_only_defined = true;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
if (name_defined == false) {
parser.incr_input_error();
parser.error_msg("Name not defined for PPassemblageComp input.", CParser::OT_CONTINUE);
}
if (si_defined == false) {
parser.incr_input_error();
parser.error_msg("Si not defined for PPassemblageComp input.", CParser::OT_CONTINUE);
}
if (moles_defined == false) {
parser.incr_input_error();
parser.error_msg("Moles not defined for PPassemblageComp input.", CParser::OT_CONTINUE);
}
if (delta_defined == false) {
parser.incr_input_error();
parser.error_msg("Delta not defined for PPassemblageComp input.", CParser::OT_CONTINUE);
}
if (initial_moles_defined == false) {
parser.incr_input_error();
parser.error_msg("Initial_moles not defined for PPassemblageComp input.", CParser::OT_CONTINUE);
}
if (dissolve_only_defined == false) {
parser.incr_input_error();
parser.error_msg("Dissolve_only not defined for PPassemblageComp input.", CParser::OT_CONTINUE);
}
}

47
PPassemblageComp.h Normal file
View File

@ -0,0 +1,47 @@
#if !defined(PPASSEMBLAGECOMP_H_INCLUDED)
#define PPASSEMBLAGECOMP_H_INCLUDED
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
class cxxPPassemblageComp
{
public:
cxxPPassemblageComp();
cxxPPassemblageComp(struct pure_phase *);
~cxxPPassemblageComp();
static struct pure_phase *cxxPPassemblageComp2pure_phase(std::list<cxxPPassemblageComp>& el);
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
struct phase *get_phase();
protected:
char * name;
char *add_formula;
double si;
double moles;
double delta;
double initial_moles;
bool dissolve_only;
public:
};
#endif // !defined(PPASSEMBLAGECOMP_H_INCLUDED)

1070
Parser.cxx Normal file

File diff suppressed because it is too large Load Diff

205
Parser.h Normal file
View File

@ -0,0 +1,205 @@
#if !defined(PARSER_H_INCLUDED)
#define PARSER_H_INCLUDED
#include <string> // std::string
#include <map> // std::map
#include <vector> // std::vector
#include <sstream> // std::istringstream std::ostringstream
#include <ostream> // std::ostream
#include <istream> // std::istream
#include "char_star.h"
class CParser
{
public:
CParser(std::istream& input);
CParser(std::istream& input, std::ostream& output);
CParser(std::istream& input, std::ostream& output, std::ostream& error);
virtual ~CParser();
enum LINE_TYPE {
LT_EOF = -1,
LT_OK = 1,
LT_EMPTY = 2,
LT_KEYWORD = 3,
LT_OPTION = 8
};
enum TOKEN_TYPE {
TT_EMPTY = 2,
TT_UPPER = 4,
TT_LOWER = 5,
TT_DIGIT = 6,
TT_UNKNOWN = 7
};
enum FIND_TYPE {
FT_OK = 0,
FT_ERROR = 1
};
enum KEY_TYPE {
KT_NONE = -1,
KT_END = 0,
KT_EOF = 1,
KT_SOLUTION = 4,
KT_SOLUTION_RAW = 5
};
enum OPT_TYPE {
OPT_DEFAULT = -4,
OPT_ERROR = -3,
OPT_KEYWORD = -2,
OPT_EOF = -1
};
enum ONERROR_TYPE {
OT_CONTINUE = 0,
OT_STOP = 1,
};
enum STATUS_TYPE {
PARSER_ERROR = 0,
PARSER_OK = 1
};
/**
Function gets a new line and checks for empty, eof, and keywords.
Arguments:
string Input, character string used in printing error message
allow_empty Input, True or false, if a blank line is accepable
if false, another line is read
allow_eof Input, True or false, if EOF is acceptable
allow_keyword Input, True or false, if a keyword is acceptable
Returns:
LT_EMPTY if empty line read and allow_empty == true
LT_KEYWORD if line begins with keyword
LT_EOF if eof and allow_eof == true
LT_OK otherwise
LT_OPTION if line begins with -[alpha]
Terminates if EOF and allow_eof == false.
*/
LINE_TYPE check_line(const std::string& str, bool allow_empty, bool allow_eof, bool allow_keyword, bool print);
/**
Read a line from input file put in "line".
Copy of input line is stored in "line_save".
Characters after # are discarded in line but retained in "line_save"
Arguments:
None
Returns:
LT_EMPTY,
LT_EOF,
LT_KEYWORD,
LT_OK,
LT_OPTION
*/
LINE_TYPE get_line();
// bool check_key(const std::string::iterator ptr);
bool check_key(std::string::iterator begin, std::string::iterator end);
STATUS_TYPE check_units(std::string& tot_units, bool alkalinity, bool check_compatibility,
const std::string& default_units, bool print);
KEY_TYPE next_keyword()const { return m_next_keyword; }
int get_option(const std::vector<std::string>& opt_list, std::string::iterator& next_char);
int get_option(const std::vector<std::string>& opt_list, std::istream::pos_type& next_pos);
int getOptionFromLastLine(const std::vector<std::string>& opt_list, std::string::iterator& next_char);
int getOptionFromLastLine(const std::vector<std::string>& opt_list, std::istream::pos_type& next_pos);
std::string& line() {return m_line;}
std::istringstream& get_iss() {return m_line_iss;}
int incr_input_error() {return ++m_input_error;}
std::ostream& get_output() {return m_output_stream;}
int get_input_error() {return m_input_error;}
/**
Copies from begin to token until first space is encountered.
Arguments:
token output, the token
begin input, begin iterator
end input, end iterator
Returns:
TT_EMPTY
TT_UPPER
TT_LOWER
TT_DIGIT
TT_UNKNOWN
*/
static TOKEN_TYPE copy_token(std::string& token, std::string::iterator& begin, std::string::iterator& end);
static TOKEN_TYPE token_type(const std::string& token);
static TOKEN_TYPE copy_token(std::string& token, std::istream& is);
TOKEN_TYPE copy_token(std::string& token, std::istream::pos_type& pos);
CParser::TOKEN_TYPE peek_token();
/**
Function reads an element name out of the equation string.
An element name is composed of a capital letter followed by any number
of lower case characters.
Arguments:
begin input, points to position in the equation to begin
output, points to next character of equation after
element name.
end input, points to last position in the equation
element input pointer to place to return element character string
*/
STATUS_TYPE get_elt(std::string::iterator& begin, const std::string::iterator end, std::string& element);
/**
Compares a string value to match beginning letters of a list of options
Arguments:
item entry: pointer to string to compare
n exit: item in list that was matched
list entry: pointer to list of character values, assumed to
be lower case
count_list entry: number of character values in list
Returns:
OK item matched
ERROR item not matched
n -1 item not matched
i position of match in list
*/
static FIND_TYPE find_option(const std::string& item, int *n, const std::vector<std::string>& list, bool exact);
int error_msg(const std::ostringstream& err_str, ONERROR_TYPE stop) {return error_msg(err_str.str().c_str(), stop);}
int error_msg(const char *err_str, ONERROR_TYPE stop);
int warning_msg(const char *err_str);
STATUS_TYPE parse_couple(std::string& token);
STATUS_TYPE addPair(std::map<char *, double, CHARSTAR_LESS> &totals, std::istream::pos_type& pos);
STATUS_TYPE addPair(std::map<char *, double> &totals, std::istream::pos_type& pos);
protected:
LINE_TYPE get_logical_line();
private:
std::istream& m_input_stream;
std::ostream& m_output_stream;
std::ostream& m_error_stream;
int m_input_error;
KEY_TYPE m_next_keyword;
std::string m_line;
std::string m_line_save;
std::istringstream m_line_iss;
LINE_TYPE m_line_type;
};
#endif // PARSER_H_INCLUDED

45
Pe_Data.cxx Normal file
View File

@ -0,0 +1,45 @@
#include "Pe_Data.h"
#include "Utilities.h"
#include <ostream> // std::ostream
cxxPe_Data::cxxPe_Data()
: name("")
{
}
cxxPe_Data::cxxPe_Data(const std::string& name)
: name(name)
{
}
cxxPe_Data::~cxxPe_Data()
{
}
int cxxPe_Data::store(std::vector<cxxPe_Data>& vec_pe_data, const std::string& token)
{
unsigned int i = 0;
unsigned int size = vec_pe_data.size();
for (; i < size; ++i) {
if (vec_pe_data[i].name.compare(token) == 0)
return i;
}
vec_pe_data.push_back(token);
return i;
}
std::vector<cxxPe_Data> cxxPe_Data::alloc()
{
std::vector<cxxPe_Data> vec;
vec.push_back(cxxPe_Data("pe"));
// TODO: see pe_data_alloc
return vec;
}
void cxxPe_Data::dump_xml(std::ostream& os, unsigned int indent)const
{
unsigned int i;
for(i = 0; i < indent; ++i) os << Utilities::INDENT;
os << "<redox>" << this->name << "</redox>\n";
}

28
Pe_Data.h Normal file
View File

@ -0,0 +1,28 @@
#if !defined(PE_DATA_H_INCLUDED)
#define PE_DATA_H_INCLUDED
#include <string>
#include <vector>
class cxxPe_Data
{
public:
cxxPe_Data();
cxxPe_Data(struct pe *pe_ptr);
cxxPe_Data(const std::string& name);
~cxxPe_Data();
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
std::string get_name()const {return this->name;};
void set_name(std::string name) {this->name = name;};
static int store(std::vector<cxxPe_Data>& vec, const std::string& token);
static std::vector<cxxPe_Data> cxxPe_Data::alloc();
private:
std::string name;
};
#endif // PE_DATA_H_INCLUDED

323
Reaction.cxx Normal file
View File

@ -0,0 +1,323 @@
// Reaction.cxx: implementation of the cxxReaction class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "Reaction.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxReaction::cxxReaction()
//
// default constructor for cxxReaction
//
: cxxNumKeyword()
{
units = string_hsave("Mol");
countSteps = 0;
equalIncrements = false;
reactantList.type = cxxNameDouble::ND_NAME_COEF;
elementList.type = cxxNameDouble::ND_ELT_MOLES;
}
cxxReaction::cxxReaction(struct irrev *irrev_ptr)
//
// constructor for cxxReaction from struct irrev
//
:
cxxNumKeyword(),
reactantList(irrev_ptr->list, irrev_ptr->count_list, cxxNameDouble::ND_NAME_COEF),
elementList(irrev_ptr->elts)
{
int i;
this->set_description(irrev_ptr->description);
this->n_user = irrev_ptr->n_user;
this->n_user_end = irrev_ptr->n_user_end;
this->units = irrev_ptr->units;
// steps
if (irrev_ptr->count_steps < 0) {
for (i = 0; i < 1; i++) {
this->steps.push_back(irrev_ptr->steps[i]);
}
this->countSteps = -irrev_ptr->count_steps;
this->equalIncrements = true;
} else {
for (i = 0; i < irrev_ptr->count_steps; i++) {
this->steps.push_back(irrev_ptr->steps[i]);
}
this->countSteps = irrev_ptr->count_steps;
this->equalIncrements = false;
}
}
cxxReaction::~cxxReaction()
{
}
struct irrev *cxxReaction::cxxReaction2irrev()
//
// Builds a irrev structure from instance of cxxReaction
//
{
struct irrev *irrev_ptr;
irrev_ptr = (struct irrev *) PHRQ_malloc(sizeof (struct irrev));
if (irrev_ptr == NULL) malloc_error();
irrev_ptr->description = this->get_description();
irrev_ptr->n_user = this->n_user;
irrev_ptr->n_user_end = this->n_user_end;
irrev_ptr->list = this->reactantList.name_coef();
irrev_ptr->count_list = this->reactantList.size();
if (this->elementList.size() > 0) {
irrev_ptr->elts = this->elementList.elt_list();
} else {
// NULL value causes reaction stoichiometry to be calculated
irrev_ptr->elts = NULL;
}
// steps
irrev_ptr->steps = NULL;
if (this->steps.size() > 0) {
irrev_ptr->steps = (double *) PHRQ_malloc((size_t) (this->steps.size() * sizeof(double)));
if (irrev_ptr->steps == NULL) malloc_error();
std::copy(this->steps.begin(), this->steps.end(), irrev_ptr->steps);
}
if (this->equalIncrements) {
irrev_ptr->count_steps = -this->countSteps;
} else {
irrev_ptr->count_steps = this->steps.size();
}
irrev_ptr->units = this->units;
return(irrev_ptr);
}
#ifdef SKIP
void cxxReaction::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing irrev message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Reaction element and attributes
s_oss << indent0;
s_oss << "<irrev " << std::endl;
s_oss << indent1;
s_oss << "pitzer_irrev_gammas=\"" << this->pitzer_irrev_gammas << "\"" << std::endl;
// components
s_oss << indent1;
s_oss << "<component " << std::endl;
for (std::list<cxxReactionComp>::const_iterator it = irrevComps.begin(); it != irrevComps.end(); ++it) {
it->dump_xml(s_oss, indent + 2);
}
return;
}
#endif
void cxxReaction::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing irrev message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// Reaction element and attributes
s_oss << indent0;
s_oss << "REACTION_RAW " << this->n_user << " " << this->description << std::endl;
s_oss << indent1;
s_oss << "-units " << this->units << std::endl;
s_oss << indent1;
s_oss << "-reactant_list " << std::endl;
this->reactantList.dump_raw(s_oss, indent + 2);
s_oss << indent1;
s_oss << "-element_list " << std::endl;
this->elementList.dump_raw(s_oss, indent + 2);
s_oss << indent1;
s_oss << "-steps " << std::endl;
{
int i = 0;
s_oss << indent2;
for (std::vector<double>::const_iterator it = this->steps.begin(); it != this->steps.end(); it++) {
if (i++ == 5) {
s_oss << std::endl;
s_oss << indent2;
i = 0;
}
s_oss << *it << " ";
}
s_oss << std::endl;
}
s_oss << indent1;
s_oss << "-equal_increments " << this->equalIncrements << std::endl;
s_oss << indent1;
s_oss << "-count_steps " << this->countSteps << std::endl;
}
void cxxReaction::read_raw(CParser& parser)
{
int j;
double d;
CParser::TOKEN_TYPE k;
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(15);
vopts.push_back("units"); //0
vopts.push_back("reactant_list"); //1
vopts.push_back("element_list"); //2
vopts.push_back("steps"); //3
vopts.push_back("equal_increments"); //4
vopts.push_back("count_steps"); //5
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
bool useLastLine(false);
// Read irrev number and description
this->read_number_description(parser);
opt_save = CParser::OPT_ERROR;
bool units_defined(false);
bool equalIncrements_defined(false);
bool countSteps_defined(false);
for (;;)
{
int opt;
if (useLastLine == false) {
opt = parser.get_option(vopts, next_char);
} else {
opt = parser.getOptionFromLastLine(vopts, next_char);
}
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_EOF;
parser.error_msg("Unknown input in IRREV_COMP_RAW keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
useLastLine = false;
break;
case 0: // units
j = parser.copy_token(token, next_char);
if (j == CParser::TT_EMPTY) break;
this->units = string_hsave(token.c_str());
opt_save = CParser::OPT_DEFAULT;
useLastLine = false;
units_defined = true;
break;
case 1: // reactant_list
if ( this->reactantList.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected reactant formula and coefficient.", CParser::OT_CONTINUE);
}
opt_save = 1;
useLastLine = false;
break;
case 2: // element_list
if ( this->elementList.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected element formula and coefficient.", CParser::OT_CONTINUE);
}
opt_save = 2;
useLastLine = false;
break;
case 3: // steps
while ((k = parser.copy_token(token, next_char)) == CParser::TT_DIGIT) {
std::istringstream iss(token);
if (!(iss >> d)) {
parser.incr_input_error();
parser.error_msg("Expected numeric value for steps.", CParser::OT_CONTINUE);
} else {
this->steps.push_back(d);
}
}
opt_save = 3;
useLastLine = false;
break;
case 4: // equal_increments
if (!(parser.get_iss() >> this->equalIncrements))
{
this->equalIncrements = 0;
parser.incr_input_error();
parser.error_msg("Expected boolean value for equalIncrements.", CParser::OT_CONTINUE);
}
opt_save = CParser::OPT_DEFAULT;
useLastLine = false;
equalIncrements_defined = true;
break;
case 5: // countSteps
if (!(parser.get_iss() >> this->countSteps))
{
this->countSteps = 0;
parser.incr_input_error();
parser.error_msg("Expected integer value for countSteps.", CParser::OT_CONTINUE);
}
opt_save = CParser::OPT_DEFAULT;
useLastLine = false;
countSteps_defined = true;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
if (units_defined == false) {
parser.incr_input_error();
parser.error_msg("Units not defined for REACTION_RAW input.", CParser::OT_CONTINUE);
}
if (equalIncrements_defined == false) {
parser.incr_input_error();
parser.error_msg("Equal_increments not defined for REACTION_RAW input.", CParser::OT_CONTINUE);
}
if (countSteps_defined == false) {
parser.incr_input_error();
parser.error_msg("Count_steps not defined for REACTION_RAW input.", CParser::OT_CONTINUE);
}
}

45
Reaction.h Normal file
View File

@ -0,0 +1,45 @@
#if !defined(REACTION_H_INCLUDED)
#define REACTION_H_INCLUDED
#include "NumKeyword.h"
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
class cxxReaction : public cxxNumKeyword
{
public:
cxxReaction();
cxxReaction(struct irrev *);
~cxxReaction();
struct irrev *cxxReaction2irrev();
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
protected:
cxxNameDouble reactantList;
cxxNameDouble elementList;
std::vector<double> steps;
int countSteps;
bool equalIncrements;
char *units;
public:
//static std::map<int, cxxReaction>& map;
};
#endif // !defined(REACTION_H_INCLUDED)

701
ReadClass.cpp Normal file
View File

@ -0,0 +1,701 @@
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Parser.h"
#include "Solution.h"
#include "Exchange.h"
#include "Surface.h"
#include "PPassemblage.h"
#include "KineticsCxx.h"
#include "SSassemblage.h"
#include "GasPhase.h"
#include "Reaction.h"
#include "Mix.h"
#include "Temperature.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "output.h"
#include "phrqproto.h"
extern int check_line(const char *string, int allow_empty, int allow_eof, int allow_keyword,
int print);
/* ---------------------------------------------------------------------- */
int read_solution_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads SOLUTION_RAW data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("solution_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxSolution sol;
sol.read_raw(parser);
struct solution *soln_ptr = sol.cxxSolution2solution();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (solution_bsearch(soln_ptr->n_user, &n, FALSE) != NULL) {
solution_free(solution[n]);
} else {
n=count_solution++;
if (count_solution >= max_solution) {
space ((void **) ((void *) &(solution)), count_solution, &max_solution, sizeof (struct solution *) );
}
}
solution[n] = soln_ptr;
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_exchange_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads EXCHANGE_RAW data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("exchange_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxExchange ex;
ex.read_raw(parser);
struct exchange *exchange_ptr = ex.cxxExchange2exchange();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (exchange_bsearch(exchange_ptr->n_user, &n) != NULL) {
exchange_free(&exchange[n]);
} else {
n=count_exchange++;
if (count_exchange >= max_exchange) {
space ((void **) ((void *) &(exchange)), count_exchange, &max_exchange, sizeof (struct exchange *) );
}
}
exchange_copy(exchange_ptr, &exchange[n], exchange_ptr->n_user);
exchange_free(exchange_ptr);
free_check_null(exchange_ptr);
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_surface_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads SURFACE_RAW data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("surface_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxSurface ex;
ex.read_raw(parser);
struct surface *surface_ptr = ex.cxxSurface2surface();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (surface_bsearch(surface_ptr->n_user, &n) != NULL) {
surface_free(&surface[n]);
} else {
n=count_surface++;
if (count_surface >= max_surface) {
space ((void **) ((void *) &(surface)), count_surface, &max_surface, sizeof (struct surface *) );
}
}
surface_copy(surface_ptr, &surface[n], surface_ptr->n_user);
surface_free(surface_ptr);
free_check_null(surface_ptr);
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_equilibrium_phases_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads EQUILIBRIUM_PHASES_RAW data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("equilibrium_phases_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxPPassemblage ex;
ex.read_raw(parser);
struct pp_assemblage *pp_assemblage_ptr = ex.cxxPPassemblage2pp_assemblage();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (pp_assemblage_bsearch(pp_assemblage_ptr->n_user, &n) != NULL) {
pp_assemblage_free(&pp_assemblage[n]);
} else {
n=count_pp_assemblage++;
if (count_pp_assemblage >= max_pp_assemblage) {
space ((void **) ((void *) &(pp_assemblage)), count_pp_assemblage, &max_pp_assemblage, sizeof (struct pp_assemblage *) );
}
}
pp_assemblage_copy(pp_assemblage_ptr, &pp_assemblage[n], pp_assemblage_ptr->n_user);
pp_assemblage_free(pp_assemblage_ptr);
free_check_null(pp_assemblage_ptr);
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_kinetics_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads KINETICS_RAW data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("kinetics_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxKinetics ex;
ex.read_raw(parser);
struct kinetics *kinetics_ptr = ex.cxxKinetics2kinetics();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (kinetics_bsearch(kinetics_ptr->n_user, &n) != NULL) {
kinetics_free(&kinetics[n]);
} else {
n=count_kinetics++;
if (count_kinetics >= max_kinetics) {
space ((void **) ((void *) &(kinetics)), count_kinetics, &max_kinetics, sizeof (struct kinetics *) );
}
}
kinetics_copy(kinetics_ptr, &kinetics[n], kinetics_ptr->n_user);
kinetics_free(kinetics_ptr);
free_check_null(kinetics_ptr);
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_solid_solutions_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads SOLID_SOLUTION_RAW data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("solid_solution_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxSSassemblage ex;
ex.read_raw(parser);
struct s_s_assemblage *s_s_assemblage_ptr = ex.cxxSSassemblage2s_s_assemblage();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (s_s_assemblage_bsearch(s_s_assemblage_ptr->n_user, &n) != NULL) {
s_s_assemblage_free(&s_s_assemblage[n]);
} else {
n=count_s_s_assemblage++;
if (count_s_s_assemblage >= max_s_s_assemblage) {
space ((void **) ((void *) &(s_s_assemblage)), count_s_s_assemblage, &max_s_s_assemblage, sizeof (struct s_s_assemblage *) );
}
}
s_s_assemblage_copy(s_s_assemblage_ptr, &s_s_assemblage[n], s_s_assemblage_ptr->n_user);
s_s_assemblage_free(s_s_assemblage_ptr);
free_check_null(s_s_assemblage_ptr);
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_gas_phase_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads GAS_PHASE_RAW data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("solid_solution_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxGasPhase ex;
ex.read_raw(parser);
struct gas_phase *gas_phase_ptr = ex.cxxGasPhase2gas_phase();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (gas_phase_bsearch(gas_phase_ptr->n_user, &n) != NULL) {
gas_phase_free(&gas_phase[n]);
} else {
n=count_gas_phase++;
if (count_gas_phase >= max_gas_phase) {
space ((void **) ((void *) &(gas_phase)), count_gas_phase, &max_gas_phase, sizeof (struct gas_phase *) );
}
}
gas_phase_copy(gas_phase_ptr, &gas_phase[n], gas_phase_ptr->n_user);
gas_phase_free(gas_phase_ptr);
free_check_null(gas_phase_ptr);
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_reaction_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads REACTION_RAW data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("solid_solution_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxReaction ex;
ex.read_raw(parser);
struct irrev *irrev_ptr = ex.cxxReaction2irrev();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (irrev_bsearch(irrev_ptr->n_user, &n) != NULL) {
irrev_free(&irrev[n]);
} else {
n=count_irrev++;
irrev = (struct irrev *) PHRQ_realloc(irrev, (size_t) count_irrev * sizeof (struct irrev));
if (irrev == NULL) malloc_error();
}
irrev_copy(irrev_ptr, &irrev[n], irrev_ptr->n_user);
irrev_free(irrev_ptr);
free_check_null(irrev_ptr);
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_mix_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads MIX (_RAW) data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("solid_solution_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxMix ex;
ex.read_raw(parser);
struct mix *mix_ptr = ex.cxxMix2mix();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (mix_bsearch(mix_ptr->n_user, &n) != NULL) {
mix_free(&mix[n]);
} else {
n=count_mix++;
mix = (struct mix *) PHRQ_realloc(mix, (size_t) count_mix * sizeof (struct mix));
if (mix == NULL) malloc_error();
}
mix_copy(mix_ptr, &mix[n], mix_ptr->n_user);
mix_free(mix_ptr);
free_check_null(mix_ptr);
return(return_value);
}
/* ---------------------------------------------------------------------- */
int read_temperature_raw (void)
/* ---------------------------------------------------------------------- */
{
/*
* Reads TEMPERATURE (_RAW) data block
*
* Arguments:
* none
*
* Returns:
* KEYWORD if keyword encountered, input_error may be incremented if
* a keyword is encountered in an unexpected position
* EOF if eof encountered while reading mass balance concentrations
* ERROR if error occurred reading data
*
*/
int return_value;
/*
* Accumulate lines in std string
*/
std::string keywordLines("");
keywordLines.append(line);
keywordLines.append("\n");
/*
* Read additonal lines
*/
for (;;) {
return_value = check_line("solid_solution_raw",TRUE,TRUE,TRUE,TRUE);
/* empty, eof, keyword, print */
if (return_value == EOF || return_value == KEYWORD ) break;
keywordLines.append(line);
keywordLines.append("\n");
}
std::istringstream iss_in(keywordLines);
std::ostringstream oss_out;
std::ostringstream oss_err;
CParser parser(iss_in, oss_out, oss_err);
//For testing, need to read line to get started
std::vector<std::string> vopts;
std::istream::pos_type next_char;
parser.get_option(vopts, next_char);
cxxTemperature ex;
ex.read_raw(parser);
struct temperature *temperature_ptr = ex.cxxTemperature2temperature();
int n;
/*
* This is not quite right, may not produce sort order
*/
if (temperature_bsearch(temperature_ptr->n_user, &n) != NULL) {
temperature_free(&temperature[n]);
} else {
n=count_temperature++;
temperature = (struct temperature *) PHRQ_realloc(temperature, (size_t) count_temperature * sizeof (struct temperature));
if (temperature == NULL) malloc_error();
}
temperature_copy(temperature_ptr, &temperature[n], temperature_ptr->n_user);
temperature_free(temperature_ptr);
free_check_null(temperature_ptr);
return(return_value);
}

888
SAXPhreeqc.cpp Normal file
View File

@ -0,0 +1,888 @@
// SAXPhreeqc.cpp
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include <float.h> // DBL_DIG
#include <stdio.h> // sprintf
#include <wctype.h> // iswspace
#include <cassert> // assert
//#include <strstream> // std::ostrstream
#include <sstream>
#include <iostream> // std::cerr
#ifdef SKIP
#endif
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include <xercesc/framework/StdInInputSource.hpp>
#include <xercesc/framework/MemoryManager.hpp>
#include <xercesc/framework/XMLGrammarPool.hpp>
#include <xercesc/internal/XMLGrammarPoolImpl.hpp>
#include <xercesc/internal/MemoryManagerImpl.hpp>
#include <xercesc/validators/common/Grammar.hpp>
//#include <xercesc/parsers/SAXParser.hpp> // SAXParser
#include <xercesc/sax/AttributeList.hpp> // AttributeList
#include <xercesc/util/XMLUniDefs.hpp> // Unicode definitions
#include <xercesc/framework/MemBufInputSource.hpp> // MemBufInputSource
#include <xercesc/framework/MemoryManager.hpp>
#include <xercesc/internal/MemoryManagerImpl.hpp>
#include <xercesc/util/PlatformUtils.hpp> // XMLPlatformUtils::getCurrentMillis
#include <xercesc/util/XMLUni.hpp>
#include <xercesc/sax2/SAX2XMLReader.hpp>
#include <xercesc/sax2/XMLReaderFactory.hpp>
#include "SAXPhreeqc.h" // SAX_ functions
#include "SaxPhreeqcHandlers.h" // SaxPhreeqcHandlers
//XERCES_CPP_NAMESPACE_USE
#define xns XERCES_CPP_NAMESPACE
///static char buffer[300000];
///static std::ostrstream s_oss(buffer, 300000); // must never go out of scope
static std::ostringstream s_oss; // must never go out of scope
static bool s_bSysIsOpen = false; // must never go out of scope
#include <math.h>
// extern routines
#include "phqalloc.h"
#include "global.h"
#include "phrqproto.h"
#include "output.h"
#ifdef SKIP
int conc_init(struct conc *conc_ptr);
void *free_check_null(void *ptr);
int pe_data_store (struct pe_data **pe, const char *token);
struct phase *phase_bsearch (char *ptr, int *j, int print);
struct solution *solution_alloc(void);
struct solution *solution_bsearch(int k, int *n, int print);
int solution_free (struct solution *solution_ptr);
void space (void **ptr, int i, int *max, int struct_size);
char * string_duplicate (const char *token);
char *string_hsave (const char *str);
int error_msg (const char *err_str, const int stop);
struct master *master_bsearch (const char *ptr);
void malloc_error(void);
#endif
//}
class Initializer
{
public:
Initializer(){
#if defined(_DEBUG)
int tmpDbgFlag;
/*
* Set the debug-heap flag to keep freed blocks in the
* heap's linked list - This will allow us to catch any
* inadvertent use of freed memory
*/
tmpDbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
//tmpDbgFlag |= _CRTDBG_DELAY_FREE_MEM_DF;
tmpDbgFlag |= _CRTDBG_LEAK_CHECK_DF;
//tmpDbgFlag |= _CRTDBG_CHECK_ALWAYS_DF;
_CrtSetDbgFlag(tmpDbgFlag);
#endif
xns::XMLPlatformUtils::Initialize();
}
};
static Initializer sInit; // initialize xerces once
static SaxPhreeqcHandlers s_handler; // one and only instance
void SAX_StartSystem()
{
assert(!s_bSysIsOpen); // system already open and has not been closed
// init stream
//s_oss.freeze(false);
s_oss.seekp(0);
// write stream
// s_oss << "<system>";
s_oss << "<?xml version=\"1.0\" ?>";
s_oss << "<phast_state nx=\"2\">";
s_oss << " <system system_number=\"1\">";
s_bSysIsOpen = true;
}
char * stringify_null(char * string) {
if (string == NULL) return(string_hsave(""));
return(string);
}
int SAX_AddSolution(struct solution* solution_ptr)
{
//const char ERR_MESSAGE[] = "Packing solution message: %s, element not found\n";
int i, newd;
assert(s_bSysIsOpen); // must call SAX_StartSystem first
s_oss.precision(DBL_DIG - 1);
// Solution element and attributes
newd = solution_ptr->new_def;
s_oss << " <solution " << std::endl;
s_oss << " soln_new_def=\"" << solution_ptr->new_def << "\"" << std::endl;
s_oss << " soln_n_user=\"" << solution_ptr->n_user << "\" " << std::endl;
s_oss << " soln_n_user_end=\"" << solution_ptr->n_user_end << "\"" << std::endl;
s_oss << " soln_description=\"" << solution_ptr->description << "\"" << std::endl;
s_oss << " soln_tc=\"" << solution_ptr->tc << "\"" << std::endl;
s_oss << " soln_ph=\"" << solution_ptr->ph << "\"" << std::endl;
s_oss << " soln_solution_pe=\"" << solution_ptr->solution_pe << "\"" << std::endl;
s_oss << " soln_mu=\"" << solution_ptr->mu << "\"" << std::endl;
s_oss << " soln_ah2o=\"" << solution_ptr->ah2o << "\"" << std::endl;
s_oss << " soln_density=\"" << solution_ptr->density << "\"" << std::endl;
s_oss << " soln_total_h=\"" << solution_ptr->total_h << "\"" << std::endl;
s_oss << " soln_total_o=\"" << solution_ptr->total_o << "\"" << std::endl;
s_oss << " soln_cb=\"" << solution_ptr->cb << "\"" << std::endl;
s_oss << " soln_mass_water=\"" << solution_ptr->mass_water << "\"" << std::endl;
s_oss << " soln_total_alkalinity=\"" << solution_ptr->total_alkalinity << "\"" << std::endl;
//s_oss << " soln_total_co2=\"" << solution_ptr->total_co2 << "\"" << std::endl;
s_oss << " soln_units=\"" << solution_ptr->units << "\"" << std::endl;
s_oss << " soln_default_pe=\"" << solution_ptr->default_pe << "\"" << std::endl;
s_oss << " soln_count_master_activity=\"" << solution_ptr->count_master_activity << "\"" << std::endl;
s_oss << " soln_count_isotopes=\"" << solution_ptr->count_isotopes << "\"" << std::endl;
s_oss << " soln_count_species_gamma=\"" << solution_ptr->count_species_gamma << "\">" << std::endl;
// end of solution attributes
// pe structures
for (i=0; solution_ptr->pe[i].name != NULL; i++) {
s_oss << " <soln_pe soln_pe_name=\"" << solution_ptr->pe[i].name << "\"/>"<< std::endl;
}
// soln_total conc structures
for (i=0; solution_ptr->totals[i].description != NULL; i++) {
struct conc *c = &(solution_ptr->totals[i]);
s_oss << " <soln_total " << std::endl;
s_oss << " conc_desc=\"" << c->description << "\"" << std::endl;
s_oss << " conc_moles=\"" << c->moles << "\"" << std::endl;
if (newd == TRUE) {
s_oss << " conc_input_conc=\"" << c->input_conc << "\"" << std::endl;
if (c->units != NULL) s_oss << " conc_units=\"" << c->units << "\"" << std::endl;
if (c->equation_name != NULL) {
s_oss << " conc_equation_name=\"" << stringify_null(c->equation_name) << "\"" << std::endl;
s_oss << " conc_phase_si=\"" << c->phase_si << "\"" << std::endl;
}
if (c->as != NULL) s_oss << " conc_as=\"" << stringify_null(c->as) << "\"" << std::endl;
s_oss << " conc_gfw=\"" << c->gfw << "\"" << std::endl;
}
s_oss << " conc_n_pe=\"" << c->n_pe << "\"" << std::endl;
s_oss << " />" << std::endl;
}
// master_activity, master_activity structure
for (i=0; i < solution_ptr->count_master_activity; i++) {
s_oss << " <soln_m_a m_a_desc=\"" << stringify_null(solution_ptr->master_activity[i].description) << "\" m_a_la=\"" << solution_ptr->master_activity[i].la << "\"/>" << std::endl;
}
/*
if (solution_ptr->count_master_activity > 0) {
s_oss << " <soln_m_a m_a_list=\"" << std::endl;
for (i=0; i < solution_ptr->count_master_activity; i++) {
if (solution_ptr->master_activity[i].description != NULL) {
s_oss << stringify_null(solution_ptr->master_activity[i].description) << " ";
s_oss << solution_ptr->master_activity[i].la << std::endl;
} else {
s_oss << "null 0.0" << std::endl;
}
}
s_oss << "\"/>" << std::endl;
}
*/
// species_gamma, mater_activity structure
for (i=0; i < solution_ptr->count_species_gamma; i++) {
s_oss << " <soln_s_g m_a_desc=\"" << stringify_null(solution_ptr->species_gamma[i].description) << "\" m_a_la=\"" << solution_ptr->species_gamma[i].la << "\"/>" << std::endl;
}
// isotopes, isotope structure
for (i=0; solution_ptr->count_isotopes; i++) {
s_oss << " <soln_isotope " << std::endl;
s_oss << " iso_isotope_number=\"" << solution_ptr->isotopes[i].isotope_number << "\"" << std::endl;
s_oss << " iso_elt_name=\"" << solution_ptr->isotopes[i].elt_name << "\"" << std::endl;
s_oss << " iso_isotope_name=\"" << solution_ptr->isotopes[i].isotope_name << "\"" << std::endl;
s_oss << " iso_total=\"" << solution_ptr->isotopes[i].total << "\"" << std::endl;
s_oss << " iso_ratio=\"" << solution_ptr->isotopes[i].ratio << "\"" << std::endl;
s_oss << " iso_ratio_uncertainty=\"" << solution_ptr->isotopes[i].ratio_uncertainty << "\"" << std::endl;
s_oss << " iso_coef=\"" << solution_ptr->isotopes[i].coef << "\"" << std::endl;
}
// End of solution
s_oss << " </solution>" << std::endl;
return(OK);
}
void SAX_EndSystem()
{
assert(s_bSysIsOpen); // must call SAX_StartSystem first
s_oss << " </system>" << std::endl;
s_oss << "</phast_state>" << std::endl;
s_oss << '\0';
s_bSysIsOpen = false;
//delete[] s_handler;
return;
}
int SAX_GetXMLLength()
{
assert(!s_bSysIsOpen); // must call SAX_EndSystem first
//return s_oss.pcount();
return s_oss.str().size();
}
const char* SAX_GetXMLStr()
{
assert(!s_bSysIsOpen); // must call SAX_EndSystem first
return s_oss.str().c_str();
}
void SAX_cleanup()
{
//delete s_handler;
//s_oss.freeze(false);
}
// utility routines
int XMLCh2Int(const XMLCh* const attValue) {
char *string = xns::XMLString::transcode(attValue);
int i = strtol(string, NULL, 10);
xns::XMLString::release(&string);
return i;
//return (xns::XMLString::parseInt(attValue));
}
double XMLCh2Double(const XMLCh* const attValue) {
char *string = xns::XMLString::transcode(attValue);
double d = strtod(string, NULL);
xns::XMLString::release(&string);
return d;
}
char * XMLCh2String(const XMLCh* const attValue) {
char *string = xns::XMLString::transcode(attValue);
char *s = string_duplicate(string);
xns::XMLString::release(&string);
return s;
}
char * XMLCh_hsave(const XMLCh* const attValue, bool allow_null) {
char *string = xns::XMLString::transcode(attValue);
char *s = string_hsave(string);
if (allow_null && strlen(s) == 0) s = NULL;
xns::XMLString::release(&string);
return s;
}
int SAX_UnpackSolutions(void* pvBuffer, int buf_size)
{
// Create MemBufferInputSource from the buffer containing the XML
// statements.
xns::MemBufInputSource memBufIS((const XMLByte*)pvBuffer, buf_size, "solution_id", false);
fprintf(stderr,"%s", (char *) pvBuffer);
return 0;
//
// Create a SAX2 parser object.
//
xns::SAX2XMLReader * parser = xns::XMLReaderFactory::createXMLReader();
parser->setFeature(xns::XMLUni::fgXercesSchemaFullChecking, false);
parser->setFeature(xns::XMLUni::fgSAX2CoreNameSpaces, false);
parser->setFeature(xns::XMLUni::fgXercesSchema, false);
parser->setFeature(xns::XMLUni::fgXercesIdentityConstraintChecking, false);
//
// Create the handler object and install it as the document and error
// handler for the parser. Then parse the MemBufferInputSource and
// catch any exceptions that propogate out
//
try
{
unsigned long duration = 0;
parser->setContentHandler(&s_handler);
parser->setErrorHandler(&s_handler);
int t = 0;
for (; t < 1000; ++t)
{
const unsigned long startMillis = xns::XMLPlatformUtils::getCurrentMillis();
parser->parse(memBufIS);
const unsigned long endMillis = xns::XMLPlatformUtils::getCurrentMillis();
duration += endMillis - startMillis;
}
std::cerr << "\nSaxParse time = " << duration << " millis\n";
}
catch (const xns::SAXException& toCatch)
{
char* psz = xns::XMLString::transcode(toCatch.getMessage());
input_error++;
sprintf(error_string, "SAX_UnpackSolutions: %s\n", psz);
error_msg(error_string, CONTINUE);
xns::XMLString::release(&psz);
return ERROR;
}
catch (const xns::XMLException& toCatch)
{
char* psz = xns::XMLString::transcode(toCatch.getMessage());
input_error++;
sprintf(error_string, "SAX_UnpackSolutions: %s\n", psz);
error_msg(error_string, CONTINUE);
xns::XMLString::release(&psz);
return ERROR;
}
catch (...)
{
input_error++;
sprintf(error_string,"SAX_UnpackSolutions: %s\n", "Unknown error occured.");
error_msg(error_string, CONTINUE);
return ERROR;
}
return(OK);
}
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
// element names
SaxPhreeqcHandlers::SaxPhreeqcHandlers()
: eltType(typeNULL), attType(attNULL), totals(), acts(), solution_ptr(NULL)
{
int i;
int count_elementInfo, count_attributeInfo;
struct mapElementInfo {char *key; enum elementType type;};
struct mapAttributeInfo {enum attributeType type; char *key;};
struct mapElementInfo elementInfo[] = {
{"phast_state", typePHAST_STATE},
{"system", typeSYSTEM},
{"solution", typeSOLUTION},
{"soln_pe", typeSOLN_PE},
{"soln_total", typeSOLN_TOTAL},
{"soln_m_a", typeSOLN_MASTER_ACTIVITY},
{"soln_isotope", typeSOLN_ISOTOPE},
{"soln_s_g", typeSOLN_SPECIES_GAMMA}
};
count_elementInfo = sizeof(elementInfo)/sizeof(struct mapElementInfo);
struct mapAttributeInfo attributeInfo[] = {
// Solution structure
{attSOLN_new_def, "soln_new_def"},
{attSOLN_n_user, "soln_n_user"},
{attSOLN_n_user_end, "soln_n_user_end"},
{attSOLN_description, "soln_description"},
{attSOLN_tc, "soln_tc"},
{attSOLN_ph, "soln_ph"},
{attSOLN_solution_pe, "soln_solution_pe"},
{attSOLN_mu, "soln_mu"},
{attSOLN_ah2o, "soln_ah2o"},
{attSOLN_density, "soln_density"},
{attSOLN_total_h, "soln_total_h"},
{attSOLN_total_o, "soln_total_o"},
{attSOLN_cb, "soln_cb"},
{attSOLN_mass_water, "soln_mass_water"},
{attSOLN_total_alkalinity, "soln_total_alkalinity"},
{attSOLN_total_co2, "soln_total_co2"},
{attSOLN_units, "soln_units"},
{attSOLN_default_pe, "soln_default_pe"},
{attSOLN_count_master_activity, "soln_count_master_activity"},
{attSOLN_count_isotopes, "soln_count_isotopes"},
{attSOLN_count_species_gamma, "soln_count_species_gamma"},
{attSOLN_PE_name, "soln_pe_name"},
// master_activity structure
{attM_A_description, "m_a_desc"},
{attM_A_la, "m_a_la"},
{attM_A_list, "m_a_list"},
// isotope structure
{attISO_isotope_number, "iso_isotope_number"},
{attISO_elt_name, "iso_elt_name"},
{attISO_isotope_name, "iso_isotope_name"},
{attISO_total, "iso_total"},
{attISO_ratio, "iso_ratio"},
{attISO_ratio_uncertainty, "iso_ratio_uncertainty"},
{attISO_x_ratio_uncertainty, "iso_x_ratio_uncertainty"},
{attISO_coef, "iso_coef"},
// conc structure
{attCONC_description, "conc_desc"},
{attCONC_moles, "conc_moles"},
{attCONC_input_conc, "conc_input_conc"},
{attCONC_units, "conc_units"},
{attCONC_equation_name, "conc_equation_name"},
{attCONC_phase_si, "conc_phase_si"},
{attCONC_n_pe, "conc_n_pe"},
{attCONC_as, "conc_as"},
{attCONC_gfw, "conc_gfw"},
};
count_attributeInfo = sizeof(attributeInfo)/sizeof(struct mapAttributeInfo);
for (i = 0; i < count_elementInfo; i++) {
// memory freed in destructor
this->mapXMLCh2Type[xns::XMLString::transcode(elementInfo[i].key)] = elementInfo[i].type;
}
for (i = 0; i < count_attributeInfo; i++) {
// memory freed in destructor
this->mapXMLCh2AttType[xns::XMLString::transcode(attributeInfo[i].key)] = attributeInfo[i].type;
}
this->totals.reserve(50);
this->acts.reserve(50);
}
SaxPhreeqcHandlers::~SaxPhreeqcHandlers()
{
std::map<const XMLCh*, elementType, XMLCH_LESS>::iterator it = this->mapXMLCh2Type.begin();
for (; it != this->mapXMLCh2Type.end(); ++it)
{
XMLCh* p = (XMLCh*)it->first;
xns::XMLString::release(&p);
}
this->mapXMLCh2Type.clear();
std::map<const XMLCh*, attributeType, XMLCH_LESS>::iterator ita = this->mapXMLCh2AttType.begin();
for (; ita != this->mapXMLCh2AttType.end(); ++ita)
{
XMLCh* p = (XMLCh*)ita->first;
xns::XMLString::release(&p);
}
this->mapXMLCh2AttType.clear();
}
// -----------------------------------------------------------------------
// Implementations of the SAX DocumentHandler interface
// -----------------------------------------------------------------------
void SaxPhreeqcHandlers::endDocument()
{
}
void SaxPhreeqcHandlers::endElement(const XMLCh* const uri, const XMLCh* const name, const XMLCh* const qname)
{
switch (this->mapXMLCh2Type[name])
{
case typeSOLUTION:
// solution is finished now copy into solutions array
{
int n;
// copy vector of conc's to solution
this->solution_ptr->totals = (struct conc*) PHRQ_realloc(this->solution_ptr->totals, (size_t) (this->totals.size() + 1) * sizeof(struct conc));
std::copy(this->totals.begin(), this->totals.end(), this->solution_ptr->totals);
this->solution_ptr->totals[this->totals.size()].description=NULL;
this->totals.clear();
assert(this->totals.size() == 0);
// copy vector of master_activities's to solution
this->solution_ptr->master_activity = (struct master_activity *) free_check_null(this->solution_ptr->master_activity);
if (this->acts.size() > 0) {
this->solution_ptr->master_activity = (struct master_activity *) PHRQ_realloc(this->solution_ptr->master_activity, (size_t) (this->acts.size()) * sizeof(struct master_activity));
std::copy(this->acts.begin(), this->acts.end(), this->solution_ptr->master_activity);
}
this->solution_ptr->count_master_activity = this->acts.size();
this->acts.clear();
assert(this->acts.size() == 0);
// copy vector of s_gamma's to solution
this->solution_ptr->species_gamma = (struct master_activity *) free_check_null(this->solution_ptr->species_gamma);
if (this->s_gammas.size() > 0) {
this->solution_ptr->species_gamma = (struct master_activity *) PHRQ_realloc(this->solution_ptr->species_gamma, (size_t) (this->s_gammas.size()) * sizeof(struct master_activity));
std::copy(this->s_gammas.begin(), this->s_gammas.end(), this->solution_ptr->species_gamma);
}
this->solution_ptr->count_species_gamma = this->s_gammas.size();
this->s_gammas.clear();
assert(this->s_gammas.size() == 0);
// copy vector of isotopes's to solution
this->solution_ptr->isotopes = (struct isotope *) free_check_null(this->solution_ptr->isotopes);
if (this->isotopes.size() > 0) {
this->solution_ptr->isotopes = (struct isotope *) PHRQ_realloc(this->solution_ptr->isotopes, (size_t) (this->isotopes.size()) * sizeof(struct isotope));
std::copy(this->isotopes.begin(), this->isotopes.end(), this->solution_ptr->isotopes);
}
this->solution_ptr->count_isotopes = this->isotopes.size();
this->isotopes.clear();
assert(this->isotopes.size() == 0);
// store solution for now
if (solution_bsearch(this->solution_ptr->n_user, &n, FALSE) != NULL) {
solution_free(solution[n]);
solution[n] = this->solution_ptr;
} else {
n = count_solution++;
if (count_solution >= max_solution)
{
space ((void **) &(solution), count_solution, &max_solution, sizeof (struct solution *) );
}
solution[n] = this->solution_ptr;
}
this->solution_ptr = NULL;
}
break;
default:
break;
}
}
void SaxPhreeqcHandlers::characters(const XMLCh* const chars, const unsigned int length)
{
// skip whitespace
//XMLCh* pChar = (XMLCh*)chars;
//while(pChar && iswspace(*pChar)) ++pChar;
//if (*pChar)
// {
/*
switch(this->eltType)
{
case typeSOLN_MASTER_ACTIVITY:
//xns::BaseRefVectorOf<XMLCh> *arg = xns::XMLString::tokenizeString(chars);
for ( i = 0; i < arg->size() - 1; i+=2 ) {
struct master_activity *ma = new master_activity();
ma->description = XMLCh_hsave( arg->elementAt(i), true);
ma->la = XMLCh2Double( arg->elementAt(i + 1));
this->acts.push_back(*ma);
}
//struct master_activity *ma = new master_activity();
//ma->description = NULL;
//this->acts.push_back(*ma);
break;
}
*/
}
void SaxPhreeqcHandlers::ignorableWhitespace(const XMLCh* const chars, const unsigned int length)
{
}
void SaxPhreeqcHandlers::processingInstruction(const XMLCh* const target, const XMLCh* const data)
{
}
void SaxPhreeqcHandlers::startDocument()
{
}
void SaxPhreeqcHandlers::startElement(const XMLCh* const uri, const XMLCh* const name, const XMLCh* const qname, const xns::Attributes& attributes)
{
//const char ERR_MSG[] = "Unpacking solution message: %s, element not found\n";
char *string;
int i;
string = xns::XMLString::transcode(name);
this->eltType = this->mapXMLCh2Type[name];
xns::XMLString::release(&string);
switch (this->eltType)
{
case typePHAST_STATE:
XMLCh *x;
x = xns::XMLString::transcode("nx");
i = XMLCh2Int(attributes.getValue(x));
xns::XMLString::release(&x);
break;
case typeSOLUTION:
assert(this->solution_ptr == NULL);
assert(this->totals.size() == 0);
assert(this->acts.size() == 0);
// allocate space for solution
this->solution_ptr = solution_alloc();
// process attributes for solution
processSolutionAttributes(attributes);
break;
case typeSOLN_PE:
assert(this->solution_ptr->pe != NULL);
// store pe, no need to clean up at end of solution
if ((attributes.getLength() >= 1) && (this->mapXMLCh2AttType[attributes.getLocalName(0)] == attSOLN_PE_name)){
string = xns::XMLString::transcode(attributes.getValue((unsigned int) 0));
pe_data_store(&(this->solution_ptr->pe), string);
xns::XMLString::release(&string);
} else {
++input_error;
sprintf(error_string, "No attribute data for SOLN_PE.\n");
error_msg(error_string, CONTINUE);
}
break;
case typeSOLN_TOTAL:
{
// store in c, push_back on totals
// need to copy and clean up at end of </solution>
struct conc c;
processSolutionTotalAttributes(attributes, &c);
this->totals.push_back(c);
}
break;
case typeSOLN_MASTER_ACTIVITY:
{
// store in ma, push_back on acts
// need to copy and clean up at end of </solution>
struct master_activity ma;
processMasterActivityAttributes(attributes, &ma);
this->acts.push_back(ma);
//processMasterActivityAttributes(attributes, &this->acts);
}
break;
case typeSOLN_SPECIES_GAMMA:
{
// store in ma, push_back on s_gammas
// need to copy and clean up at end of </solution>
struct master_activity ma;
processMasterActivityAttributes(attributes, &ma);
this->s_gammas.push_back(ma);
}
break;
case typeSOLN_ISOTOPE:
{
// store in iso, push_back on isotopes
// need to copy and clean up at end of </solution>
struct isotope iso;
processIsotopeAttributes(attributes, &iso);
this->isotopes.push_back(iso);
}
break;
default:
break;
}
}
int SaxPhreeqcHandlers::processSolutionAttributes(const xns::Attributes& attributes)
{
const char ERR_MSG[] = "Unpacking solution attributes: %s, attribute not found\n";
unsigned int i;
char *string;
attributeType attType;
assert(this->eltType == typeSOLUTION);
assert(this->solution_ptr != NULL);
// Get attribute name, map to attribute type, process
for (i = 0; i < attributes.getLength(); i++) {
attType = this->mapXMLCh2AttType[attributes.getLocalName(i)];
switch (attType) {
case attSOLN_new_def:
this->solution_ptr->new_def = XMLCh2Int(attributes.getValue(i));
break;
case attSOLN_n_user:
this->solution_ptr->n_user = XMLCh2Int(attributes.getValue(i));
break;
case attSOLN_n_user_end:
this->solution_ptr->n_user_end = XMLCh2Int(attributes.getValue(i));
break;
case attSOLN_description:
this->solution_ptr->description = XMLCh2String(attributes.getValue(i));
break;
case attSOLN_tc:
this->solution_ptr->tc = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_ph:
this->solution_ptr->ph = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_solution_pe:
this->solution_ptr->solution_pe = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_mu:
this->solution_ptr->mu = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_ah2o:
this->solution_ptr->ah2o = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_density:
this->solution_ptr->density = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_total_h:
this->solution_ptr->total_h = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_total_o:
this->solution_ptr->total_o = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_cb:
this->solution_ptr->cb = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_mass_water:
this->solution_ptr->mass_water = XMLCh2Double(attributes.getValue(i));
break;
case attSOLN_total_alkalinity:
this->solution_ptr->total_alkalinity = XMLCh2Double(attributes.getValue(i));
break;
//case attSOLN_total_co2:
//this->solution_ptr->total_co2 = XMLCh2Double(attributes.getValue(i));
//break;
case attSOLN_units:
this->solution_ptr->units = XMLCh_hsave(attributes.getValue(i), TRUE);
break;
case attSOLN_default_pe:
this->solution_ptr->default_pe = XMLCh2Int(attributes.getValue(i));
break;
case attSOLN_count_master_activity:
this->solution_ptr->count_master_activity = XMLCh2Int(attributes.getValue(i));
break;
case attSOLN_count_isotopes:
this->solution_ptr->count_isotopes = XMLCh2Int(attributes.getValue(i));
break;
case attSOLN_count_species_gamma:
this->solution_ptr->count_species_gamma = XMLCh2Int(attributes.getValue(i));
break;
default:
++input_error;
string = xns::XMLString::transcode(attributes.getLocalName(i));
sprintf(error_string, ERR_MSG, string);
error_msg(error_string, CONTINUE);
xns::XMLString::release(&string);
break;
}
}
return 0;
}
int SaxPhreeqcHandlers::processSolutionTotalAttributes(const xns::Attributes& attributes, struct conc *c)
{
const char ERR_MSG[] = "Unpacking solution totals attributes: %s, attribute not found\n";
unsigned int i;
char *string;
conc_init(c);
attributeType attType;
assert(this->eltType == typeSOLN_TOTAL);
// Get attribute name, map to attribute type, process
for (i = 0; i < attributes.getLength(); i++) {
attType = this->mapXMLCh2AttType[attributes.getLocalName(i)];
switch (attType) {
case attCONC_description:
c->description = XMLCh_hsave(attributes.getValue(i), TRUE);
break;
case attCONC_moles:
c->moles = XMLCh2Double(attributes.getValue(i));
break;
case attCONC_input_conc:
c->input_conc = XMLCh2Double(attributes.getValue(i));
break;
case attCONC_units:
c->units = XMLCh_hsave(attributes.getValue(i), TRUE);
break;
case attCONC_equation_name:
c->equation_name = XMLCh_hsave(attributes.getValue(i), TRUE);
c->phase = NULL;
break;
case attCONC_phase_si:
c->phase_si = XMLCh2Double(attributes.getValue(i));
break;
case attCONC_n_pe:
c->n_pe = XMLCh2Int(attributes.getValue(i));
break;
case attCONC_as:
c->as = XMLCh_hsave(attributes.getValue(i), TRUE);
break;
case attCONC_gfw:
c->gfw = XMLCh2Double(attributes.getValue(i));
break;
default:
++input_error;
string = xns::XMLString::transcode(attributes.getLocalName(i));
sprintf(error_string, ERR_MSG, string);
error_msg(error_string, CONTINUE);
xns::XMLString::release(&string);
break;
}
}
return(OK);
}
int SaxPhreeqcHandlers::processMasterActivityAttributes(const xns::Attributes& attributes, struct master_activity *ma)
//int SaxPhreeqcHandlers::processMasterActivityAttributes(const xns::Attributes& attributes, std::vector<struct master_activity> *v)
{
int i;
char *string;
const char ERR_MSG[] = "Unpacking master activity attributes: %s, attribute not found\n";
ma->description = NULL;
ma->la = 0.0;
attributeType attType;
for (i = 0; i < (int) attributes.getLength(); i++) {
attType = this->mapXMLCh2AttType[attributes.getLocalName(i)];
switch (attType) {
case attM_A_description:
ma->description = XMLCh_hsave(attributes.getValue(i), TRUE);
break;
case attM_A_la:
ma->la = XMLCh2Double(attributes.getValue(i));
break;
/*
case attM_A_list:
{
struct master_activity ma;
xns::BaseRefVectorOf<XMLCh> *arg = xns::XMLString::tokenizeString(attributes.getValue((unsigned int) 0));
for ( i = 0; i < arg->size(); i+=2 ) {
ma.description = XMLCh_hsave( arg->elementAt(i), TRUE);
if (strcmp(ma.description, "null") == 0) {
ma.description = NULL;
}
ma.la = XMLCh2Double( arg->elementAt(i+1));
//this->acts.push_back(ma);
(*v).push_back(ma);
}
}
break;
*/
default:
++input_error;
string = xns::XMLString::transcode(attributes.getLocalName(i));
sprintf(error_string, ERR_MSG, string);
error_msg(error_string, CONTINUE);
xns::XMLString::release(&string);
break;
}
}
return (OK);
}
int SaxPhreeqcHandlers::processIsotopeAttributes(const xns::Attributes& attributes, struct isotope *iso)
{
int i;
char *string;
const char ERR_MSG[] = "Unpacking isotope attributes: %s, attribute not found\n";
iso->primary = iso->master = NULL;
iso->elt_name = iso->isotope_name = NULL;
attributeType attType;
for (i = 0; i < (int) attributes.getLength(); i++) {
attType = this->mapXMLCh2AttType[attributes.getLocalName(i)];
switch (attType) {
case attISO_isotope_number:
iso->isotope_number = XMLCh2Int(attributes.getValue(i));
break;
case attISO_elt_name:
iso->elt_name = XMLCh_hsave(attributes.getValue(i), TRUE);
break;
case attISO_isotope_name:
iso->isotope_name = XMLCh_hsave(attributes.getValue(i), TRUE);
break;
case attISO_total:
iso->total = XMLCh2Double(attributes.getValue(i));
break;
case attISO_ratio:
iso->ratio = XMLCh2Double(attributes.getValue(i));
break;
case attISO_ratio_uncertainty:
iso->ratio_uncertainty = XMLCh2Double(attributes.getValue(i));
break;
case attISO_coef:
iso->coef = XMLCh2Double(attributes.getValue(i));
break;
default:
++input_error;
string = xns::XMLString::transcode(attributes.getLocalName(i));
sprintf(error_string, ERR_MSG, string);
error_msg(error_string, CONTINUE);
xns::XMLString::release(&string);
break;
}
}
return (OK);
}

20
SAXPhreeqc.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef _INC_SAXPHREEQC_H
#define _INC_SAXPHREEQC_H
#if defined(__cplusplus) | defined(_CPP)
extern "C" {
#endif
void SAX_StartSystem ();
int SAX_AddSolution (struct solution* solution_ptr);
void SAX_EndSystem ();
int SAX_GetXMLLength ();
const char* SAX_GetXMLStr ();
int SAX_UnpackSolutions(void* pvBuffer, int buf_size);
#if defined(__cplusplus) | defined(_CPP)
}
#endif
#endif

171
SSassemblage.cxx Normal file
View File

@ -0,0 +1,171 @@
// SSassemblage.cxx: implementation of the cxxSSassemblage class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "SSassemblage.h"
#include "SSassemblageSS.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxSSassemblage::cxxSSassemblage()
//
// default constructor for cxxSSassemblage
//
: cxxNumKeyword()
{
}
cxxSSassemblage::cxxSSassemblage(struct s_s_assemblage *s_s_assemblage_ptr)
//
// constructor for cxxSSassemblage from struct SSassemblage
//
:
cxxNumKeyword()
{
int i;
this->set_description(s_s_assemblage_ptr->description);
n_user = s_s_assemblage_ptr->n_user;
n_user_end = s_s_assemblage_ptr->n_user_end;
for (i = 0; i < s_s_assemblage_ptr->count_s_s; i++) {
cxxSSassemblageSS ssSS(&(s_s_assemblage_ptr->s_s[i]));
ssAssemblageSSs.push_back(ssSS);
}
}
cxxSSassemblage::~cxxSSassemblage()
{
}
struct s_s_assemblage *cxxSSassemblage::cxxSSassemblage2s_s_assemblage()
//
// Builds a s_s_assemblage structure from instance of cxxSSassemblage
//
{
struct s_s_assemblage *s_s_assemblage_ptr = s_s_assemblage_alloc();
s_s_assemblage_ptr->description = this->get_description();
s_s_assemblage_ptr->n_user = this->n_user;
s_s_assemblage_ptr->n_user_end = this->n_user_end;
s_s_assemblage_ptr->new_def = FALSE;
s_s_assemblage_ptr->count_s_s = this->ssAssemblageSSs.size();
s_s_assemblage_ptr->s_s = cxxSSassemblageSS::cxxSSassemblageSS2s_s(this->ssAssemblageSSs);
return(s_s_assemblage_ptr);
}
#ifdef SKIP
void cxxSSassemblage::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing SSassemblage message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// SSassemblage element and attributes
s_oss << indent0;
s_oss << "<EQUILIBRIUM_PHASES " << std::endl;
// eltList
this->eltList.dump_xml(s_oss, indent + 1);
// ssAssemblageSSs
s_oss << indent1;
s_oss << "<pure_phases " << std::endl;
for (std::list<cxxSSassemblageSS>::const_iterator it = ssAssemblageSSs.begin(); it != ssAssemblageSSs.end(); ++it) {
it->dump_xml(s_oss, indent + 2);
}
}
#endif
void cxxSSassemblage::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing SSassemblage message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// SSassemblage element and attributes
s_oss << indent0;
s_oss << "SOLID_SOLUTIONS_RAW " << this->n_user << " " << this->description << std::endl;
// ssAssemblageSSs
for (std::list<cxxSSassemblageSS>::const_iterator it = ssAssemblageSSs.begin(); it != ssAssemblageSSs.end(); ++it) {
s_oss << indent1;
s_oss << "-solid_solution" << std::endl;
it->dump_raw(s_oss, indent + 2);
}
}
void cxxSSassemblage::read_raw(CParser& parser)
{
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(10);
vopts.push_back("solid_solution"); // 0
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
bool useLastLine(false);
// Read SSassemblage number and description
this->read_number_description(parser);
opt_save = CParser::OPT_ERROR;
for (;;)
{
int opt;
if (useLastLine == false) {
opt = parser.get_option(vopts, next_char);
} else {
opt = parser.getOptionFromLastLine(vopts, next_char);
}
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_EOF;
parser.error_msg("Unknown input in EQUILIBRIUM_PHASES_RAW keyword.", CParser::OT_CONTINUE);
parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
useLastLine = false;
break;
case 0: // solid_solution
{
cxxSSassemblageSS ssSS;
ssSS.read_raw(parser);
this->ssAssemblageSSs.push_back(ssSS);
}
useLastLine = true;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
}

42
SSassemblage.h Normal file
View File

@ -0,0 +1,42 @@
#if !defined(SSASSEMBLAGE_H_INCLUDED)
#define SSASSEMBLAGE_H_INCLUDED
#include "NumKeyword.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
#include "SSassemblageSS.h"
class cxxSSassemblage : public cxxNumKeyword
{
public:
cxxSSassemblage();
cxxSSassemblage(struct s_s_assemblage *);
~cxxSSassemblage();
struct s_s_assemblage *cxxSSassemblage2s_s_assemblage();
struct s_s *cxxSSassemblageComp2s_s();
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
protected:
std::list<cxxSSassemblageSS> ssAssemblageSSs;
public:
//static std::map<int, cxxSSassemblage>& map;
};
#endif // !defined(SSASSEMBLAGE_H_INCLUDED)

443
SSassemblageSS.cxx Normal file
View File

@ -0,0 +1,443 @@
// SSassemblageSS.cxx: implementation of the cxxSSassemblageSS class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
#endif
#include "Utils.h" // define first
#include "SSassemblageSS.h"
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include "phqalloc.h"
#include "phrqproto.h"
#include <cassert> // assert
#include <algorithm> // std::sort
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxSSassemblageSS::cxxSSassemblageSS()
//
// default constructor for cxxSSassemblageSS
//
{
name = NULL;
//total_moles = 0;
a0 = 0;
a1 = 0;
ag0 = 0;
ag1 = 0;
miscibility = false;
//spinodal = false;
//tk = 25.;
xb1 = 0;
xb2 = 0;
//SS_PARAMETER_TYPE type = SS_PARM_NONE;
//double p[4];
}
cxxSSassemblageSS::cxxSSassemblageSS(struct s_s *s_s_ptr)
//
// constructor for cxxSSassemblageSS from struct s_s
//
{
name = s_s_ptr->name;
//total_moles = s_s_ptr->total_moles;
a0 = s_s_ptr->a0;
a1 = s_s_ptr->a1;
ag0 = s_s_ptr->ag0;
ag1 = s_s_ptr->ag1;
miscibility = (s_s_ptr->miscibility == TRUE);
//spinodal = (s_s_ptr->spinodal == TRUE);
//tk = s_s_ptr->tk;
xb1 = s_s_ptr->xb1;
xb2 = s_s_ptr->xb2;
//type = s_s_ptr->input_case;
/*
for (i = 0; i < 4; i++) {
p[i] = s_s_ptr->p[i];
}
*/
int i;
for (i = 0; i < s_s_ptr->count_comps; i++) {
comps[s_s_ptr->comps[i].name] = s_s_ptr->comps[i].moles;
}
}
cxxSSassemblageSS::~cxxSSassemblageSS()
{
}
struct s_s *cxxSSassemblageSS::cxxSSassemblageSS2s_s(std::list<cxxSSassemblageSS>& el)
//
// Builds s_s structure from of cxxSSassemblageSS
//
{
//
// generate s_s structures
//
struct s_s *s_s_ptr = (struct s_s *) PHRQ_malloc((size_t) (el.size() * sizeof(struct s_s)));
if (s_s_ptr == NULL) malloc_error();
int j = 0;
for (std::list<cxxSSassemblageSS>::iterator it = el.begin(); it != el.end(); ++it) {
s_s_ptr[j].name = it->name;
//s_s_ptr[j].total_moles = it->total_moles;
s_s_ptr[j].total_moles = 0;
s_s_ptr[j].dn = 0;
s_s_ptr[j].a0 = it->a0;
s_s_ptr[j].a1 = it->a1;
s_s_ptr[j].ag0 = it->ag0;
s_s_ptr[j].ag1 = it->ag1;
//s_s_ptr[j].ag0 = 0;
//s_s_ptr[j].ag1 = 0;
s_s_ptr[j].s_s_in = TRUE;
s_s_ptr[j].miscibility = it->miscibility;
//s_s_ptr[j].spinodal = it->spinodal;
s_s_ptr[j].spinodal = FALSE;
//s_s_ptr[j].tk = it->tk;
s_s_ptr[j].tk = 273.15;
s_s_ptr[j].xb1 = it->xb1;
s_s_ptr[j].xb2 = it->xb2;
s_s_ptr[j].input_case = 0;
s_s_ptr[j].p[0] = 0;
s_s_ptr[j].p[1] = 0;
s_s_ptr[j].p[2] = 0;
s_s_ptr[j].p[3] = 0;
//
// generate s_s_comp structures
//
s_s_ptr[j].count_comps = it->comps.size();
s_s_ptr[j].comps = NULL;
if (it->comps.size() > 0) {
int i = 0;
int n;
struct s_s_comp *s_s_comp_ptr = (struct s_s_comp *) PHRQ_malloc((size_t) (it->comps.size() * sizeof(struct s_s_comp)));
if (s_s_comp_ptr == NULL) malloc_error();
for (cxxNameDouble::iterator itc = it->comps.begin(); itc != it->comps.end(); ++ itc) {
s_s_comp_ptr[i].name = itc->first;
s_s_comp_ptr[i].phase = phase_bsearch(itc->first, &n, TRUE);
s_s_comp_ptr[i].initial_moles = 0;
s_s_comp_ptr[i].moles = itc->second;
s_s_comp_ptr[i].init_moles = 0;
s_s_comp_ptr[i].delta = 0;
s_s_comp_ptr[i].fraction_x = 0;
s_s_comp_ptr[i].log10_lambda = 0;
s_s_comp_ptr[i].log10_fraction_x = 0;
s_s_comp_ptr[i].dn = 0;
s_s_comp_ptr[i].dnc = 0;
s_s_comp_ptr[i].dnb = 0;
i++;
}
s_s_ptr[j].comps = s_s_comp_ptr;
}
j++;
}
return(s_s_ptr);
}
#ifdef SKIP
void cxxSSassemblageSS::dump_xml(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing s_s message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0(""), indent1(""), indent2("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
for(i = 0; i < indent + 1; ++i) indent1.append(Utilities::INDENT);
for(i = 0; i < indent + 2; ++i) indent2.append(Utilities::INDENT);
// S_S element and attributes
s_oss << indent0 << "name=\"" << this->name << "\"" << std::endl;
s_oss << indent0 << "add_formula=\"" << this->add_formula << "\"" << std::endl;
s_oss << indent0 << "si=\"" << this->si << "\"" << std::endl;
s_oss << indent0 << "moles=\"" << this->moles << "\"" << std::endl;
s_oss << indent0 << "delta=\"" << this->delta << "\"" << std::endl;
s_oss << indent0 << "initial_moles=\"" << this->initial_moles << "\"" << std::endl;
s_oss << indent0 << "dissolve_only=\"" << this->dissolve_only << "\"" << std::endl;
}
#endif
void cxxSSassemblageSS::dump_raw(std::ostream& s_oss, unsigned int indent)const
{
//const char ERR_MESSAGE[] = "Packing s_s message: %s, element not found\n";
unsigned int i;
s_oss.precision(DBL_DIG - 1);
std::string indent0("");
for(i = 0; i < indent; ++i) indent0.append(Utilities::INDENT);
// S_S element and attributes
s_oss << indent0 << "-name " << this->name << std::endl;
//s_oss << indent0 << "-total_moles " << this->total_moles << std::endl;
s_oss << indent0 << "-a0 " << this->a0 << std::endl;
s_oss << indent0 << "-a1 " << this->a1 << std::endl;
s_oss << indent0 << "-ag0 " << this->ag0 << std::endl;
s_oss << indent0 << "-ag1 " << this->ag1 << std::endl;
s_oss << indent0 << "-miscibility " << this->miscibility << std::endl;
//s_oss << indent0 << "-spinodal " << this->spinodal << std::endl;
//s_oss << indent0 << "-tk " << this->tk << std::endl;
s_oss << indent0 << "-xb1 " << this->xb1 << std::endl;
s_oss << indent0 << "-xb2 " << this->xb2 << std::endl;
s_oss << indent0 << "-component " << std::endl;
this->comps.dump_raw(s_oss, indent + 1);
}
void cxxSSassemblageSS::read_raw(CParser& parser)
{
std::string str;
static std::vector<std::string> vopts;
if (vopts.empty()) {
vopts.reserve(10);
vopts.push_back("name"); // 0
vopts.push_back("total_moles"); // 1
vopts.push_back("a0"); // 2
vopts.push_back("a1"); // 3
vopts.push_back("components"); // 4
vopts.push_back("miscibility"); // 5
vopts.push_back("spinodal"); // 6
vopts.push_back("tk"); // 7
vopts.push_back("xb1"); // 8
vopts.push_back("xb2"); // 9
vopts.push_back("ag0"); // 10
vopts.push_back("ag1"); // 11
}
std::istream::pos_type ptr;
std::istream::pos_type next_char;
std::string token;
int opt_save;
opt_save = CParser::OPT_ERROR;
bool name_defined(false);
//bool total_moles_defined(false);
bool a0_defined(false);
bool a1_defined(false);
bool ag0_defined(false);
bool ag1_defined(false);
bool miscibility_defined(false);
//bool spinodal_defined(false);
//bool tk_defined(false);
bool xb1_defined(false);
bool xb2_defined(false);
for (;;)
{
int opt = parser.get_option(vopts, next_char);
if (opt == CParser::OPT_DEFAULT)
{
opt = opt_save;
}
switch (opt)
{
case CParser::OPT_EOF:
break;
case CParser::OPT_KEYWORD:
break;
case CParser::OPT_DEFAULT:
case CParser::OPT_ERROR:
opt = CParser::OPT_KEYWORD;
// Allow return to Exchange for more processing
//parser.error_msg("Unknown input in S_S read.", CParser::OT_CONTINUE);
//parser.error_msg(parser.line().c_str(), CParser::OT_CONTINUE);
break;
case 0: // name
if (!(parser.get_iss() >> str))
{
this->name = NULL;
parser.incr_input_error();
parser.error_msg("Expected string value for name.", CParser::OT_CONTINUE);
} else {
this->name = string_hsave(str.c_str());
}
name_defined = true;
opt_save = CParser::OPT_DEFAULT;
break;
case 1: // total_moles
/*
if (!(parser.get_iss() >> this->total_moles))
{
this->total_moles = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for total_moles.", CParser::OT_CONTINUE);
}
total_moles_defined = true;
*/
opt_save = CParser::OPT_DEFAULT;
break;
case 2: // a0
if (!(parser.get_iss() >> this->a0))
{
this->a0 = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for a0.", CParser::OT_CONTINUE);
}
a0_defined = true;
opt_save = CParser::OPT_DEFAULT;
break;
case 3: // a1
if (!(parser.get_iss() >> this->a1))
{
this->a1 = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for a1.", CParser::OT_CONTINUE);
}
a1_defined = true;
opt_save = CParser::OPT_DEFAULT;
break;
case 4: // components
if ( this->comps.read_raw(parser, next_char) != CParser::PARSER_OK) {
parser.incr_input_error();
parser.error_msg("Expected phase name and moles for comps.", CParser::OT_CONTINUE);
}
opt_save = 4;
break;
case 5: // miscibility
if (!(parser.get_iss() >> this->miscibility))
{
this->miscibility = 0;
parser.incr_input_error();
parser.error_msg("Expected boolean value for miscibility.", CParser::OT_CONTINUE);
}
miscibility_defined = true;
opt_save = CParser::OPT_DEFAULT;
break;
case 6: // spinodal
/*
if (!(parser.get_iss() >> this->spinodal))
{
this->spinodal = 0;
parser.incr_input_error();
parser.error_msg("Expected boolean value for spinodal.", CParser::OT_CONTINUE);
}
spinodal_defined = true;
*/
opt_save = CParser::OPT_DEFAULT;
break;
case 7: // tk
/*
if (!(parser.get_iss() >> this->tk))
{
this->tk = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for tk.", CParser::OT_CONTINUE);
}
tk_defined = true;
*/
opt_save = CParser::OPT_DEFAULT;
break;
case 8: // xb1
if (!(parser.get_iss() >> this->xb1))
{
this->xb1 = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for xb1.", CParser::OT_CONTINUE);
}
xb1_defined = true;
opt_save = CParser::OPT_DEFAULT;
break;
case 9: // xb2
if (!(parser.get_iss() >> this->xb2))
{
this->xb2 = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for xb2.", CParser::OT_CONTINUE);
}
xb2_defined = true;
opt_save = CParser::OPT_DEFAULT;
break;
case 10: // ag0
if (!(parser.get_iss() >> this->ag0))
{
this->ag0 = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for ag0.", CParser::OT_CONTINUE);
}
ag0_defined = true;
opt_save = CParser::OPT_DEFAULT;
break;
case 11: // ag1
if (!(parser.get_iss() >> this->ag1))
{
this->ag1 = 0;
parser.incr_input_error();
parser.error_msg("Expected numeric value for ag1.", CParser::OT_CONTINUE);
}
ag1_defined = true;
opt_save = CParser::OPT_DEFAULT;
break;
}
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD) break;
}
// members that must be defined
if (name_defined == false) {
parser.incr_input_error();
parser.error_msg("Name not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
/*
if (total_moles_defined == false) {
parser.incr_input_error();
parser.error_msg("Total_moles not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
*/
if (a0_defined == false) {
parser.incr_input_error();
parser.error_msg("A0 not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
if (a1_defined == false) {
parser.incr_input_error();
parser.error_msg("A1 not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
if (ag0_defined == false) {
parser.incr_input_error();
parser.error_msg("Ag0 not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
if (ag1_defined == false) {
parser.incr_input_error();
parser.error_msg("Ag1 not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
if (miscibility_defined == false) {
parser.incr_input_error();
parser.error_msg("Miscibility not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
/*
if (spinodal_defined == false) {
parser.incr_input_error();
parser.error_msg("Spinodal not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
if (tk_defined == false) {
parser.incr_input_error();
parser.error_msg("Tk not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
*/
if (xb1_defined == false) {
parser.incr_input_error();
parser.error_msg("Xb1 not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
if (xb2_defined == false) {
parser.incr_input_error();
parser.error_msg("Xb2 not defined for SSassemblageSS input.", CParser::OT_CONTINUE);
}
}

65
SSassemblageSS.h Normal file
View File

@ -0,0 +1,65 @@
#if !defined(SSASSEMBLAGESS_H_INCLUDED)
#define SSASSEMBLAGESS_H_INCLUDED
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
class cxxSSassemblageSS
{
public:
cxxSSassemblageSS();
cxxSSassemblageSS(struct s_s *);
~cxxSSassemblageSS();
enum SS_PARAMETER_TYPE {
SS_PARM_NONE = -1,
SS_PARM_A0_A1 = 0,
SS_PARM_GAMMAS = 1,
SS_PARM_DIST_COEF = 2,
SS_PARM_MISCIBILITY = 3,
SS_PARM_SPINODAL = 4,
SS_PARM_CRITICAL = 5,
SS_PARM_ALYOTROPIC = 6,
SS_PARM_DIM_GUGG = 7,
SS_PARM_WALDBAUM = 8,
SS_PARM_MARGULES = 9
};
static struct s_s *cxxSSassemblageSS2s_s(std::list<cxxSSassemblageSS>& el);
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
void read_raw(CParser& parser);
protected:
char *name;
//std::list<cxxSSassemblageSS> ppAssemblageSS;
cxxNameDouble comps;
//double total_moles;
//double dn;
double a0, a1;
double ag0, ag1;
//bool s_s_in;
bool miscibility;
//bool spinodal;
//double tk;
double xb1, xb2;
//SS_PARAMETER_TYPE type;
//double p[4];
public:
};
#endif // !defined(SSASSEMBLAGESS_H_INCLUDED)

154
SaxPhreeqcHandlers.h Normal file
View File

@ -0,0 +1,154 @@
// SaxPhreeqcHandlers.h: interface for the SaxPhreeqcHandlers class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SAXPHREEQCHANDLERS_H__4A69D5F5_2E57_4001_911D_4ABF6F2C0A0B__INCLUDED_)
#define AFX_SAXPHREEQCHANDLERS_H__4A69D5F5_2E57_4001_911D_4ABF6F2C0A0B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <wchar.h> // iswspace sprintf
#include <xercesc/sax2/DefaultHandler.hpp> // SAX2XMLReader
/**
#include <hash_map>
**/
#include <vector>
#include <map>
#define xns XERCES_CPP_NAMESPACE
#ifdef USE_LONG_DOUBLE
#define LDBLE long double
#else
#define LDBLE double
#endif
struct XMLCH_LESS : std::binary_function<const XMLCh*, const XMLCh*, bool> {
bool operator()(const XMLCh* _X, const XMLCh* _Y) const
{
return xns::XMLString::compareString( _X, _Y) < 0;}
};
#include <math.h>
//extern "C" {
#define EXTERNAL extern
//#include "phqalloc.h"
#include "global.h"
#include "phrqproto.h"
// int conc_init(struct conc *conc_ptr);
//}
class Cconc : public conc
{
public:
Cconc() { conc_init(this); }
~Cconc() { ; }
};
class SaxPhreeqcHandlers : public xns::DefaultHandler
{
public:
SaxPhreeqcHandlers();
virtual ~SaxPhreeqcHandlers();
// -----------------------------------------------------------------------
// Implementations of the SAX DocumentHandler interface
// -----------------------------------------------------------------------
void endDocument();
void endElement(const XMLCh* const uri, const XMLCh* const name, const XMLCh* const qname);
void characters(const XMLCh* const chars, const unsigned int length);
void ignorableWhitespace(const XMLCh* const chars, const unsigned int length);
void processingInstruction(const XMLCh* const target, const XMLCh* const data);
void startDocument();
void startElement(const XMLCh* const uri, const XMLCh* const name, const XMLCh* const qname, const xns::Attributes& attributes);
// element types
enum elementType
{
typeNULL,
typePHAST_STATE,
typeSYSTEM,
typeSOLUTION,
typeSOLN_PE,
typeSOLN_TOTAL,
typeSOLN_MASTER_ACTIVITY,
typeSOLN_ISOTOPE,
typeSOLN_SPECIES_GAMMA
} eltType;
// attribute types
enum attributeType
{
attNULL,
attSOLN_new_def,
attSOLN_n_user,
attSOLN_n_user_end,
attSOLN_description,
attSOLN_tc,
attSOLN_ph,
attSOLN_solution_pe,
attSOLN_mu,
attSOLN_ah2o,
attSOLN_density,
attSOLN_total_h,
attSOLN_total_o,
attSOLN_cb,
attSOLN_mass_water,
attSOLN_total_alkalinity,
attSOLN_total_co2,
attSOLN_units,
attSOLN_default_pe,
attSOLN_count_master_activity,
attSOLN_count_isotopes,
attSOLN_count_species_gamma,
attSOLN_PE_name,
attM_A_description,
attM_A_la,
attM_A_list,
attISO_isotope_number,
attISO_elt_name,
attISO_isotope_name,
attISO_total,
attISO_ratio,
attISO_ratio_uncertainty,
attISO_x_ratio_uncertainty,
attISO_coef,
attCONC_description,
attCONC_moles,
attCONC_input_conc,
attCONC_units,
attCONC_equation_name,
attCONC_phase_si,
attCONC_n_pe,
attCONC_as,
attCONC_gfw,
} attType;
int processSolutionAttributes(const xns::Attributes& attributes);
int processSolutionTotalAttributes(const xns::Attributes& attributes, struct conc *c);
int processMasterActivityAttributes(const xns::Attributes& attributes, struct master_activity *ma);
//int processMasterActivityAttributes(const xns::Attributes& attributes, std::vector<struct master_activity> *v);
int processIsotopeAttributes(const xns::Attributes& attributes, struct isotope *iso);
protected:
std::vector<conc> totals;
std::vector<master_activity> acts, s_gammas;
std::vector<isotope> isotopes;
std::map< const XMLCh*, elementType, XMLCH_LESS > mapXMLCh2Type;
std::map< const XMLCh*, attributeType, XMLCH_LESS > mapXMLCh2AttType;
/**
std::hash_map<const XMLCh*, ElementType, hash<const XMLCh*>, XMLCH_EQUALS> m_hashmapXMLCh2Type;
**/
struct solution* solution_ptr;
};
#endif // !defined(AFX_SAXPHREEQCHANDLERS_H__4A69D5F5_2E57_4001_911D_4ABF6F2C0A0B__INCLUDED_)

1102
Solution.cxx Normal file

File diff suppressed because it is too large Load Diff

94
Solution.h Normal file
View File

@ -0,0 +1,94 @@
#if !defined(SOLUTION_H_INCLUDED)
#define SOLUTION_H_INCLUDED
#include "NumKeyword.h"
#include "Isotope.h"
#include "Conc.h"
#include "NameDouble.h"
#define EXTERNAL extern
#include "global.h"
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "char_star.h"
class cxxSolution : public cxxNumKeyword
{
public:
cxxSolution();
cxxSolution(struct solution *);
//cxxSolution(const cxxSolution&);
~cxxSolution();
//static cxxSolution& read(CParser& parser);
double get_tc()const {return this->tc;}
void set_tc(double tc) {this->tc = tc;}
double get_ph()const {return this->ph;}
void set_ph(double pH) {this->ph = pH;}
double get_pe()const {return this->pe;}
void set_pe(double pe) {this->pe =pe;}
double get_mu()const {return this->mu;}
void set_mu(double mu) {this->pe = mu;}
double get_ah2o()const {return this->ah2o;}
void set_ah2o(double ah2o) {this->pe = ah2o;}
double get_total_h()const {return this->total_h;}
void set_total_h(double total_h) {this->pe = mu;}
double get_total_o()const {return this->total_o;}
void set_total_o(double total_o) {this->pe = mu;}
double get_mass_water()const {return this->mass_water;};
void set_mass_water(long double mass_water) {this->mass_water = mass_water;};
double get_total_alkalinity()const {return this->total_alkalinity;}
void set_total_alkalinity(double total_alkalinity) {this->pe = total_alkalinity;}
//char * get_pe_reaction()const {return this->pe_reaction;}
//void set_pe_reaction(char * pe_reaction) {this->pe_reaction = pe_reaction;}
struct solution *cxxSolution2solution();
void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void cxxSolution::dump_raw(std::ostream& s_oss, unsigned int indent)const;
void cxxSolution::read_raw(CParser& parser);
protected:
double tc;
double ph;
double pe;
double mu;
double ah2o;
double total_h;
double total_o;
double cb;
double mass_water;
double total_alkalinity;
// maps element name to moles
//std::map <char *, double, CHARSTAR_LESS> totals;
cxxNameDouble totals;
std::list<cxxIsotope> isotopes;
// maps master species name log activity
//std::map <char *, double> master_activity;
cxxNameDouble master_activity;
// maps species name to Pitzer activty coefficient
//std::map <char *, double> species_gamma;
cxxNameDouble species_gamma;
public:
//static std::map<int, cxxSolution>& map;
};
#endif // !defined(SOLUTION_H_INCLUDED)

0
Sun/examples/ex1.log Normal file
View File

325
Sun/examples/ex1.out Normal file
View File

@ -0,0 +1,325 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex1
Output file: ex1.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 1.--Add uranium and speciate seawater.
SOLUTION 1 SEAWATER FROM NORDSTROM ET AL. (1979)
units ppm
pH 8.22
pe 8.451
density 1.023
temp 25.0
redox O(0)/O(-2)
Ca 412.3
Mg 1291.8
Na 10768.0
K 399.1
Fe 0.002
Mn 0.0002 pe
Si 4.28
Cl 19353.0
Alkalinity 141.682 as HCO3
S(6) 2712.0
N(5) 0.29 gfw 62.0
N(-3) 0.03 as NH4
U 3.3 ppb N(5)/N(-3)
O(0) 1.0 O2(g) -0.7
SOLUTION_MASTER_SPECIES
U U+4 0.0 238.0290 238.0290
U(4) U+4 0.0 238.0290
U(5) UO2+ 0.0 238.0290
U(6) UO2+2 0.0 238.0290
SOLUTION_SPECIES
U+4 = U+4
log_k 0.0
U+4 + 4 H2O = U(OH)4 + 4 H+
log_k -8.538
delta_h 24.760 kcal
U+4 + 5 H2O = U(OH)5- + 5 H+
log_k -13.147
delta_h 27.580 kcal
U+4 + 2 H2O = UO2+ + 4 H+ + e-
log_k -6.432
delta_h 31.130 kcal
U+4 + 2 H2O = UO2+2 + 4 H+ + 2 e-
log_k -9.217
delta_h 34.430 kcal
UO2+2 + H2O = UO2OH+ + H+
log_k -5.782
delta_h 11.015 kcal
2UO2+2 + 2H2O = (UO2)2(OH)2+2 + 2H+
log_k -5.626
delta_h -36.04 kcal
3UO2+2 + 5H2O = (UO2)3(OH)5+ + 5H+
log_k -15.641
delta_h -44.27 kcal
UO2+2 + CO3-2 = UO2CO3
log_k 10.064
delta_h 0.84 kcal
UO2+2 + 2CO3-2 = UO2(CO3)2-2
log_k 16.977
delta_h 3.48 kcal
UO2+2 + 3CO3-2 = UO2(CO3)3-4
log_k 21.397
delta_h -8.78 kcal
PHASES
Uraninite
UO2 + 4 H+ = U+4 + 2 H2O
log_k -3.490
delta_h -18.630 kcal
END
-----
TITLE
-----
Example 1.--Add uranium and speciate seawater.
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1. SEAWATER FROM NORDSTROM ET AL. (1979)
-----------------------------Solution composition------------------------------
Elements Molality Moles
Alkalinity 2.406e-03 2.406e-03
Ca 1.066e-02 1.066e-02
Cl 5.657e-01 5.657e-01
Fe 3.711e-08 3.711e-08
K 1.058e-02 1.058e-02
Mg 5.507e-02 5.507e-02
Mn 3.773e-09 3.773e-09
N(-3) 1.724e-06 1.724e-06
N(5) 4.847e-06 4.847e-06
Na 4.854e-01 4.854e-01
O(0) 3.746e-04 3.746e-04 Equilibrium with O2(g)
S(6) 2.926e-02 2.926e-02
Si 7.382e-05 7.382e-05
U 1.437e-08 1.437e-08
----------------------------Description of solution----------------------------
pH = 8.220
pe = 8.451
Activity of water = 0.981
Ionic strength = 6.748e-01
Mass of water (kg) = 1.000e+00
Total carbon (mol/kg) = 2.180e-03
Total CO2 (mol/kg) = 2.180e-03
Temperature (deg C) = 25.000
Electrical balance (eq) = 7.936e-04
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.07
Iterations = 7
Total H = 1.110147e+02
Total O = 5.563047e+01
---------------------------------Redox couples---------------------------------
Redox couple pe Eh (volts)
N(-3)/N(5) 4.6750 0.2766
O(-2)/O(0) 12.3893 0.7329
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 2.674e-06 1.629e-06 -5.573 -5.788 -0.215
H+ 7.981e-09 6.026e-09 -8.098 -8.220 -0.122
H2O 5.551e+01 9.806e-01 1.744 -0.009 0.000
C(4) 2.180e-03
HCO3- 1.514e-03 1.023e-03 -2.820 -2.990 -0.170
MgHCO3+ 2.195e-04 1.640e-04 -3.658 -3.785 -0.127
NaHCO3 1.667e-04 1.948e-04 -3.778 -3.710 0.067
MgCO3 8.913e-05 1.041e-04 -4.050 -3.982 0.067
NaCO3- 6.718e-05 5.020e-05 -4.173 -4.299 -0.127
CaHCO3+ 4.597e-05 3.106e-05 -4.337 -4.508 -0.170
CO3-2 3.821e-05 7.959e-06 -4.418 -5.099 -0.681
CaCO3 2.725e-05 3.183e-05 -4.565 -4.497 0.067
CO2 1.210e-05 1.413e-05 -4.917 -4.850 0.067
UO2(CO3)3-4 1.255e-08 1.184e-10 -7.901 -9.927 -2.025
UO2(CO3)2-2 1.814e-09 5.653e-10 -8.741 -9.248 -0.506
MnCO3 2.696e-10 3.150e-10 -9.569 -9.502 0.067
MnHCO3+ 6.077e-11 4.541e-11 -10.216 -10.343 -0.127
UO2CO3 7.429e-12 8.678e-12 -11.129 -11.062 0.067
FeCO3 1.952e-20 2.281e-20 -19.709 -19.642 0.067
FeHCO3+ 1.635e-20 1.222e-20 -19.786 -19.913 -0.127
Ca 1.066e-02
Ca+2 9.504e-03 2.380e-03 -2.022 -2.623 -0.601
CaSO4 1.083e-03 1.266e-03 -2.965 -2.898 0.067
CaHCO3+ 4.597e-05 3.106e-05 -4.337 -4.508 -0.170
CaCO3 2.725e-05 3.183e-05 -4.565 -4.497 0.067
CaOH+ 8.604e-08 6.429e-08 -7.065 -7.192 -0.127
CaHSO4+ 5.979e-11 4.467e-11 -10.223 -10.350 -0.127
Cl 5.657e-01
Cl- 5.657e-01 3.528e-01 -0.247 -0.452 -0.205
MnCl+ 9.582e-10 7.160e-10 -9.019 -9.145 -0.127
MnCl2 9.439e-11 1.103e-10 -10.025 -9.958 0.067
MnCl3- 1.434e-11 1.071e-11 -10.844 -10.970 -0.127
FeCl+2 9.557e-19 2.978e-19 -18.020 -18.526 -0.506
FeCl2+ 6.281e-19 4.693e-19 -18.202 -18.329 -0.127
FeCl+ 7.786e-20 5.817e-20 -19.109 -19.235 -0.127
FeCl3 1.417e-20 1.656e-20 -19.849 -19.781 0.067
Fe(2) 6.909e-19
Fe+2 5.205e-19 1.195e-19 -18.284 -18.923 -0.639
FeCl+ 7.786e-20 5.817e-20 -19.109 -19.235 -0.127
FeSO4 4.845e-20 5.660e-20 -19.315 -19.247 0.067
FeCO3 1.952e-20 2.281e-20 -19.709 -19.642 0.067
FeHCO3+ 1.635e-20 1.222e-20 -19.786 -19.913 -0.127
FeOH+ 8.227e-21 6.147e-21 -20.085 -20.211 -0.127
FeHSO4+ 3.000e-27 2.242e-27 -26.523 -26.649 -0.127
Fe(3) 3.711e-08
Fe(OH)3 2.841e-08 3.318e-08 -7.547 -7.479 0.067
Fe(OH)4- 6.591e-09 4.924e-09 -8.181 -8.308 -0.127
Fe(OH)2+ 2.118e-09 1.583e-09 -8.674 -8.801 -0.127
FeOH+2 9.425e-14 2.937e-14 -13.026 -13.532 -0.506
FeSO4+ 1.093e-18 8.167e-19 -17.961 -18.088 -0.127
FeCl+2 9.557e-19 2.978e-19 -18.020 -18.526 -0.506
FeCl2+ 6.281e-19 4.693e-19 -18.202 -18.329 -0.127
Fe+3 3.509e-19 2.796e-20 -18.455 -19.554 -1.099
Fe(SO4)2- 6.372e-20 4.761e-20 -19.196 -19.322 -0.127
FeCl3 1.417e-20 1.656e-20 -19.849 -19.781 0.067
Fe2(OH)2+4 2.462e-24 2.322e-26 -23.609 -25.634 -2.025
FeHSO4+2 4.228e-26 1.318e-26 -25.374 -25.880 -0.506
Fe3(OH)4+5 1.122e-29 7.679e-33 -28.950 -32.115 -3.165
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.436 -44.369 0.067
K 1.058e-02
K+ 1.042e-02 6.495e-03 -1.982 -2.187 -0.205
KSO4- 1.627e-04 1.216e-04 -3.789 -3.915 -0.127
KOH 3.137e-09 3.665e-09 -8.503 -8.436 0.067
Mg 5.507e-02
Mg+2 4.742e-02 1.371e-02 -1.324 -1.863 -0.539
MgSO4 7.330e-03 8.562e-03 -2.135 -2.067 0.067
MgHCO3+ 2.195e-04 1.640e-04 -3.658 -3.785 -0.127
MgCO3 8.913e-05 1.041e-04 -4.050 -3.982 0.067
MgOH+ 1.084e-05 8.100e-06 -4.965 -5.092 -0.127
Mn(2) 3.773e-09
Mn+2 2.171e-09 4.982e-10 -8.663 -9.303 -0.639
MnCl+ 9.582e-10 7.160e-10 -9.019 -9.145 -0.127
MnCO3 2.696e-10 3.150e-10 -9.569 -9.502 0.067
MnSO4 2.021e-10 2.360e-10 -9.695 -9.627 0.067
MnCl2 9.439e-11 1.103e-10 -10.025 -9.958 0.067
MnHCO3+ 6.077e-11 4.541e-11 -10.216 -10.343 -0.127
MnCl3- 1.434e-11 1.071e-11 -10.844 -10.970 -0.127
MnOH+ 2.789e-12 2.084e-12 -11.555 -11.681 -0.127
Mn(NO3)2 1.375e-20 1.607e-20 -19.862 -19.794 0.067
Mn(3) 5.993e-26
Mn+3 5.993e-26 4.349e-27 -25.222 -26.362 -1.139
N(-3) 1.724e-06
NH4+ 1.609e-06 9.049e-07 -5.794 -6.043 -0.250
NH3 7.326e-08 8.558e-08 -7.135 -7.068 0.067
NH4SO4- 4.157e-08 3.106e-08 -7.381 -7.508 -0.127
N(5) 4.847e-06
NO3- 4.847e-06 2.846e-06 -5.314 -5.546 -0.231
Mn(NO3)2 1.375e-20 1.607e-20 -19.862 -19.794 0.067
Na 4.854e-01
Na+ 4.791e-01 3.387e-01 -0.320 -0.470 -0.151
NaSO4- 6.053e-03 4.523e-03 -2.218 -2.345 -0.127
NaHCO3 1.667e-04 1.948e-04 -3.778 -3.710 0.067
NaCO3- 6.718e-05 5.020e-05 -4.173 -4.299 -0.127
NaOH 3.117e-07 3.641e-07 -6.506 -6.439 0.067
O(0) 3.746e-04
O2 1.873e-04 2.188e-04 -3.727 -3.660 0.067
S(6) 2.926e-02
SO4-2 1.463e-02 2.664e-03 -1.835 -2.574 -0.740
MgSO4 7.330e-03 8.562e-03 -2.135 -2.067 0.067
NaSO4- 6.053e-03 4.523e-03 -2.218 -2.345 -0.127
CaSO4 1.083e-03 1.266e-03 -2.965 -2.898 0.067
KSO4- 1.627e-04 1.216e-04 -3.789 -3.915 -0.127
NH4SO4- 4.157e-08 3.106e-08 -7.381 -7.508 -0.127
HSO4- 2.089e-09 1.561e-09 -8.680 -8.807 -0.127
MnSO4 2.021e-10 2.360e-10 -9.695 -9.627 0.067
CaHSO4+ 5.979e-11 4.467e-11 -10.223 -10.350 -0.127
FeSO4+ 1.093e-18 8.167e-19 -17.961 -18.088 -0.127
Fe(SO4)2- 6.372e-20 4.761e-20 -19.196 -19.322 -0.127
FeSO4 4.845e-20 5.660e-20 -19.315 -19.247 0.067
FeHSO4+2 4.228e-26 1.318e-26 -25.374 -25.880 -0.506
FeHSO4+ 3.000e-27 2.242e-27 -26.523 -26.649 -0.127
Si 7.382e-05
H4SiO4 7.110e-05 8.306e-05 -4.148 -4.081 0.067
H3SiO4- 2.720e-06 2.032e-06 -5.565 -5.692 -0.127
H2SiO4-2 7.362e-11 2.294e-11 -10.133 -10.639 -0.506
U(4) 1.034e-21
U(OH)5- 1.034e-21 7.725e-22 -20.985 -21.112 -0.127
U(OH)4 1.652e-25 1.930e-25 -24.782 -24.715 0.067
U+4 0.000e+00 0.000e+00 -46.997 -49.022 -2.025
U(5) 1.622e-18
UO2+ 1.622e-18 1.212e-18 -17.790 -17.916 -0.127
U(6) 1.437e-08
UO2(CO3)3-4 1.255e-08 1.184e-10 -7.901 -9.927 -2.025
UO2(CO3)2-2 1.814e-09 5.653e-10 -8.741 -9.248 -0.506
UO2CO3 7.429e-12 8.678e-12 -11.129 -11.062 0.067
UO2OH+ 3.385e-14 2.530e-14 -13.470 -13.597 -0.127
UO2+2 3.019e-16 9.409e-17 -15.520 -16.026 -0.506
(UO2)2(OH)2+2 1.780e-21 5.547e-22 -20.750 -21.256 -0.506
(UO2)3(OH)5+ 2.908e-23 2.173e-23 -22.536 -22.663 -0.127
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -0.84 -5.20 -4.36 CaSO4
Aragonite 0.61 -7.72 -8.34 CaCO3
Calcite 0.76 -7.72 -8.48 CaCO3
Chalcedony -0.51 -4.06 -3.55 SiO2
Chrysotile 3.36 35.56 32.20 Mg3Si2O5(OH)4
CO2(g) -3.38 -4.85 -1.47 CO2
Dolomite 2.41 -14.68 -17.09 CaMg(CO3)2
Fe(OH)3(a) 0.19 5.08 4.89 Fe(OH)3
Goethite 6.09 5.09 -1.00 FeOOH
Gypsum -0.63 -5.21 -4.58 CaSO4:2H2O
H2(g) -41.22 -44.37 -3.15 H2
H2O(g) -1.52 -0.01 1.51 H2O
Halite -2.50 -0.92 1.58 NaCl
Hausmannite 1.57 62.60 61.03 Mn3O4
Hematite 14.20 10.19 -4.01 Fe2O3
Jarosite-K -7.52 -16.73 -9.21 KFe3(SO4)2(OH)6
Manganite 2.39 27.73 25.34 MnOOH
Melanterite -19.35 -21.56 -2.21 FeSO4:7H2O
NH3(g) -8.84 -7.07 1.77 NH3
O2(g) -0.70 -3.66 -2.96 O2
Pyrochroite -8.08 7.12 15.20 Mn(OH)2
Pyrolusite 6.96 48.34 41.38 MnO2
Quartz -0.08 -4.06 -3.98 SiO2
Rhodochrosite -3.27 -14.40 -11.13 MnCO3
Sepiolite 1.16 16.92 15.76 Mg2Si3O7.5OH:3H2O
Sepiolite(d) -1.74 16.92 18.66 Mg2Si3O7.5OH:3H2O
Siderite -13.13 -24.02 -10.89 FeCO3
SiO2(a) -1.35 -4.06 -2.71 SiO2
Talc 6.04 27.44 21.40 Mg3Si4O10(OH)2
Uraninite -12.67 -16.16 -3.49 UO2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
-----------
End of run.
-----------
No memory leaks

0
Sun/examples/ex10.log Normal file
View File

9431
Sun/examples/ex10.out Normal file

File diff suppressed because it is too large Load Diff

701
Sun/examples/ex10.sel Normal file
View File

@ -0,0 +1,701 @@
reaction lg_SigmaPi X_Arag X_Stront X_Ca_aq X_Sr_aq mol_Misc1 mol_Misc2 mol_Arag mol_Stront
1.0000e-05 -8.3356e+00 9.9996e-01 4.2096e-05 9.9905e-01 9.4867e-04 1.0000e-10 1.0000e-10 6.5428e-06 2.7544e-10
2.0000e-05 -8.3352e+00 9.9992e-01 8.4301e-05 9.9810e-01 1.8967e-03 1.0000e-10 1.0000e-10 1.3083e-05 1.1030e-09
3.0000e-05 -8.3348e+00 9.9987e-01 1.2662e-04 9.9716e-01 2.8440e-03 1.0000e-10 1.0000e-10 1.9622e-05 2.4848e-09
4.0000e-05 -8.3345e+00 9.9983e-01 1.6904e-04 9.9621e-01 3.7906e-03 1.0000e-10 1.0000e-10 2.6159e-05 4.4226e-09
5.0000e-05 -8.3341e+00 9.9979e-01 2.1158e-04 9.9526e-01 4.7366e-03 1.0000e-10 1.0000e-10 3.2693e-05 6.9185e-09
6.0000e-05 -8.3337e+00 9.9975e-01 2.5422e-04 9.9432e-01 5.6819e-03 1.0000e-10 1.0000e-10 3.9225e-05 9.9745e-09
7.0000e-05 -8.3333e+00 9.9970e-01 2.9698e-04 9.9337e-01 6.6265e-03 1.0000e-10 1.0000e-10 4.5755e-05 1.3593e-08
8.0000e-05 -8.3329e+00 9.9966e-01 3.3985e-04 9.9243e-01 7.5705e-03 1.0000e-10 1.0000e-10 5.2283e-05 1.7775e-08
9.0000e-05 -8.3325e+00 9.9962e-01 3.8284e-04 9.9149e-01 8.5137e-03 1.0000e-10 1.0000e-10 5.8809e-05 2.2523e-08
1.0000e-04 -8.3321e+00 9.9957e-01 4.2593e-04 9.9054e-01 9.4563e-03 1.0000e-10 1.0000e-10 6.5333e-05 2.7839e-08
1.1000e-04 -8.3318e+00 9.9953e-01 4.6914e-04 9.8960e-01 1.0398e-02 1.0000e-10 1.0000e-10 7.1855e-05 3.3726e-08
1.2000e-04 -8.3314e+00 9.9949e-01 5.1247e-04 9.8866e-01 1.1340e-02 1.0000e-10 1.0000e-10 7.8374e-05 4.0185e-08
1.3000e-04 -8.3310e+00 9.9944e-01 5.5591e-04 9.8772e-01 1.2280e-02 1.0000e-10 1.0000e-10 8.4891e-05 4.7218e-08
1.4000e-04 -8.3306e+00 9.9940e-01 5.9946e-04 9.8678e-01 1.3220e-02 1.0000e-10 1.0000e-10 9.1407e-05 5.4828e-08
1.5000e-04 -8.3302e+00 9.9936e-01 6.4313e-04 9.8584e-01 1.4159e-02 1.0000e-10 1.0000e-10 9.7920e-05 6.3016e-08
1.6000e-04 -8.3298e+00 9.9931e-01 6.8692e-04 9.8490e-01 1.5098e-02 1.0000e-10 1.0000e-10 1.0443e-04 7.1784e-08
1.7000e-04 -8.3294e+00 9.9927e-01 7.3082e-04 9.8396e-01 1.6036e-02 1.0000e-10 1.0000e-10 1.1094e-04 8.1136e-08
1.8000e-04 -8.3290e+00 9.9923e-01 7.7484e-04 9.8303e-01 1.6973e-02 1.0000e-10 1.0000e-10 1.1745e-04 9.1072e-08
1.9000e-04 -8.3287e+00 9.9918e-01 8.1897e-04 9.8209e-01 1.7909e-02 1.0000e-10 1.0000e-10 1.2395e-04 1.0160e-07
2.0000e-04 -8.3283e+00 9.9914e-01 8.6323e-04 9.8115e-01 1.8845e-02 1.0000e-10 1.0000e-10 1.3045e-04 1.1271e-07
2.1000e-04 -8.3279e+00 9.9909e-01 9.0760e-04 9.8022e-01 1.9780e-02 1.0000e-10 1.0000e-10 1.3695e-04 1.2441e-07
2.2000e-04 -8.3275e+00 9.9905e-01 9.5209e-04 9.7929e-01 2.0715e-02 1.0000e-10 1.0000e-10 1.4345e-04 1.3671e-07
2.3000e-04 -8.3271e+00 9.9900e-01 9.9670e-04 9.7835e-01 2.1649e-02 1.0000e-10 1.0000e-10 1.4995e-04 1.4960e-07
2.4000e-04 -8.3267e+00 9.9896e-01 1.0414e-03 9.7742e-01 2.2582e-02 1.0000e-10 1.0000e-10 1.5644e-04 1.6309e-07
2.5000e-04 -8.3263e+00 9.9891e-01 1.0863e-03 9.7649e-01 2.3514e-02 1.0000e-10 1.0000e-10 1.6293e-04 1.7719e-07
2.6000e-04 -8.3259e+00 9.9887e-01 1.1313e-03 9.7555e-01 2.4446e-02 1.0000e-10 1.0000e-10 1.6942e-04 1.9188e-07
2.7000e-04 -8.3256e+00 9.9882e-01 1.1764e-03 9.7462e-01 2.5377e-02 1.0000e-10 1.0000e-10 1.7591e-04 2.0718e-07
2.8000e-04 -8.3252e+00 9.9878e-01 1.2216e-03 9.7369e-01 2.6308e-02 1.0000e-10 1.0000e-10 1.8240e-04 2.2308e-07
2.9000e-04 -8.3248e+00 9.9873e-01 1.2669e-03 9.7276e-01 2.7238e-02 1.0000e-10 1.0000e-10 1.8888e-04 2.3960e-07
3.0000e-04 -8.3244e+00 9.9869e-01 1.3124e-03 9.7183e-01 2.8167e-02 1.0000e-10 1.0000e-10 1.9536e-04 2.5672e-07
3.1000e-04 -8.3240e+00 9.9864e-01 1.3580e-03 9.7090e-01 2.9095e-02 1.0000e-10 1.0000e-10 2.0184e-04 2.7446e-07
3.2000e-04 -8.3236e+00 9.9860e-01 1.4037e-03 9.6998e-01 3.0023e-02 1.0000e-10 1.0000e-10 2.0832e-04 2.9282e-07
3.3000e-04 -8.3232e+00 9.9855e-01 1.4495e-03 9.6905e-01 3.0950e-02 1.0000e-10 1.0000e-10 2.1479e-04 3.1179e-07
3.4000e-04 -8.3228e+00 9.9850e-01 1.4955e-03 9.6812e-01 3.1877e-02 1.0000e-10 1.0000e-10 2.2126e-04 3.3139e-07
3.5000e-04 -8.3225e+00 9.9846e-01 1.5416e-03 9.6720e-01 3.2802e-02 1.0000e-10 1.0000e-10 2.2773e-04 3.5161e-07
3.6000e-04 -8.3221e+00 9.9841e-01 1.5878e-03 9.6627e-01 3.3727e-02 1.0000e-10 1.0000e-10 2.3420e-04 3.7245e-07
3.7000e-04 -8.3217e+00 9.9837e-01 1.6341e-03 9.6535e-01 3.4652e-02 1.0000e-10 1.0000e-10 2.4067e-04 3.9392e-07
3.8000e-04 -8.3213e+00 9.9832e-01 1.6806e-03 9.6442e-01 3.5576e-02 1.0000e-10 1.0000e-10 2.4713e-04 4.1602e-07
3.9000e-04 -8.3209e+00 9.9827e-01 1.7272e-03 9.6350e-01 3.6499e-02 1.0000e-10 1.0000e-10 2.5359e-04 4.3876e-07
4.0000e-04 -8.3205e+00 9.9823e-01 1.7739e-03 9.6258e-01 3.7421e-02 1.0000e-10 1.0000e-10 2.6005e-04 4.6213e-07
4.1000e-04 -8.3201e+00 9.9818e-01 1.8208e-03 9.6166e-01 3.8343e-02 1.0000e-10 1.0000e-10 2.6651e-04 4.8614e-07
4.2000e-04 -8.3197e+00 9.9813e-01 1.8677e-03 9.6074e-01 3.9264e-02 1.0000e-10 1.0000e-10 2.7297e-04 5.1078e-07
4.3000e-04 -8.3193e+00 9.9809e-01 1.9149e-03 9.5982e-01 4.0184e-02 1.0000e-10 1.0000e-10 2.7942e-04 5.3607e-07
4.4000e-04 -8.3190e+00 9.9804e-01 1.9621e-03 9.5890e-01 4.1104e-02 1.0000e-10 1.0000e-10 2.8587e-04 5.6201e-07
4.5000e-04 -8.3186e+00 9.9799e-01 2.0095e-03 9.5798e-01 4.2023e-02 1.0000e-10 1.0000e-10 2.9232e-04 5.8859e-07
4.6000e-04 -8.3182e+00 9.9794e-01 2.0570e-03 9.5706e-01 4.2941e-02 1.0000e-10 1.0000e-10 2.9877e-04 6.1583e-07
4.7000e-04 -8.3178e+00 9.9790e-01 2.1046e-03 9.5614e-01 4.3859e-02 1.0000e-10 1.0000e-10 3.0521e-04 6.4371e-07
4.8000e-04 -8.3174e+00 9.9785e-01 2.1524e-03 9.5522e-01 4.4776e-02 1.0000e-10 1.0000e-10 3.1165e-04 6.7225e-07
4.9000e-04 -8.3170e+00 9.9780e-01 2.2003e-03 9.5431e-01 4.5692e-02 1.0000e-10 1.0000e-10 3.1809e-04 7.0145e-07
5.0000e-04 -8.3166e+00 9.9775e-01 2.2484e-03 9.5339e-01 4.6608e-02 1.0000e-10 1.0000e-10 3.2453e-04 7.3131e-07
5.1000e-04 -8.3162e+00 9.9770e-01 2.2966e-03 9.5248e-01 4.7523e-02 1.0000e-10 1.0000e-10 3.3097e-04 7.6183e-07
5.2000e-04 -8.3159e+00 9.9766e-01 2.3449e-03 9.5156e-01 4.8437e-02 1.0000e-10 1.0000e-10 3.3740e-04 7.9302e-07
5.3000e-04 -8.3155e+00 9.9761e-01 2.3933e-03 9.5065e-01 4.9351e-02 1.0000e-10 1.0000e-10 3.4383e-04 8.2488e-07
5.4000e-04 -8.3151e+00 9.9756e-01 2.4419e-03 9.4974e-01 5.0264e-02 1.0000e-10 1.0000e-10 3.5026e-04 8.5740e-07
5.5000e-04 -8.3147e+00 9.9751e-01 2.4907e-03 9.4882e-01 5.1176e-02 1.0000e-10 1.0000e-10 3.5669e-04 8.9060e-07
5.6000e-04 -8.3143e+00 9.9746e-01 2.5395e-03 9.4791e-01 5.2088e-02 1.0000e-10 1.0000e-10 3.6311e-04 9.2448e-07
5.7000e-04 -8.3139e+00 9.9741e-01 2.5885e-03 9.4700e-01 5.2999e-02 1.0000e-10 1.0000e-10 3.6954e-04 9.5904e-07
5.8000e-04 -8.3135e+00 9.9736e-01 2.6377e-03 9.4609e-01 5.3909e-02 1.0000e-10 1.0000e-10 3.7596e-04 9.9428e-07
5.9000e-04 -8.3131e+00 9.9731e-01 2.6870e-03 9.4518e-01 5.4819e-02 1.0000e-10 1.0000e-10 3.8237e-04 1.0302e-06
6.0000e-04 -8.3127e+00 9.9726e-01 2.7364e-03 9.4427e-01 5.5728e-02 1.0000e-10 1.0000e-10 3.8879e-04 1.0668e-06
6.1000e-04 -8.3123e+00 9.9721e-01 2.7860e-03 9.4336e-01 5.6636e-02 1.0000e-10 1.0000e-10 3.9520e-04 1.1041e-06
6.2000e-04 -8.3120e+00 9.9716e-01 2.8357e-03 9.4246e-01 5.7544e-02 1.0000e-10 1.0000e-10 4.0162e-04 1.1421e-06
6.3000e-04 -8.3116e+00 9.9711e-01 2.8856e-03 9.4155e-01 5.8451e-02 1.0000e-10 1.0000e-10 4.0803e-04 1.1808e-06
6.4000e-04 -8.3112e+00 9.9706e-01 2.9356e-03 9.4064e-01 5.9357e-02 1.0000e-10 1.0000e-10 4.1443e-04 1.2202e-06
6.5000e-04 -8.3108e+00 9.9701e-01 2.9857e-03 9.3974e-01 6.0263e-02 1.0000e-10 1.0000e-10 4.2084e-04 1.2603e-06
6.6000e-04 -8.3104e+00 9.9696e-01 3.0360e-03 9.3883e-01 6.1167e-02 1.0000e-10 1.0000e-10 4.2724e-04 1.3011e-06
6.7000e-04 -8.3100e+00 9.9691e-01 3.0864e-03 9.3793e-01 6.2072e-02 1.0000e-10 1.0000e-10 4.3364e-04 1.3426e-06
6.8000e-04 -8.3096e+00 9.9686e-01 3.1370e-03 9.3702e-01 6.2975e-02 1.0000e-10 1.0000e-10 4.4004e-04 1.3848e-06
6.9000e-04 -8.3092e+00 9.9681e-01 3.1878e-03 9.3612e-01 6.3878e-02 1.0000e-10 1.0000e-10 4.4644e-04 1.4277e-06
7.0000e-04 -8.3088e+00 9.9676e-01 3.2386e-03 9.3522e-01 6.4780e-02 1.0000e-10 1.0000e-10 4.5283e-04 1.4713e-06
7.1000e-04 -8.3084e+00 9.9671e-01 3.2897e-03 9.3432e-01 6.5682e-02 1.0000e-10 1.0000e-10 4.5922e-04 1.5157e-06
7.2000e-04 -8.3081e+00 9.9666e-01 3.3409e-03 9.3342e-01 6.6583e-02 1.0000e-10 1.0000e-10 4.6561e-04 1.5608e-06
7.3000e-04 -8.3077e+00 9.9661e-01 3.3922e-03 9.3252e-01 6.7483e-02 1.0000e-10 1.0000e-10 4.7200e-04 1.6066e-06
7.4000e-04 -8.3073e+00 9.9656e-01 3.4437e-03 9.3162e-01 6.8383e-02 1.0000e-10 1.0000e-10 4.7839e-04 1.6531e-06
7.5000e-04 -8.3069e+00 9.9650e-01 3.4953e-03 9.3072e-01 6.9282e-02 1.0000e-10 1.0000e-10 4.8477e-04 1.7004e-06
7.6000e-04 -8.3065e+00 9.9645e-01 3.5471e-03 9.2982e-01 7.0180e-02 1.0000e-10 1.0000e-10 4.9115e-04 1.7484e-06
7.7000e-04 -8.3061e+00 9.9640e-01 3.5990e-03 9.2892e-01 7.1077e-02 1.0000e-10 1.0000e-10 4.9753e-04 1.7971e-06
7.8000e-04 -8.3057e+00 9.9635e-01 3.6511e-03 9.2803e-01 7.1974e-02 1.0000e-10 1.0000e-10 5.0391e-04 1.8466e-06
7.9000e-04 -8.3053e+00 9.9630e-01 3.7034e-03 9.2713e-01 7.2870e-02 1.0000e-10 1.0000e-10 5.1028e-04 1.8968e-06
8.0000e-04 -8.3049e+00 9.9624e-01 3.7558e-03 9.2623e-01 7.3766e-02 1.0000e-10 1.0000e-10 5.1665e-04 1.9477e-06
8.1000e-04 -8.3045e+00 9.9619e-01 3.8083e-03 9.2534e-01 7.4661e-02 1.0000e-10 1.0000e-10 5.2302e-04 1.9995e-06
8.2000e-04 -8.3042e+00 9.9614e-01 3.8611e-03 9.2445e-01 7.5555e-02 1.0000e-10 1.0000e-10 5.2939e-04 2.0519e-06
8.3000e-04 -8.3038e+00 9.9609e-01 3.9139e-03 9.2355e-01 7.6448e-02 1.0000e-10 1.0000e-10 5.3576e-04 2.1052e-06
8.4000e-04 -8.3034e+00 9.9603e-01 3.9670e-03 9.2266e-01 7.7341e-02 1.0000e-10 1.0000e-10 5.4212e-04 2.1591e-06
8.5000e-04 -8.3030e+00 9.9598e-01 4.0202e-03 9.2177e-01 7.8233e-02 1.0000e-10 1.0000e-10 5.4848e-04 2.2139e-06
8.6000e-04 -8.3026e+00 9.9593e-01 4.0735e-03 9.2088e-01 7.9125e-02 1.0000e-10 1.0000e-10 5.5484e-04 2.2694e-06
8.7000e-04 -8.3022e+00 9.9587e-01 4.1270e-03 9.1998e-01 8.0016e-02 1.0000e-10 1.0000e-10 5.6120e-04 2.3257e-06
8.8000e-04 -8.3018e+00 9.9582e-01 4.1807e-03 9.1909e-01 8.0906e-02 1.0000e-10 1.0000e-10 5.6755e-04 2.3827e-06
8.9000e-04 -8.3014e+00 9.9577e-01 4.2346e-03 9.1820e-01 8.1795e-02 1.0000e-10 1.0000e-10 5.7390e-04 2.4406e-06
9.0000e-04 -8.3010e+00 9.9571e-01 4.2886e-03 9.1732e-01 8.2684e-02 1.0000e-10 1.0000e-10 5.8025e-04 2.4992e-06
9.1000e-04 -8.3006e+00 9.9566e-01 4.3427e-03 9.1643e-01 8.3572e-02 1.0000e-10 1.0000e-10 5.8660e-04 2.5586e-06
9.2000e-04 -8.3002e+00 9.9560e-01 4.3971e-03 9.1554e-01 8.4460e-02 1.0000e-10 1.0000e-10 5.9295e-04 2.6187e-06
9.3000e-04 -8.2999e+00 9.9555e-01 4.4516e-03 9.1465e-01 8.5347e-02 1.0000e-10 1.0000e-10 5.9929e-04 2.6797e-06
9.4000e-04 -8.2995e+00 9.9549e-01 4.5062e-03 9.1377e-01 8.6233e-02 1.0000e-10 1.0000e-10 6.0563e-04 2.7415e-06
9.5000e-04 -8.2991e+00 9.9544e-01 4.5611e-03 9.1288e-01 8.7118e-02 1.0000e-10 1.0000e-10 6.1197e-04 2.8040e-06
9.6000e-04 -8.2987e+00 9.9538e-01 4.6161e-03 9.1200e-01 8.8003e-02 1.0000e-10 1.0000e-10 6.1831e-04 2.8674e-06
9.7000e-04 -8.2983e+00 9.9533e-01 4.6713e-03 9.1111e-01 8.8887e-02 1.0000e-10 1.0000e-10 6.2464e-04 2.9316e-06
9.8000e-04 -8.2979e+00 9.9527e-01 4.7266e-03 9.1023e-01 8.9770e-02 1.0000e-10 1.0000e-10 6.3097e-04 2.9965e-06
9.9000e-04 -8.2975e+00 9.9522e-01 4.7821e-03 9.0935e-01 9.0653e-02 1.0000e-10 1.0000e-10 6.3730e-04 3.0623e-06
1.0000e-03 -8.2974e+00 9.8567e-01 1.4329e-02 9.0901e-01 9.0987e-02 6.4175e-04 7.2473e-06 6.3970e-04 9.2997e-06
1.0100e-03 -8.2974e+00 9.7071e-01 2.9286e-02 9.0901e-01 9.0987e-02 6.4009e-04 1.8914e-05 6.3970e-04 1.9300e-05
1.0200e-03 -8.2974e+00 9.5620e-01 4.3796e-02 9.0901e-01 9.0987e-02 6.3842e-04 3.0580e-05 6.3970e-04 2.9300e-05
1.0300e-03 -8.2974e+00 9.4212e-01 5.7879e-02 9.0901e-01 9.0987e-02 6.3675e-04 4.2246e-05 6.3970e-04 3.9300e-05
1.0400e-03 -8.2974e+00 9.2845e-01 7.1552e-02 9.0901e-01 9.0987e-02 6.3509e-04 5.3912e-05 6.3970e-04 4.9300e-05
1.0500e-03 -8.2974e+00 9.1516e-01 8.4835e-02 9.0901e-01 9.0987e-02 6.3342e-04 6.5578e-05 6.3970e-04 5.9300e-05
1.0600e-03 -8.2974e+00 9.0226e-01 9.7743e-02 9.0901e-01 9.0987e-02 6.3176e-04 7.7245e-05 6.3970e-04 6.9300e-05
1.0700e-03 -8.2974e+00 8.8971e-01 1.1029e-01 9.0901e-01 9.0987e-02 6.3009e-04 8.8911e-05 6.3970e-04 7.9300e-05
1.0800e-03 -8.2974e+00 8.7750e-01 1.2250e-01 9.0901e-01 9.0987e-02 6.2842e-04 1.0058e-04 6.3970e-04 8.9300e-05
1.0900e-03 -8.2974e+00 8.6563e-01 1.3437e-01 9.0901e-01 9.0987e-02 6.2676e-04 1.1224e-04 6.3970e-04 9.9300e-05
1.1000e-03 -8.2974e+00 8.5407e-01 1.4593e-01 9.0901e-01 9.0987e-02 6.2509e-04 1.2391e-04 6.3970e-04 1.0930e-04
1.1100e-03 -8.2974e+00 8.4282e-01 1.5718e-01 9.0901e-01 9.0987e-02 6.2342e-04 1.3558e-04 6.3970e-04 1.1930e-04
1.1200e-03 -8.2974e+00 8.3186e-01 1.6814e-01 9.0901e-01 9.0987e-02 6.2176e-04 1.4724e-04 6.3970e-04 1.2930e-04
1.1300e-03 -8.2974e+00 8.2118e-01 1.7882e-01 9.0901e-01 9.0987e-02 6.2009e-04 1.5891e-04 6.3970e-04 1.3930e-04
1.1400e-03 -8.2974e+00 8.1077e-01 1.8923e-01 9.0901e-01 9.0987e-02 6.1843e-04 1.7057e-04 6.3970e-04 1.4930e-04
1.1500e-03 -8.2974e+00 8.0063e-01 1.9937e-01 9.0901e-01 9.0987e-02 6.1676e-04 1.8224e-04 6.3970e-04 1.5930e-04
1.1600e-03 -8.2974e+00 7.9073e-01 2.0927e-01 9.0901e-01 9.0987e-02 6.1509e-04 1.9391e-04 6.3970e-04 1.6930e-04
1.1700e-03 -8.2974e+00 7.8107e-01 2.1893e-01 9.0901e-01 9.0987e-02 6.1343e-04 2.0557e-04 6.3970e-04 1.7930e-04
1.1800e-03 -8.2974e+00 7.7165e-01 2.2835e-01 9.0901e-01 9.0987e-02 6.1176e-04 2.1724e-04 6.3970e-04 1.8930e-04
1.1900e-03 -8.2974e+00 7.6246e-01 2.3754e-01 9.0901e-01 9.0987e-02 6.1009e-04 2.2891e-04 6.3970e-04 1.9930e-04
1.2000e-03 -8.2974e+00 7.5348e-01 2.4652e-01 9.0901e-01 9.0987e-02 6.0843e-04 2.4057e-04 6.3970e-04 2.0930e-04
1.2100e-03 -8.2974e+00 7.4470e-01 2.5530e-01 9.0901e-01 9.0987e-02 6.0676e-04 2.5224e-04 6.3970e-04 2.1930e-04
1.2200e-03 -8.2974e+00 7.3613e-01 2.6387e-01 9.0901e-01 9.0987e-02 6.0510e-04 2.6390e-04 6.3970e-04 2.2930e-04
1.2300e-03 -8.2974e+00 7.2776e-01 2.7224e-01 9.0901e-01 9.0987e-02 6.0343e-04 2.7557e-04 6.3970e-04 2.3930e-04
1.2400e-03 -8.2974e+00 7.1957e-01 2.8043e-01 9.0901e-01 9.0987e-02 6.0176e-04 2.8724e-04 6.3970e-04 2.4930e-04
1.2500e-03 -8.2974e+00 7.1157e-01 2.8843e-01 9.0901e-01 9.0987e-02 6.0010e-04 2.9890e-04 6.3970e-04 2.5930e-04
1.2600e-03 -8.2974e+00 7.0374e-01 2.9626e-01 9.0901e-01 9.0987e-02 5.9843e-04 3.1057e-04 6.3970e-04 2.6930e-04
1.2700e-03 -8.2974e+00 6.9608e-01 3.0392e-01 9.0901e-01 9.0987e-02 5.9677e-04 3.2223e-04 6.3970e-04 2.7930e-04
1.2800e-03 -8.2974e+00 6.8859e-01 3.1141e-01 9.0901e-01 9.0987e-02 5.9510e-04 3.3390e-04 6.3970e-04 2.8930e-04
1.2900e-03 -8.2974e+00 6.8126e-01 3.1874e-01 9.0901e-01 9.0987e-02 5.9343e-04 3.4557e-04 6.3970e-04 2.9930e-04
1.3000e-03 -8.2974e+00 6.7408e-01 3.2592e-01 9.0901e-01 9.0987e-02 5.9177e-04 3.5723e-04 6.3970e-04 3.0930e-04
1.3100e-03 -8.2974e+00 6.6705e-01 3.3295e-01 9.0901e-01 9.0987e-02 5.9010e-04 3.6890e-04 6.3970e-04 3.1930e-04
1.3200e-03 -8.2974e+00 6.6017e-01 3.3983e-01 9.0901e-01 9.0987e-02 5.8843e-04 3.8057e-04 6.3970e-04 3.2930e-04
1.3300e-03 -8.2974e+00 6.5342e-01 3.4658e-01 9.0901e-01 9.0987e-02 5.8677e-04 3.9223e-04 6.3970e-04 3.3930e-04
1.3400e-03 -8.2974e+00 6.4682e-01 3.5318e-01 9.0901e-01 9.0987e-02 5.8510e-04 4.0390e-04 6.3970e-04 3.4930e-04
1.3500e-03 -8.2974e+00 6.4034e-01 3.5966e-01 9.0901e-01 9.0987e-02 5.8344e-04 4.1556e-04 6.3970e-04 3.5930e-04
1.3600e-03 -8.2974e+00 6.3399e-01 3.6601e-01 9.0901e-01 9.0987e-02 5.8177e-04 4.2723e-04 6.3970e-04 3.6930e-04
1.3700e-03 -8.2974e+00 6.2777e-01 3.7223e-01 9.0901e-01 9.0987e-02 5.8010e-04 4.3890e-04 6.3970e-04 3.7930e-04
1.3800e-03 -8.2974e+00 6.2167e-01 3.7833e-01 9.0901e-01 9.0987e-02 5.7844e-04 4.5056e-04 6.3970e-04 3.8930e-04
1.3900e-03 -8.2974e+00 6.1569e-01 3.8431e-01 9.0901e-01 9.0987e-02 5.7677e-04 4.6223e-04 6.3970e-04 3.9930e-04
1.4000e-03 -8.2974e+00 6.0982e-01 3.9018e-01 9.0901e-01 9.0987e-02 5.7510e-04 4.7390e-04 6.3970e-04 4.0930e-04
1.4100e-03 -8.2974e+00 6.0406e-01 3.9594e-01 9.0901e-01 9.0987e-02 5.7344e-04 4.8556e-04 6.3970e-04 4.1930e-04
1.4200e-03 -8.2974e+00 5.9841e-01 4.0159e-01 9.0901e-01 9.0987e-02 5.7177e-04 4.9723e-04 6.3970e-04 4.2930e-04
1.4300e-03 -8.2974e+00 5.9286e-01 4.0714e-01 9.0901e-01 9.0987e-02 5.7011e-04 5.0889e-04 6.3970e-04 4.3930e-04
1.4400e-03 -8.2974e+00 5.8742e-01 4.1258e-01 9.0901e-01 9.0987e-02 5.6844e-04 5.2056e-04 6.3970e-04 4.4930e-04
1.4500e-03 -8.2974e+00 5.8207e-01 4.1793e-01 9.0901e-01 9.0987e-02 5.6677e-04 5.3223e-04 6.3970e-04 4.5930e-04
1.4600e-03 -8.2974e+00 5.7683e-01 4.2317e-01 9.0901e-01 9.0987e-02 5.6511e-04 5.4389e-04 6.3970e-04 4.6930e-04
1.4700e-03 -8.2974e+00 5.7167e-01 4.2833e-01 9.0901e-01 9.0987e-02 5.6344e-04 5.5556e-04 6.3970e-04 4.7930e-04
1.4800e-03 -8.2974e+00 5.6661e-01 4.3339e-01 9.0901e-01 9.0987e-02 5.6178e-04 5.6723e-04 6.3970e-04 4.8930e-04
1.4900e-03 -8.2974e+00 5.6163e-01 4.3837e-01 9.0901e-01 9.0987e-02 5.6011e-04 5.7889e-04 6.3970e-04 4.9930e-04
1.5000e-03 -8.2974e+00 5.5675e-01 4.4325e-01 9.0901e-01 9.0987e-02 5.5844e-04 5.9056e-04 6.3970e-04 5.0930e-04
1.5100e-03 -8.2974e+00 5.5194e-01 4.4806e-01 9.0901e-01 9.0987e-02 5.5678e-04 6.0222e-04 6.3970e-04 5.1930e-04
1.5200e-03 -8.2974e+00 5.4722e-01 4.5278e-01 9.0901e-01 9.0987e-02 5.5511e-04 6.1389e-04 6.3970e-04 5.2930e-04
1.5300e-03 -8.2974e+00 5.4258e-01 4.5742e-01 9.0901e-01 9.0987e-02 5.5344e-04 6.2556e-04 6.3970e-04 5.3930e-04
1.5400e-03 -8.2974e+00 5.3802e-01 4.6198e-01 9.0901e-01 9.0987e-02 5.5178e-04 6.3722e-04 6.3970e-04 5.4930e-04
1.5500e-03 -8.2974e+00 5.3353e-01 4.6647e-01 9.0901e-01 9.0987e-02 5.5011e-04 6.4889e-04 6.3970e-04 5.5930e-04
1.5600e-03 -8.2974e+00 5.2912e-01 4.7088e-01 9.0901e-01 9.0987e-02 5.4845e-04 6.6055e-04 6.3970e-04 5.6930e-04
1.5700e-03 -8.2974e+00 5.2477e-01 4.7523e-01 9.0901e-01 9.0987e-02 5.4678e-04 6.7222e-04 6.3970e-04 5.7930e-04
1.5800e-03 -8.2974e+00 5.2050e-01 4.7950e-01 9.0901e-01 9.0987e-02 5.4511e-04 6.8389e-04 6.3970e-04 5.8930e-04
1.5900e-03 -8.2974e+00 5.1630e-01 4.8370e-01 9.0901e-01 9.0987e-02 5.4345e-04 6.9555e-04 6.3970e-04 5.9930e-04
1.6000e-03 -8.2974e+00 5.1217e-01 4.8783e-01 9.0901e-01 9.0987e-02 5.4178e-04 7.0722e-04 6.3970e-04 6.0930e-04
1.6100e-03 -8.2974e+00 5.0810e-01 4.9190e-01 9.0901e-01 9.0987e-02 5.4011e-04 7.1889e-04 6.3970e-04 6.1930e-04
1.6200e-03 -8.2974e+00 5.0410e-01 4.9590e-01 9.0901e-01 9.0987e-02 5.3845e-04 7.3055e-04 6.3970e-04 6.2930e-04
1.6300e-03 -8.2974e+00 5.0016e-01 4.9984e-01 9.0901e-01 9.0987e-02 5.3678e-04 7.4222e-04 6.3970e-04 6.3930e-04
1.6400e-03 -8.2974e+00 4.9628e-01 5.0372e-01 9.0901e-01 9.0987e-02 5.3512e-04 7.5388e-04 6.3970e-04 6.4930e-04
1.6500e-03 -8.2974e+00 4.9246e-01 5.0754e-01 9.0901e-01 9.0987e-02 5.3345e-04 7.6555e-04 6.3970e-04 6.5930e-04
1.6600e-03 -8.2974e+00 4.8869e-01 5.1131e-01 9.0901e-01 9.0987e-02 5.3178e-04 7.7722e-04 6.3970e-04 6.6930e-04
1.6700e-03 -8.2974e+00 4.8499e-01 5.1501e-01 9.0901e-01 9.0987e-02 5.3012e-04 7.8888e-04 6.3970e-04 6.7930e-04
1.6800e-03 -8.2974e+00 4.8134e-01 5.1866e-01 9.0901e-01 9.0987e-02 5.2845e-04 8.0055e-04 6.3970e-04 6.8930e-04
1.6900e-03 -8.2974e+00 4.7774e-01 5.2226e-01 9.0901e-01 9.0987e-02 5.2678e-04 8.1222e-04 6.3970e-04 6.9930e-04
1.7000e-03 -8.2974e+00 4.7420e-01 5.2580e-01 9.0901e-01 9.0987e-02 5.2512e-04 8.2388e-04 6.3970e-04 7.0930e-04
1.7100e-03 -8.2974e+00 4.7071e-01 5.2929e-01 9.0901e-01 9.0987e-02 5.2345e-04 8.3555e-04 6.3970e-04 7.1930e-04
1.7200e-03 -8.2974e+00 4.6728e-01 5.3272e-01 9.0901e-01 9.0987e-02 5.2179e-04 8.4721e-04 6.3970e-04 7.2930e-04
1.7300e-03 -8.2974e+00 4.6389e-01 5.3611e-01 9.0901e-01 9.0987e-02 5.2012e-04 8.5888e-04 6.3970e-04 7.3930e-04
1.7400e-03 -8.2974e+00 4.6055e-01 5.3945e-01 9.0901e-01 9.0987e-02 5.1845e-04 8.7055e-04 6.3970e-04 7.4930e-04
1.7500e-03 -8.2974e+00 4.5726e-01 5.4274e-01 9.0901e-01 9.0987e-02 5.1679e-04 8.8221e-04 6.3970e-04 7.5930e-04
1.7600e-03 -8.2974e+00 4.5401e-01 5.4599e-01 9.0901e-01 9.0987e-02 5.1512e-04 8.9388e-04 6.3970e-04 7.6930e-04
1.7700e-03 -8.2974e+00 4.5081e-01 5.4919e-01 9.0901e-01 9.0987e-02 5.1346e-04 9.0554e-04 6.3970e-04 7.7930e-04
1.7800e-03 -8.2974e+00 4.4766e-01 5.5234e-01 9.0901e-01 9.0987e-02 5.1179e-04 9.1721e-04 6.3970e-04 7.8930e-04
1.7900e-03 -8.2974e+00 4.4455e-01 5.5545e-01 9.0901e-01 9.0987e-02 5.1012e-04 9.2888e-04 6.3970e-04 7.9930e-04
1.8000e-03 -8.2974e+00 4.4148e-01 5.5852e-01 9.0901e-01 9.0987e-02 5.0846e-04 9.4054e-04 6.3970e-04 8.0930e-04
1.8100e-03 -8.2974e+00 4.3845e-01 5.6155e-01 9.0901e-01 9.0987e-02 5.0679e-04 9.5221e-04 6.3970e-04 8.1930e-04
1.8200e-03 -8.2974e+00 4.3547e-01 5.6453e-01 9.0901e-01 9.0987e-02 5.0512e-04 9.6388e-04 6.3970e-04 8.2930e-04
1.8300e-03 -8.2974e+00 4.3252e-01 5.6748e-01 9.0901e-01 9.0987e-02 5.0346e-04 9.7554e-04 6.3970e-04 8.3930e-04
1.8400e-03 -8.2974e+00 4.2962e-01 5.7038e-01 9.0901e-01 9.0987e-02 5.0179e-04 9.8721e-04 6.3970e-04 8.4930e-04
1.8500e-03 -8.2974e+00 4.2675e-01 5.7325e-01 9.0901e-01 9.0987e-02 5.0013e-04 9.9887e-04 6.3970e-04 8.5930e-04
1.8600e-03 -8.2974e+00 4.2392e-01 5.7608e-01 9.0901e-01 9.0987e-02 4.9846e-04 1.0105e-03 6.3970e-04 8.6930e-04
1.8700e-03 -8.2974e+00 4.2113e-01 5.7887e-01 9.0901e-01 9.0987e-02 4.9679e-04 1.0222e-03 6.3970e-04 8.7930e-04
1.8800e-03 -8.2974e+00 4.1838e-01 5.8162e-01 9.0901e-01 9.0987e-02 4.9513e-04 1.0339e-03 6.3970e-04 8.8930e-04
1.8900e-03 -8.2974e+00 4.1566e-01 5.8434e-01 9.0901e-01 9.0987e-02 4.9346e-04 1.0455e-03 6.3970e-04 8.9930e-04
1.9000e-03 -8.2974e+00 4.1298e-01 5.8702e-01 9.0901e-01 9.0987e-02 4.9179e-04 1.0572e-03 6.3970e-04 9.0930e-04
1.9100e-03 -8.2974e+00 4.1033e-01 5.8967e-01 9.0901e-01 9.0987e-02 4.9013e-04 1.0689e-03 6.3970e-04 9.1930e-04
1.9200e-03 -8.2974e+00 4.0771e-01 5.9229e-01 9.0901e-01 9.0987e-02 4.8846e-04 1.0805e-03 6.3970e-04 9.2930e-04
1.9300e-03 -8.2974e+00 4.0513e-01 5.9487e-01 9.0901e-01 9.0987e-02 4.8680e-04 1.0922e-03 6.3970e-04 9.3930e-04
1.9400e-03 -8.2974e+00 4.0258e-01 5.9742e-01 9.0901e-01 9.0987e-02 4.8513e-04 1.1039e-03 6.3970e-04 9.4930e-04
1.9500e-03 -8.2974e+00 4.0006e-01 5.9994e-01 9.0901e-01 9.0987e-02 4.8346e-04 1.1155e-03 6.3970e-04 9.5930e-04
1.9600e-03 -8.2974e+00 3.9758e-01 6.0242e-01 9.0901e-01 9.0987e-02 4.8180e-04 1.1272e-03 6.3970e-04 9.6930e-04
1.9700e-03 -8.2974e+00 3.9512e-01 6.0488e-01 9.0901e-01 9.0987e-02 4.8013e-04 1.1389e-03 6.3970e-04 9.7930e-04
1.9800e-03 -8.2974e+00 3.9270e-01 6.0730e-01 9.0901e-01 9.0987e-02 4.7846e-04 1.1505e-03 6.3970e-04 9.8930e-04
1.9900e-03 -8.2974e+00 3.9030e-01 6.0970e-01 9.0901e-01 9.0987e-02 4.7680e-04 1.1622e-03 6.3970e-04 9.9930e-04
2.0000e-03 -8.2974e+00 3.8793e-01 6.1207e-01 9.0901e-01 9.0987e-02 4.7513e-04 1.1739e-03 6.3970e-04 1.0093e-03
2.0100e-03 -8.2974e+00 3.8559e-01 6.1441e-01 9.0901e-01 9.0987e-02 4.7347e-04 1.1855e-03 6.3970e-04 1.0193e-03
2.0200e-03 -8.2974e+00 3.8328e-01 6.1672e-01 9.0901e-01 9.0987e-02 4.7180e-04 1.1972e-03 6.3970e-04 1.0293e-03
2.0300e-03 -8.2974e+00 3.8100e-01 6.1900e-01 9.0901e-01 9.0987e-02 4.7013e-04 1.2089e-03 6.3970e-04 1.0393e-03
2.0400e-03 -8.2974e+00 3.7875e-01 6.2125e-01 9.0901e-01 9.0987e-02 4.6847e-04 1.2205e-03 6.3970e-04 1.0493e-03
2.0500e-03 -8.2974e+00 3.7652e-01 6.2348e-01 9.0901e-01 9.0987e-02 4.6680e-04 1.2322e-03 6.3970e-04 1.0593e-03
2.0600e-03 -8.2974e+00 3.7431e-01 6.2569e-01 9.0901e-01 9.0987e-02 4.6514e-04 1.2439e-03 6.3970e-04 1.0693e-03
2.0700e-03 -8.2974e+00 3.7214e-01 6.2786e-01 9.0901e-01 9.0987e-02 4.6347e-04 1.2555e-03 6.3970e-04 1.0793e-03
2.0800e-03 -8.2974e+00 3.6998e-01 6.3002e-01 9.0901e-01 9.0987e-02 4.6180e-04 1.2672e-03 6.3970e-04 1.0893e-03
2.0900e-03 -8.2974e+00 3.6786e-01 6.3214e-01 9.0901e-01 9.0987e-02 4.6014e-04 1.2789e-03 6.3970e-04 1.0993e-03
2.1000e-03 -8.2974e+00 3.6575e-01 6.3425e-01 9.0901e-01 9.0987e-02 4.5847e-04 1.2905e-03 6.3970e-04 1.1093e-03
2.1100e-03 -8.2974e+00 3.6367e-01 6.3633e-01 9.0901e-01 9.0987e-02 4.5680e-04 1.3022e-03 6.3970e-04 1.1193e-03
2.1200e-03 -8.2974e+00 3.6162e-01 6.3838e-01 9.0901e-01 9.0987e-02 4.5514e-04 1.3139e-03 6.3970e-04 1.1293e-03
2.1300e-03 -8.2974e+00 3.5958e-01 6.4042e-01 9.0901e-01 9.0987e-02 4.5347e-04 1.3255e-03 6.3970e-04 1.1393e-03
2.1400e-03 -8.2974e+00 3.5757e-01 6.4243e-01 9.0901e-01 9.0987e-02 4.5181e-04 1.3372e-03 6.3970e-04 1.1493e-03
2.1500e-03 -8.2974e+00 3.5559e-01 6.4441e-01 9.0901e-01 9.0987e-02 4.5014e-04 1.3489e-03 6.3970e-04 1.1593e-03
2.1600e-03 -8.2974e+00 3.5362e-01 6.4638e-01 9.0901e-01 9.0987e-02 4.4847e-04 1.3605e-03 6.3970e-04 1.1693e-03
2.1700e-03 -8.2974e+00 3.5168e-01 6.4832e-01 9.0901e-01 9.0987e-02 4.4681e-04 1.3722e-03 6.3970e-04 1.1793e-03
2.1800e-03 -8.2974e+00 3.4975e-01 6.5025e-01 9.0901e-01 9.0987e-02 4.4514e-04 1.3839e-03 6.3970e-04 1.1893e-03
2.1900e-03 -8.2974e+00 3.4785e-01 6.5215e-01 9.0901e-01 9.0987e-02 4.4347e-04 1.3955e-03 6.3970e-04 1.1993e-03
2.2000e-03 -8.2974e+00 3.4597e-01 6.5403e-01 9.0901e-01 9.0987e-02 4.4181e-04 1.4072e-03 6.3970e-04 1.2093e-03
2.2100e-03 -8.2974e+00 3.4411e-01 6.5589e-01 9.0901e-01 9.0987e-02 4.4014e-04 1.4189e-03 6.3970e-04 1.2193e-03
2.2200e-03 -8.2974e+00 3.4227e-01 6.5773e-01 9.0901e-01 9.0987e-02 4.3848e-04 1.4305e-03 6.3970e-04 1.2293e-03
2.2300e-03 -8.2974e+00 3.4045e-01 6.5955e-01 9.0901e-01 9.0987e-02 4.3681e-04 1.4422e-03 6.3970e-04 1.2393e-03
2.2400e-03 -8.2974e+00 3.3864e-01 6.6136e-01 9.0901e-01 9.0987e-02 4.3514e-04 1.4539e-03 6.3970e-04 1.2493e-03
2.2500e-03 -8.2974e+00 3.3686e-01 6.6314e-01 9.0901e-01 9.0987e-02 4.3348e-04 1.4655e-03 6.3970e-04 1.2593e-03
2.2600e-03 -8.2974e+00 3.3510e-01 6.6490e-01 9.0901e-01 9.0987e-02 4.3181e-04 1.4772e-03 6.3970e-04 1.2693e-03
2.2700e-03 -8.2974e+00 3.3335e-01 6.6665e-01 9.0901e-01 9.0987e-02 4.3015e-04 1.4889e-03 6.3970e-04 1.2793e-03
2.2800e-03 -8.2974e+00 3.3162e-01 6.6838e-01 9.0901e-01 9.0987e-02 4.2848e-04 1.5005e-03 6.3970e-04 1.2893e-03
2.2900e-03 -8.2974e+00 3.2991e-01 6.7009e-01 9.0901e-01 9.0987e-02 4.2681e-04 1.5122e-03 6.3970e-04 1.2993e-03
2.3000e-03 -8.2974e+00 3.2822e-01 6.7178e-01 9.0901e-01 9.0987e-02 4.2515e-04 1.5239e-03 6.3970e-04 1.3093e-03
2.3100e-03 -8.2974e+00 3.2654e-01 6.7346e-01 9.0901e-01 9.0987e-02 4.2348e-04 1.5355e-03 6.3970e-04 1.3193e-03
2.3200e-03 -8.2974e+00 3.2489e-01 6.7511e-01 9.0901e-01 9.0987e-02 4.2181e-04 1.5472e-03 6.3970e-04 1.3293e-03
2.3300e-03 -8.2974e+00 3.2324e-01 6.7676e-01 9.0901e-01 9.0987e-02 4.2015e-04 1.5589e-03 6.3970e-04 1.3393e-03
2.3400e-03 -8.2974e+00 3.2162e-01 6.7838e-01 9.0901e-01 9.0987e-02 4.1848e-04 1.5705e-03 6.3970e-04 1.3493e-03
2.3500e-03 -8.2974e+00 3.2001e-01 6.7999e-01 9.0901e-01 9.0987e-02 4.1682e-04 1.5822e-03 6.3970e-04 1.3593e-03
2.3600e-03 -8.2974e+00 3.1842e-01 6.8158e-01 9.0901e-01 9.0987e-02 4.1515e-04 1.5939e-03 6.3970e-04 1.3693e-03
2.3700e-03 -8.2974e+00 3.1684e-01 6.8316e-01 9.0901e-01 9.0987e-02 4.1348e-04 1.6055e-03 6.3970e-04 1.3793e-03
2.3800e-03 -8.2974e+00 3.1528e-01 6.8472e-01 9.0901e-01 9.0987e-02 4.1182e-04 1.6172e-03 6.3970e-04 1.3893e-03
2.3900e-03 -8.2974e+00 3.1373e-01 6.8627e-01 9.0901e-01 9.0987e-02 4.1015e-04 1.6288e-03 6.3970e-04 1.3993e-03
2.4000e-03 -8.2974e+00 3.1220e-01 6.8780e-01 9.0901e-01 9.0987e-02 4.0848e-04 1.6405e-03 6.3970e-04 1.4093e-03
2.4100e-03 -8.2974e+00 3.1068e-01 6.8932e-01 9.0901e-01 9.0987e-02 4.0682e-04 1.6522e-03 6.3970e-04 1.4193e-03
2.4200e-03 -8.2974e+00 3.0918e-01 6.9082e-01 9.0901e-01 9.0987e-02 4.0515e-04 1.6638e-03 6.3970e-04 1.4293e-03
2.4300e-03 -8.2974e+00 3.0770e-01 6.9230e-01 9.0901e-01 9.0987e-02 4.0349e-04 1.6755e-03 6.3970e-04 1.4393e-03
2.4400e-03 -8.2974e+00 3.0622e-01 6.9378e-01 9.0901e-01 9.0987e-02 4.0182e-04 1.6872e-03 6.3970e-04 1.4493e-03
2.4500e-03 -8.2974e+00 3.0476e-01 6.9524e-01 9.0901e-01 9.0987e-02 4.0015e-04 1.6988e-03 6.3970e-04 1.4593e-03
2.4600e-03 -8.2974e+00 3.0332e-01 6.9668e-01 9.0901e-01 9.0987e-02 3.9849e-04 1.7105e-03 6.3970e-04 1.4693e-03
2.4700e-03 -8.2974e+00 3.0189e-01 6.9811e-01 9.0901e-01 9.0987e-02 3.9682e-04 1.7222e-03 6.3970e-04 1.4793e-03
2.4800e-03 -8.2974e+00 3.0047e-01 6.9953e-01 9.0901e-01 9.0987e-02 3.9515e-04 1.7338e-03 6.3970e-04 1.4893e-03
2.4900e-03 -8.2974e+00 2.9907e-01 7.0093e-01 9.0901e-01 9.0987e-02 3.9349e-04 1.7455e-03 6.3970e-04 1.4993e-03
2.5000e-03 -8.2974e+00 2.9767e-01 7.0233e-01 9.0901e-01 9.0987e-02 3.9182e-04 1.7572e-03 6.3970e-04 1.5093e-03
2.5100e-03 -8.2974e+00 2.9629e-01 7.0371e-01 9.0901e-01 9.0987e-02 3.9016e-04 1.7688e-03 6.3970e-04 1.5193e-03
2.5200e-03 -8.2974e+00 2.9493e-01 7.0507e-01 9.0901e-01 9.0987e-02 3.8849e-04 1.7805e-03 6.3970e-04 1.5293e-03
2.5300e-03 -8.2974e+00 2.9358e-01 7.0642e-01 9.0901e-01 9.0987e-02 3.8682e-04 1.7922e-03 6.3970e-04 1.5393e-03
2.5400e-03 -8.2974e+00 2.9223e-01 7.0777e-01 9.0901e-01 9.0987e-02 3.8516e-04 1.8038e-03 6.3970e-04 1.5493e-03
2.5500e-03 -8.2974e+00 2.9091e-01 7.0909e-01 9.0901e-01 9.0987e-02 3.8349e-04 1.8155e-03 6.3970e-04 1.5593e-03
2.5600e-03 -8.2974e+00 2.8959e-01 7.1041e-01 9.0901e-01 9.0987e-02 3.8183e-04 1.8272e-03 6.3970e-04 1.5693e-03
2.5700e-03 -8.2974e+00 2.8828e-01 7.1172e-01 9.0901e-01 9.0987e-02 3.8016e-04 1.8388e-03 6.3970e-04 1.5793e-03
2.5800e-03 -8.2974e+00 2.8699e-01 7.1301e-01 9.0901e-01 9.0987e-02 3.7849e-04 1.8505e-03 6.3970e-04 1.5893e-03
2.5900e-03 -8.2974e+00 2.8571e-01 7.1429e-01 9.0901e-01 9.0987e-02 3.7683e-04 1.8622e-03 6.3970e-04 1.5993e-03
2.6000e-03 -8.2974e+00 2.8444e-01 7.1556e-01 9.0901e-01 9.0987e-02 3.7516e-04 1.8738e-03 6.3970e-04 1.6093e-03
2.6100e-03 -8.2974e+00 2.8318e-01 7.1682e-01 9.0901e-01 9.0987e-02 3.7349e-04 1.8855e-03 6.3970e-04 1.6193e-03
2.6200e-03 -8.2974e+00 2.8193e-01 7.1807e-01 9.0901e-01 9.0987e-02 3.7183e-04 1.8972e-03 6.3970e-04 1.6293e-03
2.6300e-03 -8.2974e+00 2.8069e-01 7.1931e-01 9.0901e-01 9.0987e-02 3.7016e-04 1.9088e-03 6.3970e-04 1.6393e-03
2.6400e-03 -8.2974e+00 2.7947e-01 7.2053e-01 9.0901e-01 9.0987e-02 3.6850e-04 1.9205e-03 6.3970e-04 1.6493e-03
2.6500e-03 -8.2974e+00 2.7825e-01 7.2175e-01 9.0901e-01 9.0987e-02 3.6683e-04 1.9322e-03 6.3970e-04 1.6593e-03
2.6600e-03 -8.2974e+00 2.7705e-01 7.2295e-01 9.0901e-01 9.0987e-02 3.6516e-04 1.9438e-03 6.3970e-04 1.6693e-03
2.6700e-03 -8.2974e+00 2.7585e-01 7.2415e-01 9.0901e-01 9.0987e-02 3.6350e-04 1.9555e-03 6.3970e-04 1.6793e-03
2.6800e-03 -8.2974e+00 2.7467e-01 7.2533e-01 9.0901e-01 9.0987e-02 3.6183e-04 1.9672e-03 6.3970e-04 1.6893e-03
2.6900e-03 -8.2974e+00 2.7349e-01 7.2651e-01 9.0901e-01 9.0987e-02 3.6016e-04 1.9788e-03 6.3970e-04 1.6993e-03
2.7000e-03 -8.2974e+00 2.7233e-01 7.2767e-01 9.0901e-01 9.0987e-02 3.5850e-04 1.9905e-03 6.3970e-04 1.7093e-03
2.7100e-03 -8.2974e+00 2.7117e-01 7.2883e-01 9.0901e-01 9.0987e-02 3.5683e-04 2.0022e-03 6.3970e-04 1.7193e-03
2.7200e-03 -8.2974e+00 2.7003e-01 7.2997e-01 9.0901e-01 9.0987e-02 3.5517e-04 2.0138e-03 6.3970e-04 1.7293e-03
2.7300e-03 -8.2974e+00 2.6889e-01 7.3111e-01 9.0901e-01 9.0987e-02 3.5350e-04 2.0255e-03 6.3970e-04 1.7393e-03
2.7400e-03 -8.2974e+00 2.6777e-01 7.3223e-01 9.0901e-01 9.0987e-02 3.5183e-04 2.0372e-03 6.3970e-04 1.7493e-03
2.7500e-03 -8.2974e+00 2.6665e-01 7.3335e-01 9.0901e-01 9.0987e-02 3.5017e-04 2.0488e-03 6.3970e-04 1.7593e-03
2.7600e-03 -8.2974e+00 2.6555e-01 7.3445e-01 9.0901e-01 9.0987e-02 3.4850e-04 2.0605e-03 6.3970e-04 1.7693e-03
2.7700e-03 -8.2974e+00 2.6445e-01 7.3555e-01 9.0901e-01 9.0987e-02 3.4683e-04 2.0722e-03 6.3970e-04 1.7793e-03
2.7800e-03 -8.2974e+00 2.6336e-01 7.3664e-01 9.0901e-01 9.0987e-02 3.4517e-04 2.0838e-03 6.3970e-04 1.7893e-03
2.7900e-03 -8.2974e+00 2.6228e-01 7.3772e-01 9.0901e-01 9.0987e-02 3.4350e-04 2.0955e-03 6.3970e-04 1.7993e-03
2.8000e-03 -8.2974e+00 2.6121e-01 7.3879e-01 9.0901e-01 9.0987e-02 3.4184e-04 2.1072e-03 6.3970e-04 1.8093e-03
2.8100e-03 -8.2974e+00 2.6015e-01 7.3985e-01 9.0901e-01 9.0987e-02 3.4017e-04 2.1188e-03 6.3970e-04 1.8193e-03
2.8200e-03 -8.2974e+00 2.5909e-01 7.4091e-01 9.0901e-01 9.0987e-02 3.3850e-04 2.1305e-03 6.3970e-04 1.8293e-03
2.8300e-03 -8.2974e+00 2.5805e-01 7.4195e-01 9.0901e-01 9.0987e-02 3.3684e-04 2.1422e-03 6.3970e-04 1.8393e-03
2.8400e-03 -8.2974e+00 2.5701e-01 7.4299e-01 9.0901e-01 9.0987e-02 3.3517e-04 2.1538e-03 6.3970e-04 1.8493e-03
2.8500e-03 -8.2974e+00 2.5598e-01 7.4402e-01 9.0901e-01 9.0987e-02 3.3351e-04 2.1655e-03 6.3970e-04 1.8593e-03
2.8600e-03 -8.2974e+00 2.5496e-01 7.4504e-01 9.0901e-01 9.0987e-02 3.3184e-04 2.1772e-03 6.3970e-04 1.8693e-03
2.8700e-03 -8.2974e+00 2.5395e-01 7.4605e-01 9.0901e-01 9.0987e-02 3.3017e-04 2.1888e-03 6.3970e-04 1.8793e-03
2.8800e-03 -8.2974e+00 2.5295e-01 7.4705e-01 9.0901e-01 9.0987e-02 3.2851e-04 2.2005e-03 6.3970e-04 1.8893e-03
2.8900e-03 -8.2974e+00 2.5195e-01 7.4805e-01 9.0901e-01 9.0987e-02 3.2684e-04 2.2122e-03 6.3970e-04 1.8993e-03
2.9000e-03 -8.2974e+00 2.5096e-01 7.4904e-01 9.0901e-01 9.0987e-02 3.2517e-04 2.2238e-03 6.3970e-04 1.9093e-03
2.9100e-03 -8.2974e+00 2.4998e-01 7.5002e-01 9.0901e-01 9.0987e-02 3.2351e-04 2.2355e-03 6.3970e-04 1.9193e-03
2.9200e-03 -8.2974e+00 2.4901e-01 7.5099e-01 9.0901e-01 9.0987e-02 3.2184e-04 2.2472e-03 6.3970e-04 1.9293e-03
2.9300e-03 -8.2974e+00 2.4804e-01 7.5196e-01 9.0901e-01 9.0987e-02 3.2018e-04 2.2588e-03 6.3970e-04 1.9393e-03
2.9400e-03 -8.2974e+00 2.4708e-01 7.5292e-01 9.0901e-01 9.0987e-02 3.1851e-04 2.2705e-03 6.3970e-04 1.9493e-03
2.9500e-03 -8.2974e+00 2.4613e-01 7.5387e-01 9.0901e-01 9.0987e-02 3.1684e-04 2.2822e-03 6.3970e-04 1.9593e-03
2.9600e-03 -8.2974e+00 2.4519e-01 7.5481e-01 9.0901e-01 9.0987e-02 3.1518e-04 2.2938e-03 6.3970e-04 1.9693e-03
2.9700e-03 -8.2974e+00 2.4425e-01 7.5575e-01 9.0901e-01 9.0987e-02 3.1351e-04 2.3055e-03 6.3970e-04 1.9793e-03
2.9800e-03 -8.2974e+00 2.4332e-01 7.5668e-01 9.0901e-01 9.0987e-02 3.1184e-04 2.3172e-03 6.3970e-04 1.9893e-03
2.9900e-03 -8.2974e+00 2.4240e-01 7.5760e-01 9.0901e-01 9.0987e-02 3.1018e-04 2.3288e-03 6.3970e-04 1.9993e-03
3.0000e-03 -8.2974e+00 2.4149e-01 7.5851e-01 9.0901e-01 9.0987e-02 3.0851e-04 2.3405e-03 6.3970e-04 2.0093e-03
3.0100e-03 -8.2974e+00 2.4058e-01 7.5942e-01 9.0901e-01 9.0987e-02 3.0685e-04 2.3522e-03 6.3970e-04 2.0193e-03
3.0200e-03 -8.2974e+00 2.3968e-01 7.6032e-01 9.0901e-01 9.0987e-02 3.0518e-04 2.3638e-03 6.3970e-04 2.0293e-03
3.0300e-03 -8.2974e+00 2.3878e-01 7.6122e-01 9.0901e-01 9.0987e-02 3.0351e-04 2.3755e-03 6.3970e-04 2.0393e-03
3.0400e-03 -8.2974e+00 2.3790e-01 7.6210e-01 9.0901e-01 9.0987e-02 3.0185e-04 2.3872e-03 6.3970e-04 2.0493e-03
3.0500e-03 -8.2974e+00 2.3701e-01 7.6299e-01 9.0901e-01 9.0987e-02 3.0018e-04 2.3988e-03 6.3970e-04 2.0593e-03
3.0600e-03 -8.2974e+00 2.3614e-01 7.6386e-01 9.0901e-01 9.0987e-02 2.9852e-04 2.4105e-03 6.3970e-04 2.0693e-03
3.0700e-03 -8.2974e+00 2.3527e-01 7.6473e-01 9.0901e-01 9.0987e-02 2.9685e-04 2.4222e-03 6.3970e-04 2.0793e-03
3.0800e-03 -8.2974e+00 2.3441e-01 7.6559e-01 9.0901e-01 9.0987e-02 2.9518e-04 2.4338e-03 6.3970e-04 2.0893e-03
3.0900e-03 -8.2974e+00 2.3355e-01 7.6645e-01 9.0901e-01 9.0987e-02 2.9352e-04 2.4455e-03 6.3970e-04 2.0993e-03
3.1000e-03 -8.2974e+00 2.3270e-01 7.6730e-01 9.0901e-01 9.0987e-02 2.9185e-04 2.4571e-03 6.3970e-04 2.1093e-03
3.1100e-03 -8.2974e+00 2.3186e-01 7.6814e-01 9.0901e-01 9.0987e-02 2.9018e-04 2.4688e-03 6.3970e-04 2.1193e-03
3.1200e-03 -8.2974e+00 2.3102e-01 7.6898e-01 9.0901e-01 9.0987e-02 2.8852e-04 2.4805e-03 6.3970e-04 2.1293e-03
3.1300e-03 -8.2974e+00 2.3019e-01 7.6981e-01 9.0901e-01 9.0987e-02 2.8685e-04 2.4921e-03 6.3970e-04 2.1393e-03
3.1400e-03 -8.2974e+00 2.2937e-01 7.7063e-01 9.0901e-01 9.0987e-02 2.8519e-04 2.5038e-03 6.3970e-04 2.1493e-03
3.1500e-03 -8.2974e+00 2.2855e-01 7.7145e-01 9.0901e-01 9.0987e-02 2.8352e-04 2.5155e-03 6.3970e-04 2.1593e-03
3.1600e-03 -8.2974e+00 2.2773e-01 7.7227e-01 9.0901e-01 9.0987e-02 2.8185e-04 2.5271e-03 6.3970e-04 2.1693e-03
3.1700e-03 -8.2974e+00 2.2692e-01 7.7308e-01 9.0901e-01 9.0987e-02 2.8019e-04 2.5388e-03 6.3970e-04 2.1793e-03
3.1800e-03 -8.2974e+00 2.2612e-01 7.7388e-01 9.0901e-01 9.0987e-02 2.7852e-04 2.5505e-03 6.3970e-04 2.1893e-03
3.1900e-03 -8.2974e+00 2.2533e-01 7.7467e-01 9.0901e-01 9.0987e-02 2.7685e-04 2.5621e-03 6.3970e-04 2.1993e-03
3.2000e-03 -8.2974e+00 2.2454e-01 7.7546e-01 9.0901e-01 9.0987e-02 2.7519e-04 2.5738e-03 6.3970e-04 2.2093e-03
3.2100e-03 -8.2974e+00 2.2375e-01 7.7625e-01 9.0901e-01 9.0987e-02 2.7352e-04 2.5855e-03 6.3970e-04 2.2193e-03
3.2200e-03 -8.2974e+00 2.2297e-01 7.7703e-01 9.0901e-01 9.0987e-02 2.7186e-04 2.5971e-03 6.3970e-04 2.2293e-03
3.2300e-03 -8.2974e+00 2.2220e-01 7.7780e-01 9.0901e-01 9.0987e-02 2.7019e-04 2.6088e-03 6.3970e-04 2.2393e-03
3.2400e-03 -8.2974e+00 2.2143e-01 7.7857e-01 9.0901e-01 9.0987e-02 2.6852e-04 2.6205e-03 6.3970e-04 2.2493e-03
3.2500e-03 -8.2974e+00 2.2066e-01 7.7934e-01 9.0901e-01 9.0987e-02 2.6686e-04 2.6321e-03 6.3970e-04 2.2593e-03
3.2600e-03 -8.2974e+00 2.1990e-01 7.8010e-01 9.0901e-01 9.0987e-02 2.6519e-04 2.6438e-03 6.3970e-04 2.2693e-03
3.2700e-03 -8.2974e+00 2.1915e-01 7.8085e-01 9.0901e-01 9.0987e-02 2.6352e-04 2.6555e-03 6.3970e-04 2.2793e-03
3.2800e-03 -8.2974e+00 2.1840e-01 7.8160e-01 9.0901e-01 9.0987e-02 2.6186e-04 2.6671e-03 6.3970e-04 2.2893e-03
3.2900e-03 -8.2974e+00 2.1766e-01 7.8234e-01 9.0901e-01 9.0987e-02 2.6019e-04 2.6788e-03 6.3970e-04 2.2993e-03
3.3000e-03 -8.2974e+00 2.1692e-01 7.8308e-01 9.0901e-01 9.0987e-02 2.5853e-04 2.6905e-03 6.3970e-04 2.3093e-03
3.3100e-03 -8.2974e+00 2.1619e-01 7.8381e-01 9.0901e-01 9.0987e-02 2.5686e-04 2.7021e-03 6.3970e-04 2.3193e-03
3.3200e-03 -8.2974e+00 2.1546e-01 7.8454e-01 9.0901e-01 9.0987e-02 2.5519e-04 2.7138e-03 6.3970e-04 2.3293e-03
3.3300e-03 -8.2974e+00 2.1474e-01 7.8526e-01 9.0901e-01 9.0987e-02 2.5353e-04 2.7255e-03 6.3970e-04 2.3393e-03
3.3400e-03 -8.2974e+00 2.1402e-01 7.8598e-01 9.0901e-01 9.0987e-02 2.5186e-04 2.7371e-03 6.3970e-04 2.3493e-03
3.3500e-03 -8.2974e+00 2.1330e-01 7.8670e-01 9.0901e-01 9.0987e-02 2.5020e-04 2.7488e-03 6.3970e-04 2.3593e-03
3.3600e-03 -8.2974e+00 2.1260e-01 7.8740e-01 9.0901e-01 9.0987e-02 2.4853e-04 2.7605e-03 6.3970e-04 2.3693e-03
3.3700e-03 -8.2974e+00 2.1189e-01 7.8811e-01 9.0901e-01 9.0987e-02 2.4686e-04 2.7721e-03 6.3970e-04 2.3793e-03
3.3800e-03 -8.2974e+00 2.1119e-01 7.8881e-01 9.0901e-01 9.0987e-02 2.4520e-04 2.7838e-03 6.3970e-04 2.3893e-03
3.3900e-03 -8.2974e+00 2.1050e-01 7.8950e-01 9.0901e-01 9.0987e-02 2.4353e-04 2.7955e-03 6.3970e-04 2.3993e-03
3.4000e-03 -8.2974e+00 2.0981e-01 7.9019e-01 9.0901e-01 9.0987e-02 2.4186e-04 2.8071e-03 6.3970e-04 2.4093e-03
3.4100e-03 -8.2974e+00 2.0912e-01 7.9088e-01 9.0901e-01 9.0987e-02 2.4020e-04 2.8188e-03 6.3970e-04 2.4193e-03
3.4200e-03 -8.2974e+00 2.0844e-01 7.9156e-01 9.0901e-01 9.0987e-02 2.3853e-04 2.8305e-03 6.3970e-04 2.4293e-03
3.4300e-03 -8.2974e+00 2.0776e-01 7.9224e-01 9.0901e-01 9.0987e-02 2.3687e-04 2.8421e-03 6.3970e-04 2.4393e-03
3.4400e-03 -8.2974e+00 2.0709e-01 7.9291e-01 9.0901e-01 9.0987e-02 2.3520e-04 2.8538e-03 6.3970e-04 2.4493e-03
3.4500e-03 -8.2974e+00 2.0642e-01 7.9358e-01 9.0901e-01 9.0987e-02 2.3353e-04 2.8655e-03 6.3970e-04 2.4593e-03
3.4600e-03 -8.2974e+00 2.0576e-01 7.9424e-01 9.0901e-01 9.0987e-02 2.3187e-04 2.8771e-03 6.3970e-04 2.4693e-03
3.4700e-03 -8.2974e+00 2.0510e-01 7.9490e-01 9.0901e-01 9.0987e-02 2.3020e-04 2.8888e-03 6.3970e-04 2.4793e-03
3.4800e-03 -8.2974e+00 2.0444e-01 7.9556e-01 9.0901e-01 9.0987e-02 2.2853e-04 2.9005e-03 6.3970e-04 2.4893e-03
3.4900e-03 -8.2974e+00 2.0379e-01 7.9621e-01 9.0901e-01 9.0987e-02 2.2687e-04 2.9121e-03 6.3970e-04 2.4993e-03
3.5000e-03 -8.2974e+00 2.0314e-01 7.9686e-01 9.0901e-01 9.0987e-02 2.2520e-04 2.9238e-03 6.3970e-04 2.5093e-03
3.5100e-03 -8.2974e+00 2.0250e-01 7.9750e-01 9.0901e-01 9.0987e-02 2.2354e-04 2.9355e-03 6.3970e-04 2.5193e-03
3.5200e-03 -8.2974e+00 2.0186e-01 7.9814e-01 9.0901e-01 9.0987e-02 2.2187e-04 2.9471e-03 6.3970e-04 2.5293e-03
3.5300e-03 -8.2974e+00 2.0123e-01 7.9877e-01 9.0901e-01 9.0987e-02 2.2020e-04 2.9588e-03 6.3970e-04 2.5393e-03
3.5400e-03 -8.2974e+00 2.0060e-01 7.9940e-01 9.0901e-01 9.0987e-02 2.1854e-04 2.9705e-03 6.3970e-04 2.5493e-03
3.5500e-03 -8.2974e+00 1.9997e-01 8.0003e-01 9.0901e-01 9.0987e-02 2.1687e-04 2.9821e-03 6.3970e-04 2.5593e-03
3.5600e-03 -8.2974e+00 1.9935e-01 8.0065e-01 9.0901e-01 9.0987e-02 2.1520e-04 2.9938e-03 6.3970e-04 2.5693e-03
3.5700e-03 -8.2974e+00 1.9873e-01 8.0127e-01 9.0901e-01 9.0987e-02 2.1354e-04 3.0055e-03 6.3970e-04 2.5793e-03
3.5800e-03 -8.2974e+00 1.9811e-01 8.0189e-01 9.0901e-01 9.0987e-02 2.1187e-04 3.0171e-03 6.3970e-04 2.5893e-03
3.5900e-03 -8.2974e+00 1.9750e-01 8.0250e-01 9.0901e-01 9.0987e-02 2.1021e-04 3.0288e-03 6.3970e-04 2.5993e-03
3.6000e-03 -8.2974e+00 1.9689e-01 8.0311e-01 9.0901e-01 9.0987e-02 2.0854e-04 3.0405e-03 6.3970e-04 2.6093e-03
3.6100e-03 -8.2974e+00 1.9629e-01 8.0371e-01 9.0901e-01 9.0987e-02 2.0687e-04 3.0521e-03 6.3970e-04 2.6193e-03
3.6200e-03 -8.2974e+00 1.9569e-01 8.0431e-01 9.0901e-01 9.0987e-02 2.0521e-04 3.0638e-03 6.3970e-04 2.6293e-03
3.6300e-03 -8.2974e+00 1.9509e-01 8.0491e-01 9.0901e-01 9.0987e-02 2.0354e-04 3.0755e-03 6.3970e-04 2.6393e-03
3.6400e-03 -8.2974e+00 1.9450e-01 8.0550e-01 9.0901e-01 9.0987e-02 2.0188e-04 3.0871e-03 6.3970e-04 2.6493e-03
3.6500e-03 -8.2974e+00 1.9391e-01 8.0609e-01 9.0901e-01 9.0987e-02 2.0021e-04 3.0988e-03 6.3970e-04 2.6593e-03
3.6600e-03 -8.2974e+00 1.9332e-01 8.0668e-01 9.0901e-01 9.0987e-02 1.9854e-04 3.1105e-03 6.3970e-04 2.6693e-03
3.6700e-03 -8.2974e+00 1.9274e-01 8.0726e-01 9.0901e-01 9.0987e-02 1.9688e-04 3.1221e-03 6.3970e-04 2.6793e-03
3.6800e-03 -8.2974e+00 1.9216e-01 8.0784e-01 9.0901e-01 9.0987e-02 1.9521e-04 3.1338e-03 6.3970e-04 2.6893e-03
3.6900e-03 -8.2974e+00 1.9158e-01 8.0842e-01 9.0901e-01 9.0987e-02 1.9354e-04 3.1455e-03 6.3970e-04 2.6993e-03
3.7000e-03 -8.2974e+00 1.9101e-01 8.0899e-01 9.0901e-01 9.0987e-02 1.9188e-04 3.1571e-03 6.3970e-04 2.7093e-03
3.7100e-03 -8.2974e+00 1.9044e-01 8.0956e-01 9.0901e-01 9.0987e-02 1.9021e-04 3.1688e-03 6.3970e-04 2.7193e-03
3.7200e-03 -8.2974e+00 1.8988e-01 8.1012e-01 9.0901e-01 9.0987e-02 1.8855e-04 3.1805e-03 6.3970e-04 2.7293e-03
3.7300e-03 -8.2974e+00 1.8932e-01 8.1068e-01 9.0901e-01 9.0987e-02 1.8688e-04 3.1921e-03 6.3970e-04 2.7393e-03
3.7400e-03 -8.2974e+00 1.8876e-01 8.1124e-01 9.0901e-01 9.0987e-02 1.8521e-04 3.2038e-03 6.3970e-04 2.7493e-03
3.7500e-03 -8.2974e+00 1.8820e-01 8.1180e-01 9.0901e-01 9.0987e-02 1.8355e-04 3.2155e-03 6.3970e-04 2.7593e-03
3.7600e-03 -8.2974e+00 1.8765e-01 8.1235e-01 9.0901e-01 9.0987e-02 1.8188e-04 3.2271e-03 6.3970e-04 2.7693e-03
3.7700e-03 -8.2974e+00 1.8710e-01 8.1290e-01 9.0901e-01 9.0987e-02 1.8021e-04 3.2388e-03 6.3970e-04 2.7793e-03
3.7800e-03 -8.2974e+00 1.8656e-01 8.1344e-01 9.0901e-01 9.0987e-02 1.7855e-04 3.2505e-03 6.3970e-04 2.7893e-03
3.7900e-03 -8.2974e+00 1.8601e-01 8.1399e-01 9.0901e-01 9.0987e-02 1.7688e-04 3.2621e-03 6.3970e-04 2.7993e-03
3.8000e-03 -8.2974e+00 1.8547e-01 8.1453e-01 9.0901e-01 9.0987e-02 1.7522e-04 3.2738e-03 6.3970e-04 2.8093e-03
3.8100e-03 -8.2974e+00 1.8494e-01 8.1506e-01 9.0901e-01 9.0987e-02 1.7355e-04 3.2855e-03 6.3970e-04 2.8193e-03
3.8200e-03 -8.2974e+00 1.8440e-01 8.1560e-01 9.0901e-01 9.0987e-02 1.7188e-04 3.2971e-03 6.3970e-04 2.8293e-03
3.8300e-03 -8.2974e+00 1.8387e-01 8.1613e-01 9.0901e-01 9.0987e-02 1.7022e-04 3.3088e-03 6.3970e-04 2.8393e-03
3.8400e-03 -8.2974e+00 1.8335e-01 8.1665e-01 9.0901e-01 9.0987e-02 1.6855e-04 3.3204e-03 6.3970e-04 2.8493e-03
3.8500e-03 -8.2974e+00 1.8282e-01 8.1718e-01 9.0901e-01 9.0987e-02 1.6689e-04 3.3321e-03 6.3970e-04 2.8593e-03
3.8600e-03 -8.2974e+00 1.8230e-01 8.1770e-01 9.0901e-01 9.0987e-02 1.6522e-04 3.3438e-03 6.3970e-04 2.8693e-03
3.8700e-03 -8.2974e+00 1.8178e-01 8.1822e-01 9.0901e-01 9.0987e-02 1.6355e-04 3.3554e-03 6.3970e-04 2.8793e-03
3.8800e-03 -8.2974e+00 1.8127e-01 8.1873e-01 9.0901e-01 9.0987e-02 1.6189e-04 3.3671e-03 6.3970e-04 2.8893e-03
3.8900e-03 -8.2974e+00 1.8076e-01 8.1924e-01 9.0901e-01 9.0987e-02 1.6022e-04 3.3788e-03 6.3970e-04 2.8993e-03
3.9000e-03 -8.2974e+00 1.8025e-01 8.1975e-01 9.0901e-01 9.0987e-02 1.5855e-04 3.3904e-03 6.3970e-04 2.9093e-03
3.9100e-03 -8.2974e+00 1.7974e-01 8.2026e-01 9.0901e-01 9.0987e-02 1.5689e-04 3.4021e-03 6.3970e-04 2.9193e-03
3.9200e-03 -8.2974e+00 1.7924e-01 8.2076e-01 9.0901e-01 9.0987e-02 1.5522e-04 3.4138e-03 6.3970e-04 2.9293e-03
3.9300e-03 -8.2974e+00 1.7874e-01 8.2126e-01 9.0901e-01 9.0987e-02 1.5356e-04 3.4254e-03 6.3970e-04 2.9393e-03
3.9400e-03 -8.2974e+00 1.7824e-01 8.2176e-01 9.0901e-01 9.0987e-02 1.5189e-04 3.4371e-03 6.3970e-04 2.9493e-03
3.9500e-03 -8.2974e+00 1.7774e-01 8.2226e-01 9.0901e-01 9.0987e-02 1.5022e-04 3.4488e-03 6.3970e-04 2.9593e-03
3.9600e-03 -8.2974e+00 1.7725e-01 8.2275e-01 9.0901e-01 9.0987e-02 1.4856e-04 3.4604e-03 6.3970e-04 2.9693e-03
3.9700e-03 -8.2974e+00 1.7676e-01 8.2324e-01 9.0901e-01 9.0987e-02 1.4689e-04 3.4721e-03 6.3970e-04 2.9793e-03
3.9800e-03 -8.2974e+00 1.7627e-01 8.2373e-01 9.0901e-01 9.0987e-02 1.4522e-04 3.4838e-03 6.3970e-04 2.9893e-03
3.9900e-03 -8.2974e+00 1.7579e-01 8.2421e-01 9.0901e-01 9.0987e-02 1.4356e-04 3.4954e-03 6.3970e-04 2.9993e-03
4.0000e-03 -8.2974e+00 1.7531e-01 8.2469e-01 9.0901e-01 9.0987e-02 1.4189e-04 3.5071e-03 6.3970e-04 3.0093e-03
4.0100e-03 -8.2974e+00 1.7483e-01 8.2517e-01 9.0901e-01 9.0987e-02 1.4023e-04 3.5188e-03 6.3970e-04 3.0193e-03
4.0200e-03 -8.2974e+00 1.7435e-01 8.2565e-01 9.0901e-01 9.0987e-02 1.3856e-04 3.5304e-03 6.3970e-04 3.0293e-03
4.0300e-03 -8.2974e+00 1.7388e-01 8.2612e-01 9.0901e-01 9.0987e-02 1.3689e-04 3.5421e-03 6.3970e-04 3.0393e-03
4.0400e-03 -8.2974e+00 1.7341e-01 8.2659e-01 9.0901e-01 9.0987e-02 1.3523e-04 3.5538e-03 6.3970e-04 3.0493e-03
4.0500e-03 -8.2974e+00 1.7294e-01 8.2706e-01 9.0901e-01 9.0987e-02 1.3356e-04 3.5654e-03 6.3970e-04 3.0593e-03
4.0600e-03 -8.2974e+00 1.7247e-01 8.2753e-01 9.0901e-01 9.0987e-02 1.3189e-04 3.5771e-03 6.3970e-04 3.0693e-03
4.0700e-03 -8.2974e+00 1.7201e-01 8.2799e-01 9.0901e-01 9.0987e-02 1.3023e-04 3.5888e-03 6.3970e-04 3.0793e-03
4.0800e-03 -8.2974e+00 1.7155e-01 8.2845e-01 9.0901e-01 9.0987e-02 1.2856e-04 3.6004e-03 6.3970e-04 3.0893e-03
4.0900e-03 -8.2974e+00 1.7109e-01 8.2891e-01 9.0901e-01 9.0987e-02 1.2690e-04 3.6121e-03 6.3970e-04 3.0993e-03
4.1000e-03 -8.2974e+00 1.7063e-01 8.2937e-01 9.0901e-01 9.0987e-02 1.2523e-04 3.6238e-03 6.3970e-04 3.1093e-03
4.1100e-03 -8.2974e+00 1.7018e-01 8.2982e-01 9.0901e-01 9.0987e-02 1.2356e-04 3.6354e-03 6.3970e-04 3.1193e-03
4.1200e-03 -8.2974e+00 1.6973e-01 8.3027e-01 9.0901e-01 9.0987e-02 1.2190e-04 3.6471e-03 6.3970e-04 3.1293e-03
4.1300e-03 -8.2974e+00 1.6928e-01 8.3072e-01 9.0901e-01 9.0987e-02 1.2023e-04 3.6588e-03 6.3970e-04 3.1393e-03
4.1400e-03 -8.2974e+00 1.6883e-01 8.3117e-01 9.0901e-01 9.0987e-02 1.1857e-04 3.6704e-03 6.3970e-04 3.1493e-03
4.1500e-03 -8.2974e+00 1.6839e-01 8.3161e-01 9.0901e-01 9.0987e-02 1.1690e-04 3.6821e-03 6.3970e-04 3.1593e-03
4.1600e-03 -8.2974e+00 1.6794e-01 8.3206e-01 9.0901e-01 9.0987e-02 1.1523e-04 3.6938e-03 6.3970e-04 3.1693e-03
4.1700e-03 -8.2974e+00 1.6750e-01 8.3250e-01 9.0901e-01 9.0987e-02 1.1357e-04 3.7054e-03 6.3970e-04 3.1793e-03
4.1800e-03 -8.2974e+00 1.6707e-01 8.3293e-01 9.0901e-01 9.0987e-02 1.1190e-04 3.7171e-03 6.3970e-04 3.1893e-03
4.1900e-03 -8.2974e+00 1.6663e-01 8.3337e-01 9.0901e-01 9.0987e-02 1.1023e-04 3.7288e-03 6.3970e-04 3.1993e-03
4.2000e-03 -8.2974e+00 1.6620e-01 8.3380e-01 9.0901e-01 9.0987e-02 1.0857e-04 3.7404e-03 6.3970e-04 3.2093e-03
4.2100e-03 -8.2974e+00 1.6577e-01 8.3423e-01 9.0901e-01 9.0987e-02 1.0690e-04 3.7521e-03 6.3970e-04 3.2193e-03
4.2200e-03 -8.2974e+00 1.6534e-01 8.3466e-01 9.0901e-01 9.0987e-02 1.0524e-04 3.7638e-03 6.3970e-04 3.2293e-03
4.2300e-03 -8.2974e+00 1.6491e-01 8.3509e-01 9.0901e-01 9.0987e-02 1.0357e-04 3.7754e-03 6.3970e-04 3.2393e-03
4.2400e-03 -8.2974e+00 1.6449e-01 8.3551e-01 9.0901e-01 9.0987e-02 1.0190e-04 3.7871e-03 6.3970e-04 3.2493e-03
4.2500e-03 -8.2974e+00 1.6407e-01 8.3593e-01 9.0901e-01 9.0987e-02 1.0024e-04 3.7988e-03 6.3970e-04 3.2593e-03
4.2600e-03 -8.2974e+00 1.6365e-01 8.3635e-01 9.0901e-01 9.0987e-02 9.8571e-05 3.8104e-03 6.3970e-04 3.2693e-03
4.2700e-03 -8.2974e+00 1.6323e-01 8.3677e-01 9.0901e-01 9.0987e-02 9.6905e-05 3.8221e-03 6.3970e-04 3.2793e-03
4.2800e-03 -8.2974e+00 1.6282e-01 8.3718e-01 9.0901e-01 9.0987e-02 9.5238e-05 3.8338e-03 6.3970e-04 3.2893e-03
4.2900e-03 -8.2974e+00 1.6240e-01 8.3760e-01 9.0901e-01 9.0987e-02 9.3572e-05 3.8454e-03 6.3970e-04 3.2993e-03
4.3000e-03 -8.2974e+00 1.6199e-01 8.3801e-01 9.0901e-01 9.0987e-02 9.1906e-05 3.8571e-03 6.3970e-04 3.3093e-03
4.3100e-03 -8.2974e+00 1.6158e-01 8.3842e-01 9.0901e-01 9.0987e-02 9.0240e-05 3.8688e-03 6.3970e-04 3.3193e-03
4.3200e-03 -8.2974e+00 1.6117e-01 8.3883e-01 9.0901e-01 9.0987e-02 8.8574e-05 3.8804e-03 6.3970e-04 3.3293e-03
4.3300e-03 -8.2974e+00 1.6077e-01 8.3923e-01 9.0901e-01 9.0987e-02 8.6907e-05 3.8921e-03 6.3970e-04 3.3393e-03
4.3400e-03 -8.2974e+00 1.6037e-01 8.3963e-01 9.0901e-01 9.0987e-02 8.5241e-05 3.9038e-03 6.3970e-04 3.3493e-03
4.3500e-03 -8.2974e+00 1.5997e-01 8.4003e-01 9.0901e-01 9.0987e-02 8.3575e-05 3.9154e-03 6.3970e-04 3.3593e-03
4.3600e-03 -8.2974e+00 1.5957e-01 8.4043e-01 9.0901e-01 9.0987e-02 8.1909e-05 3.9271e-03 6.3970e-04 3.3693e-03
4.3700e-03 -8.2974e+00 1.5917e-01 8.4083e-01 9.0901e-01 9.0987e-02 8.0243e-05 3.9388e-03 6.3970e-04 3.3793e-03
4.3800e-03 -8.2974e+00 1.5877e-01 8.4123e-01 9.0901e-01 9.0987e-02 7.8576e-05 3.9504e-03 6.3970e-04 3.3893e-03
4.3900e-03 -8.2974e+00 1.5838e-01 8.4162e-01 9.0901e-01 9.0987e-02 7.6910e-05 3.9621e-03 6.3970e-04 3.3993e-03
4.4000e-03 -8.2974e+00 1.5799e-01 8.4201e-01 9.0901e-01 9.0987e-02 7.5244e-05 3.9738e-03 6.3970e-04 3.4093e-03
4.4100e-03 -8.2974e+00 1.5760e-01 8.4240e-01 9.0901e-01 9.0987e-02 7.3578e-05 3.9854e-03 6.3970e-04 3.4193e-03
4.4200e-03 -8.2974e+00 1.5721e-01 8.4279e-01 9.0901e-01 9.0987e-02 7.1912e-05 3.9971e-03 6.3970e-04 3.4293e-03
4.4300e-03 -8.2974e+00 1.5683e-01 8.4317e-01 9.0901e-01 9.0987e-02 7.0245e-05 4.0088e-03 6.3970e-04 3.4393e-03
4.4400e-03 -8.2974e+00 1.5644e-01 8.4356e-01 9.0901e-01 9.0987e-02 6.8579e-05 4.0204e-03 6.3970e-04 3.4493e-03
4.4500e-03 -8.2974e+00 1.5606e-01 8.4394e-01 9.0901e-01 9.0987e-02 6.6913e-05 4.0321e-03 6.3970e-04 3.4593e-03
4.4600e-03 -8.2974e+00 1.5568e-01 8.4432e-01 9.0901e-01 9.0987e-02 6.5247e-05 4.0438e-03 6.3970e-04 3.4693e-03
4.4700e-03 -8.2974e+00 1.5530e-01 8.4470e-01 9.0901e-01 9.0987e-02 6.3581e-05 4.0554e-03 6.3970e-04 3.4793e-03
4.4800e-03 -8.2974e+00 1.5493e-01 8.4507e-01 9.0901e-01 9.0987e-02 6.1914e-05 4.0671e-03 6.3970e-04 3.4893e-03
4.4900e-03 -8.2974e+00 1.5455e-01 8.4545e-01 9.0901e-01 9.0987e-02 6.0248e-05 4.0788e-03 6.3970e-04 3.4993e-03
4.5000e-03 -8.2974e+00 1.5418e-01 8.4582e-01 9.0901e-01 9.0987e-02 5.8582e-05 4.0904e-03 6.3970e-04 3.5093e-03
4.5100e-03 -8.2974e+00 1.5381e-01 8.4619e-01 9.0901e-01 9.0987e-02 5.6916e-05 4.1021e-03 6.3970e-04 3.5193e-03
4.5200e-03 -8.2974e+00 1.5344e-01 8.4656e-01 9.0901e-01 9.0987e-02 5.5250e-05 4.1138e-03 6.3970e-04 3.5293e-03
4.5300e-03 -8.2974e+00 1.5307e-01 8.4693e-01 9.0901e-01 9.0987e-02 5.3583e-05 4.1254e-03 6.3970e-04 3.5393e-03
4.5400e-03 -8.2974e+00 1.5271e-01 8.4729e-01 9.0901e-01 9.0987e-02 5.1917e-05 4.1371e-03 6.3970e-04 3.5493e-03
4.5500e-03 -8.2974e+00 1.5235e-01 8.4765e-01 9.0901e-01 9.0987e-02 5.0251e-05 4.1487e-03 6.3970e-04 3.5593e-03
4.5600e-03 -8.2974e+00 1.5198e-01 8.4802e-01 9.0901e-01 9.0987e-02 4.8585e-05 4.1604e-03 6.3970e-04 3.5693e-03
4.5700e-03 -8.2974e+00 1.5162e-01 8.4838e-01 9.0901e-01 9.0987e-02 4.6919e-05 4.1721e-03 6.3970e-04 3.5793e-03
4.5800e-03 -8.2974e+00 1.5127e-01 8.4873e-01 9.0901e-01 9.0987e-02 4.5252e-05 4.1837e-03 6.3970e-04 3.5893e-03
4.5900e-03 -8.2974e+00 1.5091e-01 8.4909e-01 9.0901e-01 9.0987e-02 4.3586e-05 4.1954e-03 6.3970e-04 3.5993e-03
4.6000e-03 -8.2974e+00 1.5055e-01 8.4945e-01 9.0901e-01 9.0987e-02 4.1920e-05 4.2071e-03 6.3970e-04 3.6093e-03
4.6100e-03 -8.2974e+00 1.5020e-01 8.4980e-01 9.0901e-01 9.0987e-02 4.0254e-05 4.2187e-03 6.3970e-04 3.6193e-03
4.6200e-03 -8.2974e+00 1.4985e-01 8.5015e-01 9.0901e-01 9.0987e-02 3.8588e-05 4.2304e-03 6.3970e-04 3.6293e-03
4.6300e-03 -8.2974e+00 1.4950e-01 8.5050e-01 9.0901e-01 9.0987e-02 3.6921e-05 4.2421e-03 6.3970e-04 3.6393e-03
4.6400e-03 -8.2974e+00 1.4915e-01 8.5085e-01 9.0901e-01 9.0987e-02 3.5255e-05 4.2537e-03 6.3970e-04 3.6493e-03
4.6500e-03 -8.2974e+00 1.4880e-01 8.5120e-01 9.0901e-01 9.0987e-02 3.3589e-05 4.2654e-03 6.3970e-04 3.6593e-03
4.6600e-03 -8.2974e+00 1.4846e-01 8.5154e-01 9.0901e-01 9.0987e-02 3.1923e-05 4.2771e-03 6.3970e-04 3.6693e-03
4.6700e-03 -8.2974e+00 1.4811e-01 8.5189e-01 9.0901e-01 9.0987e-02 3.0257e-05 4.2887e-03 6.3970e-04 3.6793e-03
4.6800e-03 -8.2974e+00 1.4777e-01 8.5223e-01 9.0901e-01 9.0987e-02 2.8590e-05 4.3004e-03 6.3970e-04 3.6893e-03
4.6900e-03 -8.2974e+00 1.4743e-01 8.5257e-01 9.0901e-01 9.0987e-02 2.6924e-05 4.3121e-03 6.3970e-04 3.6993e-03
4.7000e-03 -8.2974e+00 1.4709e-01 8.5291e-01 9.0901e-01 9.0987e-02 2.5258e-05 4.3237e-03 6.3970e-04 3.7093e-03
4.7100e-03 -8.2974e+00 1.4675e-01 8.5325e-01 9.0901e-01 9.0987e-02 2.3592e-05 4.3354e-03 6.3970e-04 3.7193e-03
4.7200e-03 -8.2974e+00 1.4642e-01 8.5358e-01 9.0901e-01 9.0987e-02 2.1926e-05 4.3471e-03 6.3970e-04 3.7293e-03
4.7300e-03 -8.2974e+00 1.4608e-01 8.5392e-01 9.0901e-01 9.0987e-02 2.0259e-05 4.3587e-03 6.3970e-04 3.7393e-03
4.7400e-03 -8.2974e+00 1.4575e-01 8.5425e-01 9.0901e-01 9.0987e-02 1.8593e-05 4.3704e-03 6.3970e-04 3.7493e-03
4.7500e-03 -8.2974e+00 1.4542e-01 8.5458e-01 9.0901e-01 9.0987e-02 1.6927e-05 4.3821e-03 6.3970e-04 3.7593e-03
4.7600e-03 -8.2974e+00 1.4509e-01 8.5491e-01 9.0901e-01 9.0987e-02 1.5261e-05 4.3937e-03 6.3970e-04 3.7693e-03
4.7700e-03 -8.2974e+00 1.4476e-01 8.5524e-01 9.0901e-01 9.0987e-02 1.3595e-05 4.4054e-03 6.3970e-04 3.7793e-03
4.7800e-03 -8.2974e+00 1.4443e-01 8.5557e-01 9.0901e-01 9.0987e-02 1.1928e-05 4.4171e-03 6.3970e-04 3.7893e-03
4.7900e-03 -8.2974e+00 1.4411e-01 8.5589e-01 9.0901e-01 9.0987e-02 1.0262e-05 4.4287e-03 6.3970e-04 3.7993e-03
4.8000e-03 -8.2974e+00 1.4379e-01 8.5621e-01 9.0901e-01 9.0987e-02 8.5959e-06 4.4404e-03 6.3970e-04 3.8093e-03
4.8100e-03 -8.2974e+00 1.4346e-01 8.5654e-01 9.0901e-01 9.0987e-02 6.9297e-06 4.4521e-03 6.3970e-04 3.8193e-03
4.8200e-03 -8.2974e+00 1.4314e-01 8.5686e-01 9.0901e-01 9.0987e-02 5.2635e-06 4.4637e-03 6.3970e-04 3.8293e-03
4.8300e-03 -8.2974e+00 1.4282e-01 8.5718e-01 9.0901e-01 9.0987e-02 3.5973e-06 4.4754e-03 6.3970e-04 3.8393e-03
4.8400e-03 -8.2974e+00 1.4250e-01 8.5750e-01 9.0901e-01 9.0987e-02 1.9311e-06 4.4871e-03 6.3970e-04 3.8493e-03
4.8500e-03 -8.2974e+00 1.4219e-01 8.5781e-01 9.0901e-01 9.0987e-02 2.6493e-07 4.4987e-03 6.3970e-04 3.8593e-03
4.8600e-03 -8.2975e+00 1.4210e-01 8.5790e-01 9.0899e-01 9.1014e-02 1.0000e-10 1.0000e-10 6.4087e-04 3.8691e-03
4.8700e-03 -8.2976e+00 1.4206e-01 8.5794e-01 9.0895e-01 9.1046e-02 1.0000e-10 1.0000e-10 6.4227e-04 3.8789e-03
4.8800e-03 -8.2977e+00 1.4202e-01 8.5798e-01 9.0892e-01 9.1078e-02 1.0000e-10 1.0000e-10 6.4366e-04 3.8886e-03
4.8900e-03 -8.2979e+00 1.4197e-01 8.5803e-01 9.0889e-01 9.1110e-02 1.0000e-10 1.0000e-10 6.4505e-04 3.8984e-03
4.9000e-03 -8.2980e+00 1.4193e-01 8.5807e-01 9.0886e-01 9.1142e-02 1.0000e-10 1.0000e-10 6.4644e-04 3.9081e-03
4.9100e-03 -8.2981e+00 1.4189e-01 8.5811e-01 9.0883e-01 9.1174e-02 1.0000e-10 1.0000e-10 6.4783e-04 3.9179e-03
4.9200e-03 -8.2982e+00 1.4185e-01 8.5815e-01 9.0879e-01 9.1206e-02 1.0000e-10 1.0000e-10 6.4922e-04 3.9276e-03
4.9300e-03 -8.2984e+00 1.4181e-01 8.5819e-01 9.0876e-01 9.1238e-02 1.0000e-10 1.0000e-10 6.5060e-04 3.9374e-03
4.9400e-03 -8.2985e+00 1.4176e-01 8.5824e-01 9.0873e-01 9.1270e-02 1.0000e-10 1.0000e-10 6.5199e-04 3.9471e-03
4.9500e-03 -8.2986e+00 1.4172e-01 8.5828e-01 9.0870e-01 9.1302e-02 1.0000e-10 1.0000e-10 6.5338e-04 3.9569e-03
4.9600e-03 -8.2988e+00 1.4168e-01 8.5832e-01 9.0867e-01 9.1334e-02 1.0000e-10 1.0000e-10 6.5476e-04 3.9667e-03
4.9700e-03 -8.2989e+00 1.4164e-01 8.5836e-01 9.0863e-01 9.1366e-02 1.0000e-10 1.0000e-10 6.5615e-04 3.9764e-03
4.9800e-03 -8.2990e+00 1.4160e-01 8.5840e-01 9.0860e-01 9.1398e-02 1.0000e-10 1.0000e-10 6.5753e-04 3.9862e-03
4.9900e-03 -8.2991e+00 1.4155e-01 8.5845e-01 9.0857e-01 9.1429e-02 1.0000e-10 1.0000e-10 6.5891e-04 3.9959e-03
5.0000e-03 -8.2993e+00 1.4151e-01 8.5849e-01 9.0854e-01 9.1461e-02 1.0000e-10 1.0000e-10 6.6029e-04 4.0057e-03
1.0000e-03 -8.2974e+00 9.8567e-01 1.4329e-02 9.0901e-01 9.0987e-02 6.4175e-04 7.2473e-06 6.3970e-04 9.2997e-06
2.0000e-03 -8.2974e+00 3.8793e-01 6.1207e-01 9.0901e-01 9.0987e-02 4.7513e-04 1.1739e-03 6.3970e-04 1.0093e-03
3.0000e-03 -8.2974e+00 2.4149e-01 7.5851e-01 9.0901e-01 9.0987e-02 3.0851e-04 2.3405e-03 6.3970e-04 2.0093e-03
4.0000e-03 -8.2974e+00 1.7531e-01 8.2469e-01 9.0901e-01 9.0987e-02 1.4189e-04 3.5071e-03 6.3970e-04 3.0093e-03
5.0000e-03 -8.2993e+00 1.4151e-01 8.5849e-01 9.0854e-01 9.1461e-02 1.0000e-10 1.0000e-10 6.6029e-04 4.0057e-03
6.0000e-03 -8.3118e+00 1.3751e-01 8.6249e-01 9.0539e-01 9.4606e-02 1.0000e-10 1.0000e-10 7.9428e-04 4.9819e-03
7.0000e-03 -8.3236e+00 1.3383e-01 8.6617e-01 9.0233e-01 9.7673e-02 1.0000e-10 1.0000e-10 9.2071e-04 5.9590e-03
8.0000e-03 -8.3349e+00 1.3043e-01 8.6957e-01 8.9933e-01 1.0067e-01 1.0000e-10 1.0000e-10 1.0405e-03 6.9369e-03
9.0000e-03 -8.3456e+00 1.2726e-01 8.7274e-01 8.9640e-01 1.0360e-01 1.0000e-10 1.0000e-10 1.1543e-03 7.9155e-03
1.0000e-02 -8.3559e+00 1.2431e-01 8.7569e-01 8.9352e-01 1.0648e-01 1.0000e-10 1.0000e-10 1.2627e-03 8.8947e-03
1.1000e-02 -8.3658e+00 1.2155e-01 8.7845e-01 8.9070e-01 1.0930e-01 1.0000e-10 1.0000e-10 1.3663e-03 9.8746e-03
1.2000e-02 -8.3752e+00 1.1895e-01 8.8105e-01 8.8792e-01 1.1208e-01 1.0000e-10 1.0000e-10 1.4655e-03 1.0855e-02
1.3000e-02 -8.3843e+00 1.1650e-01 8.8350e-01 8.8519e-01 1.1481e-01 1.0000e-10 1.0000e-10 1.5607e-03 1.1836e-02
1.4000e-02 -8.3931e+00 1.1419e-01 8.8581e-01 8.8251e-01 1.1749e-01 1.0000e-10 1.0000e-10 1.6522e-03 1.2817e-02
1.5000e-02 -8.4016e+00 1.1199e-01 8.8801e-01 8.7986e-01 1.2014e-01 1.0000e-10 1.0000e-10 1.7403e-03 1.3799e-02
1.6000e-02 -8.4098e+00 1.0991e-01 8.9009e-01 8.7725e-01 1.2275e-01 1.0000e-10 1.0000e-10 1.8252e-03 1.4781e-02
1.7000e-02 -8.4178e+00 1.0793e-01 8.9207e-01 8.7468e-01 1.2532e-01 1.0000e-10 1.0000e-10 1.9072e-03 1.5764e-02
1.8000e-02 -8.4254e+00 1.0604e-01 8.9396e-01 8.7214e-01 1.2786e-01 1.0000e-10 1.0000e-10 1.9864e-03 1.6746e-02
1.9000e-02 -8.4329e+00 1.0423e-01 8.9577e-01 8.6963e-01 1.3037e-01 1.0000e-10 1.0000e-10 2.0631e-03 1.7730e-02
2.0000e-02 -8.4401e+00 1.0251e-01 8.9749e-01 8.6716e-01 1.3284e-01 1.0000e-10 1.0000e-10 2.1374e-03 1.8713e-02
2.1000e-02 -8.4472e+00 1.0086e-01 8.9914e-01 8.6471e-01 1.3529e-01 1.0000e-10 1.0000e-10 2.2094e-03 1.9697e-02
2.2000e-02 -8.4540e+00 9.9270e-02 9.0073e-01 8.6230e-01 1.3770e-01 1.0000e-10 1.0000e-10 2.2793e-03 2.0681e-02
2.3000e-02 -8.4607e+00 9.7747e-02 9.0225e-01 8.5991e-01 1.4009e-01 1.0000e-10 1.0000e-10 2.3472e-03 2.1666e-02
2.4000e-02 -8.4672e+00 9.6283e-02 9.0372e-01 8.5754e-01 1.4246e-01 1.0000e-10 1.0000e-10 2.4132e-03 2.2650e-02
2.5000e-02 -8.4735e+00 9.4874e-02 9.0513e-01 8.5520e-01 1.4480e-01 1.0000e-10 1.0000e-10 2.4774e-03 2.3635e-02
2.6000e-02 -8.4797e+00 9.3517e-02 9.0648e-01 8.5289e-01 1.4711e-01 1.0000e-10 1.0000e-10 2.5400e-03 2.4621e-02
2.7000e-02 -8.4857e+00 9.2208e-02 9.0779e-01 8.5060e-01 1.4940e-01 1.0000e-10 1.0000e-10 2.6009e-03 2.5606e-02
2.8000e-02 -8.4915e+00 9.0944e-02 9.0906e-01 8.4833e-01 1.5167e-01 1.0000e-10 1.0000e-10 2.6603e-03 2.6592e-02
2.9000e-02 -8.4973e+00 8.9723e-02 9.1028e-01 8.4608e-01 1.5392e-01 1.0000e-10 1.0000e-10 2.7182e-03 2.7578e-02
3.0000e-02 -8.5029e+00 8.8542e-02 9.1146e-01 8.4386e-01 1.5614e-01 1.0000e-10 1.0000e-10 2.7748e-03 2.8564e-02
3.1000e-02 -8.5084e+00 8.7400e-02 9.1260e-01 8.4166e-01 1.5834e-01 1.0000e-10 1.0000e-10 2.8300e-03 2.9550e-02
3.2000e-02 -8.5137e+00 8.6294e-02 9.1371e-01 8.3947e-01 1.6053e-01 1.0000e-10 1.0000e-10 2.8840e-03 3.0536e-02
3.3000e-02 -8.5190e+00 8.5221e-02 9.1478e-01 8.3731e-01 1.6269e-01 1.0000e-10 1.0000e-10 2.9367e-03 3.1523e-02
3.4000e-02 -8.5241e+00 8.4182e-02 9.1582e-01 8.3516e-01 1.6484e-01 1.0000e-10 1.0000e-10 2.9883e-03 3.2510e-02
3.5000e-02 -8.5292e+00 8.3173e-02 9.1683e-01 8.3304e-01 1.6696e-01 1.0000e-10 1.0000e-10 3.0388e-03 3.3497e-02
3.6000e-02 -8.5341e+00 8.2193e-02 9.1781e-01 8.3093e-01 1.6907e-01 1.0000e-10 1.0000e-10 3.0882e-03 3.4484e-02
3.7000e-02 -8.5390e+00 8.1241e-02 9.1876e-01 8.2884e-01 1.7116e-01 1.0000e-10 1.0000e-10 3.1366e-03 3.5472e-02
3.8000e-02 -8.5437e+00 8.0316e-02 9.1968e-01 8.2677e-01 1.7323e-01 1.0000e-10 1.0000e-10 3.1840e-03 3.6459e-02
3.9000e-02 -8.5484e+00 7.9416e-02 9.2058e-01 8.2471e-01 1.7529e-01 1.0000e-10 1.0000e-10 3.2304e-03 3.7447e-02
4.0000e-02 -8.5529e+00 7.8540e-02 9.2146e-01 8.2267e-01 1.7733e-01 1.0000e-10 1.0000e-10 3.2760e-03 3.8435e-02
4.1000e-02 -8.5574e+00 7.7688e-02 9.2231e-01 8.2065e-01 1.7935e-01 1.0000e-10 1.0000e-10 3.3206e-03 3.9423e-02
4.2000e-02 -8.5618e+00 7.6857e-02 9.2314e-01 8.1865e-01 1.8135e-01 1.0000e-10 1.0000e-10 3.3645e-03 4.0411e-02
4.3000e-02 -8.5662e+00 7.6048e-02 9.2395e-01 8.1665e-01 1.8335e-01 1.0000e-10 1.0000e-10 3.4075e-03 4.1399e-02
4.4000e-02 -8.5704e+00 7.5259e-02 9.2474e-01 8.1468e-01 1.8532e-01 1.0000e-10 1.0000e-10 3.4497e-03 4.2388e-02
4.5000e-02 -8.5746e+00 7.4489e-02 9.2551e-01 8.1272e-01 1.8728e-01 1.0000e-10 1.0000e-10 3.4911e-03 4.3376e-02
4.6000e-02 -8.5787e+00 7.3738e-02 9.2626e-01 8.1077e-01 1.8923e-01 1.0000e-10 1.0000e-10 3.5318e-03 4.4365e-02
4.7000e-02 -8.5827e+00 7.3005e-02 9.2699e-01 8.0884e-01 1.9116e-01 1.0000e-10 1.0000e-10 3.5718e-03 4.5354e-02
4.8000e-02 -8.5867e+00 7.2290e-02 9.2771e-01 8.0692e-01 1.9308e-01 1.0000e-10 1.0000e-10 3.6111e-03 4.6343e-02
4.9000e-02 -8.5906e+00 7.1590e-02 9.2841e-01 8.0502e-01 1.9498e-01 1.0000e-10 1.0000e-10 3.6498e-03 4.7332e-02
5.0000e-02 -8.5945e+00 7.0907e-02 9.2909e-01 8.0313e-01 1.9687e-01 1.0000e-10 1.0000e-10 3.6878e-03 4.8321e-02
5.1000e-02 -8.5982e+00 7.0239e-02 9.2976e-01 8.0125e-01 1.9875e-01 1.0000e-10 1.0000e-10 3.7252e-03 4.9310e-02
5.2000e-02 -8.6020e+00 6.9586e-02 9.3041e-01 7.9939e-01 2.0061e-01 1.0000e-10 1.0000e-10 3.7619e-03 5.0300e-02
5.3000e-02 -8.6056e+00 6.8947e-02 9.3105e-01 7.9753e-01 2.0247e-01 1.0000e-10 1.0000e-10 3.7981e-03 5.1289e-02
5.4000e-02 -8.6092e+00 6.8322e-02 9.3168e-01 7.9570e-01 2.0430e-01 1.0000e-10 1.0000e-10 3.8337e-03 5.2279e-02
5.5000e-02 -8.6128e+00 6.7710e-02 9.3229e-01 7.9387e-01 2.0613e-01 1.0000e-10 1.0000e-10 3.8688e-03 5.3269e-02
5.6000e-02 -8.6163e+00 6.7111e-02 9.3289e-01 7.9206e-01 2.0794e-01 1.0000e-10 1.0000e-10 3.9033e-03 5.4258e-02
5.7000e-02 -8.6198e+00 6.6524e-02 9.3348e-01 7.9026e-01 2.0974e-01 1.0000e-10 1.0000e-10 3.9373e-03 5.5248e-02
5.8000e-02 -8.6232e+00 6.5950e-02 9.3405e-01 7.8847e-01 2.1153e-01 1.0000e-10 1.0000e-10 3.9708e-03 5.6238e-02
5.9000e-02 -8.6265e+00 6.5386e-02 9.3461e-01 7.8669e-01 2.1331e-01 1.0000e-10 1.0000e-10 4.0037e-03 5.7228e-02
6.0000e-02 -8.6298e+00 6.4834e-02 9.3517e-01 7.8492e-01 2.1508e-01 1.0000e-10 1.0000e-10 4.0362e-03 5.8219e-02
6.1000e-02 -8.6331e+00 6.4293e-02 9.3571e-01 7.8317e-01 2.1683e-01 1.0000e-10 1.0000e-10 4.0683e-03 5.9209e-02
6.2000e-02 -8.6363e+00 6.3762e-02 9.3624e-01 7.8142e-01 2.1858e-01 1.0000e-10 1.0000e-10 4.0999e-03 6.0199e-02
6.3000e-02 -8.6395e+00 6.3242e-02 9.3676e-01 7.7969e-01 2.2031e-01 1.0000e-10 1.0000e-10 4.1310e-03 6.1190e-02
6.4000e-02 -8.6426e+00 6.2731e-02 9.3727e-01 7.7797e-01 2.2203e-01 1.0000e-10 1.0000e-10 4.1617e-03 6.2180e-02
6.5000e-02 -8.6457e+00 6.2230e-02 9.3777e-01 7.7626e-01 2.2374e-01 1.0000e-10 1.0000e-10 4.1920e-03 6.3171e-02
6.6000e-02 -8.6487e+00 6.1738e-02 9.3826e-01 7.7456e-01 2.2544e-01 1.0000e-10 1.0000e-10 4.2218e-03 6.4162e-02
6.7000e-02 -8.6517e+00 6.1255e-02 9.3875e-01 7.7287e-01 2.2713e-01 1.0000e-10 1.0000e-10 4.2513e-03 6.5153e-02
6.8000e-02 -8.6547e+00 6.0780e-02 9.3922e-01 7.7119e-01 2.2881e-01 1.0000e-10 1.0000e-10 4.2804e-03 6.6144e-02
6.9000e-02 -8.6576e+00 6.0314e-02 9.3969e-01 7.6952e-01 2.3048e-01 1.0000e-10 1.0000e-10 4.3091e-03 6.7135e-02
7.0000e-02 -8.6605e+00 5.9857e-02 9.4014e-01 7.6786e-01 2.3214e-01 1.0000e-10 1.0000e-10 4.3374e-03 6.8126e-02
7.1000e-02 -8.6634e+00 5.9407e-02 9.4059e-01 7.6621e-01 2.3379e-01 1.0000e-10 1.0000e-10 4.3654e-03 6.9117e-02
7.2000e-02 -8.6662e+00 5.8965e-02 9.4103e-01 7.6457e-01 2.3543e-01 1.0000e-10 1.0000e-10 4.3930e-03 7.0108e-02
7.3000e-02 -8.6690e+00 5.8531e-02 9.4147e-01 7.6294e-01 2.3706e-01 1.0000e-10 1.0000e-10 4.4202e-03 7.1099e-02
7.4000e-02 -8.6718e+00 5.8104e-02 9.4190e-01 7.6132e-01 2.3868e-01 1.0000e-10 1.0000e-10 4.4471e-03 7.2091e-02
7.5000e-02 -8.6745e+00 5.7684e-02 9.4232e-01 7.5970e-01 2.4030e-01 1.0000e-10 1.0000e-10 4.4737e-03 7.3082e-02
7.6000e-02 -8.6772e+00 5.7271e-02 9.4273e-01 7.5810e-01 2.4190e-01 1.0000e-10 1.0000e-10 4.5000e-03 7.4074e-02
7.7000e-02 -8.6798e+00 5.6864e-02 9.4314e-01 7.5651e-01 2.4349e-01 1.0000e-10 1.0000e-10 4.5259e-03 7.5065e-02
7.8000e-02 -8.6824e+00 5.6465e-02 9.4354e-01 7.5492e-01 2.4508e-01 1.0000e-10 1.0000e-10 4.5515e-03 7.6057e-02
7.9000e-02 -8.6850e+00 5.6071e-02 9.4393e-01 7.5335e-01 2.4665e-01 1.0000e-10 1.0000e-10 4.5769e-03 7.7049e-02
8.0000e-02 -8.6876e+00 5.5684e-02 9.4432e-01 7.5178e-01 2.4822e-01 1.0000e-10 1.0000e-10 4.6019e-03 7.8040e-02
8.1000e-02 -8.6901e+00 5.5303e-02 9.4470e-01 7.5023e-01 2.4977e-01 1.0000e-10 1.0000e-10 4.6266e-03 7.9032e-02
8.2000e-02 -8.6926e+00 5.4928e-02 9.4507e-01 7.4868e-01 2.5132e-01 1.0000e-10 1.0000e-10 4.6511e-03 8.0024e-02
8.3000e-02 -8.6951e+00 5.4559e-02 9.4544e-01 7.4714e-01 2.5286e-01 1.0000e-10 1.0000e-10 4.6752e-03 8.1016e-02
8.4000e-02 -8.6976e+00 5.4196e-02 9.4580e-01 7.4560e-01 2.5440e-01 1.0000e-10 1.0000e-10 4.6991e-03 8.2008e-02
8.5000e-02 -8.7000e+00 5.3837e-02 9.4616e-01 7.4408e-01 2.5592e-01 1.0000e-10 1.0000e-10 4.7228e-03 8.3000e-02
8.6000e-02 -8.7024e+00 5.3485e-02 9.4652e-01 7.4256e-01 2.5744e-01 1.0000e-10 1.0000e-10 4.7461e-03 8.3992e-02
8.7000e-02 -8.7047e+00 5.3137e-02 9.4686e-01 7.4106e-01 2.5894e-01 1.0000e-10 1.0000e-10 4.7693e-03 8.4984e-02
8.8000e-02 -8.7071e+00 5.2795e-02 9.4721e-01 7.3956e-01 2.6044e-01 1.0000e-10 1.0000e-10 4.7921e-03 8.5977e-02
8.9000e-02 -8.7094e+00 5.2457e-02 9.4754e-01 7.3807e-01 2.6193e-01 1.0000e-10 1.0000e-10 4.8147e-03 8.6969e-02
9.0000e-02 -8.7117e+00 5.2125e-02 9.4788e-01 7.3658e-01 2.6342e-01 1.0000e-10 1.0000e-10 4.8371e-03 8.7961e-02
9.1000e-02 -8.7140e+00 5.1797e-02 9.4820e-01 7.3511e-01 2.6489e-01 1.0000e-10 1.0000e-10 4.8592e-03 8.8954e-02
9.2000e-02 -8.7162e+00 5.1474e-02 9.4853e-01 7.3364e-01 2.6636e-01 1.0000e-10 1.0000e-10 4.8811e-03 8.9946e-02
9.3000e-02 -8.7185e+00 5.1155e-02 9.4884e-01 7.3218e-01 2.6782e-01 1.0000e-10 1.0000e-10 4.9028e-03 9.0939e-02
9.4000e-02 -8.7207e+00 5.0841e-02 9.4916e-01 7.3073e-01 2.6927e-01 1.0000e-10 1.0000e-10 4.9243e-03 9.1932e-02
9.5000e-02 -8.7228e+00 5.0531e-02 9.4947e-01 7.2928e-01 2.7072e-01 1.0000e-10 1.0000e-10 4.9455e-03 9.2924e-02
9.6000e-02 -8.7250e+00 5.0226e-02 9.4977e-01 7.2784e-01 2.7216e-01 1.0000e-10 1.0000e-10 4.9665e-03 9.3917e-02
9.7000e-02 -8.7271e+00 4.9924e-02 9.5008e-01 7.2641e-01 2.7359e-01 1.0000e-10 1.0000e-10 4.9873e-03 9.4910e-02
9.8000e-02 -8.7292e+00 4.9627e-02 9.5037e-01 7.2499e-01 2.7501e-01 1.0000e-10 1.0000e-10 5.0079e-03 9.5903e-02
9.9000e-02 -8.7313e+00 4.9334e-02 9.5067e-01 7.2357e-01 2.7643e-01 1.0000e-10 1.0000e-10 5.0283e-03 9.6895e-02
1.0000e-01 -8.7334e+00 4.9044e-02 9.5096e-01 7.2216e-01 2.7784e-01 1.0000e-10 1.0000e-10 5.0485e-03 9.7888e-02
1.0000e-01 -8.7334e+00 4.9044e-02 9.5096e-01 7.2216e-01 2.7784e-01 1.0000e-10 1.0000e-10 5.0485e-03 9.7888e-02
2.0000e-01 -8.8746e+00 3.1529e-02 9.6847e-01 6.0843e-01 3.9157e-01 1.0000e-10 1.0000e-10 6.4250e-03 1.9735e-01
3.0000e-01 -8.9515e+00 2.3611e-02 9.7639e-01 5.2912e-01 4.7088e-01 1.0000e-10 1.0000e-10 7.1824e-03 2.9701e-01
4.0000e-01 -9.0015e+00 1.8992e-02 9.8101e-01 4.6954e-01 5.3046e-01 1.0000e-10 1.0000e-10 7.6814e-03 3.9677e-01
5.0000e-01 -9.0371e+00 1.5935e-02 9.8407e-01 4.2272e-01 5.7728e-01 1.0000e-10 1.0000e-10 8.0411e-03 4.9659e-01
6.0000e-01 -9.0640e+00 1.3750e-02 9.8625e-01 3.8479e-01 6.1521e-01 1.0000e-10 1.0000e-10 8.3153e-03 5.9645e-01
7.0000e-01 -9.0851e+00 1.2105e-02 9.8790e-01 3.5335e-01 6.4665e-01 1.0000e-10 1.0000e-10 8.5323e-03 6.9633e-01
8.0000e-01 -9.1022e+00 1.0819e-02 9.8918e-01 3.2680e-01 6.7320e-01 1.0000e-10 1.0000e-10 8.7090e-03 7.9623e-01
9.0000e-01 -9.1162e+00 9.7855e-03 9.9021e-01 3.0406e-01 6.9594e-01 1.0000e-10 1.0000e-10 8.8560e-03 8.9615e-01
1.0000e+00 -9.1281e+00 8.9352e-03 9.9106e-01 2.8435e-01 7.1565e-01 1.0000e-10 1.0000e-10 8.9804e-03 9.9608e-01
1.1000e+00 -9.1382e+00 8.2229e-03 9.9178e-01 2.6708e-01 7.3292e-01 1.0000e-10 1.0000e-10 9.0872e-03 1.0960e+00
1.2000e+00 -9.1470e+00 7.6172e-03 9.9238e-01 2.5183e-01 7.4817e-01 1.0000e-10 1.0000e-10 9.1799e-03 1.1960e+00
1.3000e+00 -9.1547e+00 7.0957e-03 9.9290e-01 2.3825e-01 7.6175e-01 1.0000e-10 1.0000e-10 9.2612e-03 1.2959e+00
1.4000e+00 -9.1614e+00 6.6418e-03 9.9336e-01 2.2608e-01 7.7392e-01 1.0000e-10 1.0000e-10 9.3332e-03 1.3959e+00
1.5000e+00 -9.1674e+00 6.2431e-03 9.9376e-01 2.1511e-01 7.8489e-01 1.0000e-10 1.0000e-10 9.3973e-03 1.4958e+00
1.6000e+00 -9.1728e+00 5.8899e-03 9.9411e-01 2.0516e-01 7.9484e-01 1.0000e-10 1.0000e-10 9.4548e-03 1.5958e+00
1.7000e+00 -9.1776e+00 5.5749e-03 9.9443e-01 1.9610e-01 8.0390e-01 1.0000e-10 1.0000e-10 9.5068e-03 1.6958e+00
1.8000e+00 -9.1820e+00 5.2921e-03 9.9471e-01 1.8782e-01 8.1218e-01 1.0000e-10 1.0000e-10 9.5539e-03 1.7957e+00
1.9000e+00 -9.1860e+00 5.0369e-03 9.9496e-01 1.8021e-01 8.1979e-01 1.0000e-10 1.0000e-10 9.5968e-03 1.8957e+00
2.0000e+00 -9.1896e+00 4.8052e-03 9.9519e-01 1.7320e-01 8.2680e-01 1.0000e-10 1.0000e-10 9.6361e-03 1.9957e+00
2.1000e+00 -9.1929e+00 4.5941e-03 9.9541e-01 1.6672e-01 8.3328e-01 1.0000e-10 1.0000e-10 9.6722e-03 2.0957e+00
2.2000e+00 -9.1960e+00 4.4009e-03 9.9560e-01 1.6071e-01 8.3929e-01 1.0000e-10 1.0000e-10 9.7055e-03 2.1957e+00
2.3000e+00 -9.1988e+00 4.2233e-03 9.9578e-01 1.5512e-01 8.4488e-01 1.0000e-10 1.0000e-10 9.7364e-03 2.2956e+00
2.4000e+00 -9.2015e+00 4.0596e-03 9.9594e-01 1.4990e-01 8.5010e-01 1.0000e-10 1.0000e-10 9.7650e-03 2.3956e+00
2.5000e+00 -9.2039e+00 3.9082e-03 9.9609e-01 1.4503e-01 8.5497e-01 1.0000e-10 1.0000e-10 9.7916e-03 2.4956e+00
2.6000e+00 -9.2062e+00 3.7677e-03 9.9623e-01 1.4047e-01 8.5953e-01 1.0000e-10 1.0000e-10 9.8164e-03 2.5956e+00
2.7000e+00 -9.2083e+00 3.6370e-03 9.9636e-01 1.3618e-01 8.6382e-01 1.0000e-10 1.0000e-10 9.8396e-03 2.6956e+00
2.8000e+00 -9.2103e+00 3.5151e-03 9.9648e-01 1.3216e-01 8.6784e-01 1.0000e-10 1.0000e-10 9.8614e-03 2.7956e+00
2.9000e+00 -9.2122e+00 3.4011e-03 9.9660e-01 1.2836e-01 8.7164e-01 1.0000e-10 1.0000e-10 9.8818e-03 2.8955e+00
3.0000e+00 -9.2139e+00 3.2944e-03 9.9671e-01 1.2478e-01 8.7522e-01 1.0000e-10 1.0000e-10 9.9010e-03 2.9955e+00
3.1000e+00 -9.2156e+00 3.1941e-03 9.9681e-01 1.2139e-01 8.7861e-01 1.0000e-10 1.0000e-10 9.9191e-03 3.0955e+00
3.2000e+00 -9.2171e+00 3.0998e-03 9.9690e-01 1.1818e-01 8.8182e-01 1.0000e-10 1.0000e-10 9.9363e-03 3.1955e+00
3.3000e+00 -9.2186e+00 3.0109e-03 9.9699e-01 1.1514e-01 8.8486e-01 1.0000e-10 1.0000e-10 9.9524e-03 3.2955e+00
3.4000e+00 -9.2200e+00 2.9270e-03 9.9707e-01 1.1225e-01 8.8775e-01 1.0000e-10 1.0000e-10 9.9678e-03 3.3955e+00
3.5000e+00 -9.2213e+00 2.8476e-03 9.9715e-01 1.0950e-01 8.9050e-01 1.0000e-10 1.0000e-10 9.9823e-03 3.4955e+00
3.6000e+00 -9.2226e+00 2.7725e-03 9.9723e-01 1.0688e-01 8.9312e-01 1.0000e-10 1.0000e-10 9.9961e-03 3.5955e+00
3.7000e+00 -9.2238e+00 2.7012e-03 9.9730e-01 1.0439e-01 8.9561e-01 1.0000e-10 1.0000e-10 1.0009e-02 3.6955e+00
3.8000e+00 -9.2249e+00 2.6335e-03 9.9737e-01 1.0201e-01 8.9799e-01 1.0000e-10 1.0000e-10 1.0022e-02 3.7955e+00
3.9000e+00 -9.2260e+00 2.5691e-03 9.9743e-01 9.9738e-02 9.0026e-01 1.0000e-10 1.0000e-10 1.0034e-02 3.8955e+00
4.0000e+00 -9.2270e+00 2.5078e-03 9.9749e-01 9.7564e-02 9.0244e-01 1.0000e-10 1.0000e-10 1.0045e-02 3.9954e+00
4.1000e+00 -9.2280e+00 2.4494e-03 9.9755e-01 9.5483e-02 9.0452e-01 1.0000e-10 1.0000e-10 1.0056e-02 4.0954e+00
4.2000e+00 -9.2289e+00 2.3936e-03 9.9761e-01 9.3489e-02 9.0651e-01 1.0000e-10 1.0000e-10 1.0066e-02 4.1954e+00
4.3000e+00 -9.2298e+00 2.3404e-03 9.9766e-01 9.1577e-02 9.0842e-01 1.0000e-10 1.0000e-10 1.0076e-02 4.2954e+00
4.4000e+00 -9.2307e+00 2.2894e-03 9.9771e-01 8.9742e-02 9.1026e-01 1.0000e-10 1.0000e-10 1.0086e-02 4.3954e+00
4.5000e+00 -9.2315e+00 2.2406e-03 9.9776e-01 8.7979e-02 9.1202e-01 1.0000e-10 1.0000e-10 1.0095e-02 4.4954e+00
4.6000e+00 -9.2323e+00 2.1939e-03 9.9781e-01 8.6284e-02 9.1372e-01 1.0000e-10 1.0000e-10 1.0104e-02 4.5954e+00
4.7000e+00 -9.2331e+00 2.1491e-03 9.9785e-01 8.4653e-02 9.1535e-01 1.0000e-10 1.0000e-10 1.0112e-02 4.6954e+00
4.8000e+00 -9.2338e+00 2.1060e-03 9.9789e-01 8.3083e-02 9.1692e-01 1.0000e-10 1.0000e-10 1.0121e-02 4.7954e+00
4.9000e+00 -9.2345e+00 2.0647e-03 9.9794e-01 8.1570e-02 9.1843e-01 1.0000e-10 1.0000e-10 1.0128e-02 4.8954e+00
5.0000e+00 -9.2352e+00 2.0249e-03 9.9798e-01 8.0112e-02 9.1989e-01 1.0000e-10 1.0000e-10 1.0136e-02 4.9954e+00
5.1000e+00 -9.2359e+00 1.9867e-03 9.9801e-01 7.8704e-02 9.2130e-01 1.0000e-10 1.0000e-10 1.0143e-02 5.0954e+00
5.2000e+00 -9.2365e+00 1.9499e-03 9.9805e-01 7.7346e-02 9.2265e-01 1.0000e-10 1.0000e-10 1.0150e-02 5.1954e+00
5.3000e+00 -9.2371e+00 1.9144e-03 9.9809e-01 7.6033e-02 9.2397e-01 1.0000e-10 1.0000e-10 1.0157e-02 5.2954e+00
5.4000e+00 -9.2377e+00 1.8802e-03 9.9812e-01 7.4765e-02 9.2524e-01 1.0000e-10 1.0000e-10 1.0163e-02 5.3954e+00
5.5000e+00 -9.2383e+00 1.8472e-03 9.9815e-01 7.3538e-02 9.2646e-01 1.0000e-10 1.0000e-10 1.0170e-02 5.4954e+00
5.6000e+00 -9.2388e+00 1.8153e-03 9.9818e-01 7.2350e-02 9.2765e-01 1.0000e-10 1.0000e-10 1.0176e-02 5.5954e+00
5.7000e+00 -9.2393e+00 1.7845e-03 9.9822e-01 7.1201e-02 9.2880e-01 1.0000e-10 1.0000e-10 1.0182e-02 5.6954e+00
5.8000e+00 -9.2398e+00 1.7548e-03 9.9825e-01 7.0087e-02 9.2991e-01 1.0000e-10 1.0000e-10 1.0187e-02 5.7954e+00
5.9000e+00 -9.2403e+00 1.7260e-03 9.9827e-01 6.9008e-02 9.3099e-01 1.0000e-10 1.0000e-10 1.0193e-02 5.8954e+00
6.0000e+00 -9.2408e+00 1.6982e-03 9.9830e-01 6.7962e-02 9.3204e-01 1.0000e-10 1.0000e-10 1.0198e-02 5.9954e+00
6.1000e+00 -9.2413e+00 1.6712e-03 9.9833e-01 6.6947e-02 9.3305e-01 1.0000e-10 1.0000e-10 1.0204e-02 6.0953e+00
6.2000e+00 -9.2417e+00 1.6451e-03 9.9835e-01 6.5961e-02 9.3404e-01 1.0000e-10 1.0000e-10 1.0209e-02 6.1953e+00
6.3000e+00 -9.2422e+00 1.6198e-03 9.9838e-01 6.5005e-02 9.3500e-01 1.0000e-10 1.0000e-10 1.0213e-02 6.2953e+00
6.4000e+00 -9.2426e+00 1.5952e-03 9.9840e-01 6.4076e-02 9.3592e-01 1.0000e-10 1.0000e-10 1.0218e-02 6.3953e+00
6.5000e+00 -9.2430e+00 1.5714e-03 9.9843e-01 6.3173e-02 9.3683e-01 1.0000e-10 1.0000e-10 1.0223e-02 6.4953e+00
6.6000e+00 -9.2434e+00 1.5483e-03 9.9845e-01 6.2295e-02 9.3771e-01 1.0000e-10 1.0000e-10 1.0227e-02 6.5953e+00
6.7000e+00 -9.2438e+00 1.5258e-03 9.9847e-01 6.1441e-02 9.3856e-01 1.0000e-10 1.0000e-10 1.0232e-02 6.6953e+00
6.8000e+00 -9.2442e+00 1.5040e-03 9.9850e-01 6.0610e-02 9.3939e-01 1.0000e-10 1.0000e-10 1.0236e-02 6.7953e+00
6.9000e+00 -9.2446e+00 1.4829e-03 9.9852e-01 5.9802e-02 9.4020e-01 1.0000e-10 1.0000e-10 1.0240e-02 6.8953e+00
7.0000e+00 -9.2449e+00 1.4623e-03 9.9854e-01 5.9015e-02 9.4099e-01 1.0000e-10 1.0000e-10 1.0244e-02 6.9953e+00
7.1000e+00 -9.2453e+00 1.4422e-03 9.9856e-01 5.8248e-02 9.4175e-01 1.0000e-10 1.0000e-10 1.0248e-02 7.0953e+00
7.2000e+00 -9.2456e+00 1.4227e-03 9.9858e-01 5.7501e-02 9.4250e-01 1.0000e-10 1.0000e-10 1.0252e-02 7.1953e+00
7.3000e+00 -9.2459e+00 1.4038e-03 9.9860e-01 5.6773e-02 9.4323e-01 1.0000e-10 1.0000e-10 1.0255e-02 7.2953e+00
7.4000e+00 -9.2463e+00 1.3853e-03 9.9861e-01 5.6063e-02 9.4394e-01 1.0000e-10 1.0000e-10 1.0259e-02 7.3953e+00
7.5000e+00 -9.2466e+00 1.3673e-03 9.9863e-01 5.5370e-02 9.4463e-01 1.0000e-10 1.0000e-10 1.0262e-02 7.4953e+00
7.6000e+00 -9.2469e+00 1.3498e-03 9.9865e-01 5.4695e-02 9.4530e-01 1.0000e-10 1.0000e-10 1.0266e-02 7.5953e+00
7.7000e+00 -9.2472e+00 1.3327e-03 9.9867e-01 5.4036e-02 9.4596e-01 1.0000e-10 1.0000e-10 1.0269e-02 7.6953e+00
7.8000e+00 -9.2475e+00 1.3160e-03 9.9868e-01 5.3392e-02 9.4661e-01 1.0000e-10 1.0000e-10 1.0273e-02 7.7953e+00
7.9000e+00 -9.2478e+00 1.2998e-03 9.9870e-01 5.2764e-02 9.4724e-01 1.0000e-10 1.0000e-10 1.0276e-02 7.8953e+00
8.0000e+00 -9.2480e+00 1.2840e-03 9.9872e-01 5.2150e-02 9.4785e-01 1.0000e-10 1.0000e-10 1.0279e-02 7.9953e+00
8.1000e+00 -9.2483e+00 1.2685e-03 9.9873e-01 5.1551e-02 9.4845e-01 1.0000e-10 1.0000e-10 1.0282e-02 8.0953e+00
8.2000e+00 -9.2486e+00 1.2534e-03 9.9875e-01 5.0965e-02 9.4903e-01 1.0000e-10 1.0000e-10 1.0285e-02 8.1953e+00
8.3000e+00 -9.2488e+00 1.2386e-03 9.9876e-01 5.0392e-02 9.4961e-01 1.0000e-10 1.0000e-10 1.0288e-02 8.2953e+00
8.4000e+00 -9.2491e+00 1.2242e-03 9.9878e-01 4.9832e-02 9.5017e-01 1.0000e-10 1.0000e-10 1.0290e-02 8.3953e+00
8.5000e+00 -9.2493e+00 1.2102e-03 9.9879e-01 4.9285e-02 9.5072e-01 1.0000e-10 1.0000e-10 1.0293e-02 8.4953e+00
8.6000e+00 -9.2496e+00 1.1964e-03 9.9880e-01 4.8749e-02 9.5125e-01 1.0000e-10 1.0000e-10 1.0296e-02 8.5953e+00
8.7000e+00 -9.2498e+00 1.1830e-03 9.9882e-01 4.8225e-02 9.5178e-01 1.0000e-10 1.0000e-10 1.0299e-02 8.6953e+00
8.8000e+00 -9.2500e+00 1.1698e-03 9.9883e-01 4.7712e-02 9.5229e-01 1.0000e-10 1.0000e-10 1.0301e-02 8.7953e+00
8.9000e+00 -9.2503e+00 1.1570e-03 9.9884e-01 4.7209e-02 9.5279e-01 1.0000e-10 1.0000e-10 1.0304e-02 8.8953e+00
9.0000e+00 -9.2505e+00 1.1444e-03 9.9886e-01 4.6718e-02 9.5328e-01 1.0000e-10 1.0000e-10 1.0306e-02 8.9953e+00
9.1000e+00 -9.2507e+00 1.1321e-03 9.9887e-01 4.6236e-02 9.5376e-01 1.0000e-10 1.0000e-10 1.0309e-02 9.0953e+00
9.2000e+00 -9.2509e+00 1.1201e-03 9.9888e-01 4.5764e-02 9.5424e-01 1.0000e-10 1.0000e-10 1.0311e-02 9.1953e+00
9.3000e+00 -9.2511e+00 1.1083e-03 9.9889e-01 4.5302e-02 9.5470e-01 1.0000e-10 1.0000e-10 1.0313e-02 9.2953e+00
9.4000e+00 -9.2513e+00 1.0967e-03 9.9890e-01 4.4849e-02 9.5515e-01 1.0000e-10 1.0000e-10 1.0316e-02 9.3953e+00
9.5000e+00 -9.2515e+00 1.0854e-03 9.9891e-01 4.4405e-02 9.5560e-01 1.0000e-10 1.0000e-10 1.0318e-02 9.4953e+00
9.6000e+00 -9.2517e+00 1.0744e-03 9.9893e-01 4.3969e-02 9.5603e-01 1.0000e-10 1.0000e-10 1.0320e-02 9.5953e+00
9.7000e+00 -9.2519e+00 1.0635e-03 9.9894e-01 4.3543e-02 9.5646e-01 1.0000e-10 1.0000e-10 1.0322e-02 9.6953e+00
9.8000e+00 -9.2521e+00 1.0529e-03 9.9895e-01 4.3124e-02 9.5688e-01 1.0000e-10 1.0000e-10 1.0324e-02 9.7953e+00
9.9000e+00 -9.2523e+00 1.0425e-03 9.9896e-01 4.2713e-02 9.5729e-01 1.0000e-10 1.0000e-10 1.0326e-02 9.8953e+00
1.0000e+01 -9.2525e+00 1.0323e-03 9.9897e-01 4.2310e-02 9.5769e-01 1.0000e-10 1.0000e-10 1.0328e-02 9.9953e+00

0
Sun/examples/ex11.log Normal file
View File

2858
Sun/examples/ex11.out Normal file

File diff suppressed because it is too large Load Diff

125
Sun/examples/ex11adv.sel Normal file
View File

@ -0,0 +1,125 @@
step Na Cl K Ca Pore_vol
-99 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 1.2500e-02
-99 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.2500e-02
-99 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.2500e-02
1 5.2815e-04 1.2000e-03 4.5842e-04 1.0672e-04 3.7500e-02
1 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 3.7500e-02
2 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 6.2500e-02
3 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 8.7500e-02
4 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.1250e-01
5 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.3750e-01
6 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.6250e-01
7 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.8750e-01
8 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 2.1250e-01
9 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 2.3750e-01
10 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 2.6250e-01
11 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 2.8750e-01
12 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 3.1250e-01
13 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 3.3750e-01
14 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 3.6250e-01
15 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 3.8750e-01
16 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 4.1250e-01
17 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 4.3750e-01
18 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 4.6250e-01
19 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 4.8750e-01
20 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 5.1250e-01
21 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 5.3750e-01
22 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 5.6250e-01
23 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 5.8750e-01
24 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 6.1250e-01
25 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 6.3750e-01
26 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 6.6250e-01
27 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 6.8750e-01
28 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 7.1250e-01
29 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 7.3750e-01
30 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 7.6250e-01
31 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 7.8750e-01
32 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 8.1250e-01
33 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 8.3750e-01
34 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 8.6250e-01
35 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 8.8750e-01
36 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 9.1250e-01
37 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 9.3750e-01
38 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 9.6250e-01
39 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 9.8750e-01
40 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.0125e+00
41 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.0375e+00
42 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.0625e+00
43 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.0875e+00
44 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.1125e+00
45 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.1375e+00
46 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.1625e+00
47 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.1875e+00
48 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.2125e+00
49 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.2375e+00
50 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.2625e+00
51 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.2875e+00
52 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.3125e+00
53 1.0000e-03 1.2000e-03 2.0000e-04 0.0000e+00 1.3375e+00
54 9.9998e-04 1.2000e-03 2.0002e-04 0.0000e+00 1.3625e+00
55 9.9993e-04 1.2000e-03 2.0007e-04 0.0000e+00 1.3875e+00
56 9.9969e-04 1.2000e-03 2.0031e-04 0.0000e+00 1.4125e+00
57 9.9860e-04 1.2000e-03 2.0140e-04 0.0000e+00 1.4375e+00
58 9.9376e-04 1.2000e-03 2.0624e-04 0.0000e+00 1.4625e+00
59 9.7266e-04 1.2000e-03 2.2734e-04 0.0000e+00 1.4875e+00
60 8.8947e-04 1.2000e-03 3.1053e-04 0.0000e+00 1.5125e+00
61 6.5396e-04 1.2000e-03 5.4604e-04 0.0000e+00 1.5375e+00
62 3.1876e-04 1.2000e-03 8.8124e-04 0.0000e+00 1.5625e+00
63 1.0663e-04 1.2000e-03 1.0934e-03 0.0000e+00 1.5875e+00
64 2.9829e-05 1.2000e-03 1.1702e-03 0.0000e+00 1.6125e+00
65 7.8763e-06 1.2000e-03 1.1921e-03 1.2216e-27 1.6375e+00
66 2.0460e-06 1.2000e-03 1.1980e-03 1.8112e-25 1.6625e+00
67 5.2878e-07 1.2000e-03 1.1995e-03 2.6557e-23 1.6875e+00
68 1.3629e-07 1.2000e-03 1.1999e-03 3.9376e-21 1.7125e+00
69 3.5021e-08 1.2000e-03 1.2000e-03 5.8912e-19 1.7375e+00
70 8.9558e-09 1.2000e-03 1.2000e-03 8.8181e-17 1.7625e+00
71 2.2719e-09 1.2000e-03 1.2000e-03 1.3080e-14 1.7875e+00
72 5.6835e-10 1.2000e-03 1.2000e-03 1.9126e-12 1.8125e+00
73 1.3869e-10 1.2000e-03 1.2000e-03 2.7576e-10 1.8375e+00
74 3.2281e-11 1.2000e-03 1.1999e-03 3.9374e-08 1.8625e+00
75 6.7673e-12 1.2000e-03 1.1890e-03 5.4946e-06 1.8875e+00
76 8.0510e-13 1.2000e-03 7.0494e-04 2.4753e-04 1.9125e+00
77 2.1968e-14 1.2000e-03 9.6079e-05 5.5196e-04 1.9375e+00
78 4.1771e-16 1.2000e-03 9.1269e-06 5.9544e-04 1.9625e+00
79 7.6748e-18 1.2000e-03 8.3782e-07 5.9958e-04 1.9875e+00
80 1.4057e-19 1.2000e-03 7.6671e-08 5.9996e-04 2.0125e+00
81 2.5740e-21 1.2000e-03 7.0147e-09 6.0000e-04 2.0375e+00
82 4.7052e-23 1.2000e-03 6.4179e-10 6.0000e-04 2.0625e+00
83 8.2642e-25 1.2000e-03 5.8721e-11 6.0000e-04 2.0875e+00
84 0.0000e+00 1.2000e-03 5.3731e-12 6.0000e-04 2.1125e+00
85 0.0000e+00 1.2000e-03 4.9168e-13 6.0000e-04 2.1375e+00
86 0.0000e+00 1.2000e-03 4.4995e-14 6.0000e-04 2.1625e+00
87 0.0000e+00 1.2000e-03 4.1178e-15 6.0000e-04 2.1875e+00
88 0.0000e+00 1.2000e-03 3.7688e-16 6.0000e-04 2.2125e+00
89 0.0000e+00 1.2000e-03 3.4497e-17 6.0000e-04 2.2375e+00
90 0.0000e+00 1.2000e-03 3.1577e-18 6.0000e-04 2.2625e+00
91 0.0000e+00 1.2000e-03 2.8907e-19 6.0000e-04 2.2875e+00
92 0.0000e+00 1.2000e-03 2.6465e-20 6.0000e-04 2.3125e+00
93 0.0000e+00 1.2000e-03 2.4231e-21 6.0000e-04 2.3375e+00
94 0.0000e+00 1.2000e-03 2.2183e-22 6.0000e-04 2.3625e+00
95 0.0000e+00 1.2000e-03 2.0287e-23 6.0000e-04 2.3875e+00
96 0.0000e+00 1.2000e-03 1.8364e-24 6.0000e-04 2.4125e+00
97 0.0000e+00 1.2000e-03 1.5102e-25 6.0000e-04 2.4375e+00
98 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.4625e+00
99 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.4875e+00
100 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.5125e+00
101 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.5375e+00
102 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.5625e+00
103 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.5875e+00
104 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.6125e+00
105 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.6375e+00
106 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.6625e+00
107 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.6875e+00
108 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.7125e+00
109 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.7375e+00
110 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.7625e+00
111 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.7875e+00
112 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.8125e+00
113 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.8375e+00
114 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.8625e+00
115 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.8875e+00
116 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.9125e+00
117 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.9375e+00
118 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.9625e+00
119 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 2.9875e+00
120 0.0000e+00 1.2000e-03 0.0000e+00 6.0000e-04 3.0125e+00

125
Sun/examples/ex11trn.sel Normal file
View File

@ -0,0 +1,125 @@
step Na Cl K Ca Pore_vol
-99 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.2500e-02
-99 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.2500e-02
1 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 3.7500e-02
0 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.2500e-02
1 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 3.7500e-02
2 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 6.2500e-02
3 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 8.7500e-02
4 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.1250e-01
5 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.3750e-01
6 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.6250e-01
7 1.0000e-03 0.0000e+00 2.0000e-04 0.0000e+00 1.8750e-01
8 1.0000e-03 3.0997e-22 2.0000e-04 0.0000e+00 2.1250e-01
9 1.0000e-03 1.5009e-17 2.0000e-04 0.0000e+00 2.3750e-01
10 1.0000e-03 6.3378e-15 2.0000e-04 0.0000e+00 2.6250e-01
11 1.0000e-03 4.4948e-13 2.0000e-04 0.0000e+00 2.8750e-01
12 1.0000e-03 1.1487e-11 2.0000e-04 0.0000e+00 3.1250e-01
13 1.0000e-03 1.5022e-10 2.0000e-04 0.0000e+00 3.3750e-01
14 1.0000e-03 1.2225e-09 2.0000e-04 0.0000e+00 3.6250e-01
15 1.0000e-03 6.9925e-09 2.0000e-04 0.0000e+00 3.8750e-01
16 1.0000e-03 3.0480e-08 2.0000e-04 0.0000e+00 4.1250e-01
17 1.0000e-03 1.0717e-07 2.0000e-04 0.0000e+00 4.3750e-01
18 1.0000e-03 3.1679e-07 2.0000e-04 0.0000e+00 4.6250e-01
19 1.0000e-03 8.1192e-07 2.0000e-04 0.0000e+00 4.8750e-01
20 1.0000e-03 1.8478e-06 2.0000e-04 0.0000e+00 5.1250e-01
21 1.0000e-03 3.8042e-06 2.0000e-04 0.0000e+00 5.3750e-01
22 1.0000e-03 7.1918e-06 2.0000e-04 0.0000e+00 5.6250e-01
23 1.0000e-03 1.2635e-05 2.0000e-04 0.0000e+00 5.8750e-01
24 1.0000e-03 2.0834e-05 2.0000e-04 0.0000e+00 6.1250e-01
25 1.0000e-03 3.2507e-05 2.0000e-04 0.0000e+00 6.3750e-01
26 1.0000e-03 4.8325e-05 2.0000e-04 0.0000e+00 6.6250e-01
27 1.0000e-03 6.8844e-05 2.0000e-04 0.0000e+00 6.8750e-01
28 1.0000e-03 9.4449e-05 2.0000e-04 0.0000e+00 7.1250e-01
29 1.0000e-03 1.2532e-04 2.0000e-04 0.0000e+00 7.3750e-01
30 1.0000e-03 1.6140e-04 2.0000e-04 0.0000e+00 7.6250e-01
31 1.0000e-03 2.0242e-04 2.0000e-04 0.0000e+00 7.8750e-01
32 1.0000e-03 2.4790e-04 2.0000e-04 0.0000e+00 8.1250e-01
33 9.9999e-04 2.9719e-04 2.0001e-04 0.0000e+00 8.3750e-01
34 9.9999e-04 3.4951e-04 2.0001e-04 0.0000e+00 8.6250e-01
35 9.9998e-04 4.0403e-04 2.0002e-04 0.0000e+00 8.8750e-01
36 9.9996e-04 4.5987e-04 2.0004e-04 0.0000e+00 9.1250e-01
37 9.9993e-04 5.1616e-04 2.0007e-04 0.0000e+00 9.3750e-01
38 9.9988e-04 5.7209e-04 2.0012e-04 0.0000e+00 9.6250e-01
39 9.9979e-04 6.2694e-04 2.0021e-04 0.0000e+00 9.8750e-01
40 9.9964e-04 6.8006e-04 2.0036e-04 0.0000e+00 1.0125e+00
41 9.9940e-04 7.3093e-04 2.0060e-04 0.0000e+00 1.0375e+00
42 9.9902e-04 7.7913e-04 2.0098e-04 0.0000e+00 1.0625e+00
43 9.9842e-04 8.2437e-04 2.0158e-04 0.0000e+00 1.0875e+00
44 9.9749e-04 8.6644e-04 2.0251e-04 0.0000e+00 1.1125e+00
45 9.9606e-04 9.0523e-04 2.0394e-04 0.0000e+00 1.1375e+00
46 9.9390e-04 9.4071e-04 2.0610e-04 0.0000e+00 1.1625e+00
47 9.9067e-04 9.7294e-04 2.0933e-04 0.0000e+00 1.1875e+00
48 9.8590e-04 1.0020e-03 2.1410e-04 0.0000e+00 1.2125e+00
49 9.7896e-04 1.0281e-03 2.2104e-04 0.0000e+00 1.2375e+00
50 9.6900e-04 1.0513e-03 2.3100e-04 0.0000e+00 1.2625e+00
51 9.5496e-04 1.0718e-03 2.4504e-04 0.0000e+00 1.2875e+00
52 9.3563e-04 1.0899e-03 2.6437e-04 0.0000e+00 1.3125e+00
53 9.0974e-04 1.1058e-03 2.9026e-04 0.0000e+00 1.3375e+00
54 8.7620e-04 1.1196e-03 3.2380e-04 0.0000e+00 1.3625e+00
55 8.3445e-04 1.1316e-03 3.6555e-04 0.0000e+00 1.3875e+00
56 7.8479e-04 1.1420e-03 4.1521e-04 0.0000e+00 1.4125e+00
57 7.2845e-04 1.1510e-03 4.7155e-04 3.5277e-28 1.4375e+00
58 6.6747e-04 1.1587e-03 5.3253e-04 4.2108e-26 1.4625e+00
59 6.0423e-04 1.1652e-03 5.9577e-04 2.1113e-24 1.4875e+00
60 5.4107e-04 1.1708e-03 6.5893e-04 9.1531e-23 1.5125e+00
61 4.7992e-04 1.1756e-03 7.2008e-04 3.5143e-21 1.5375e+00
62 4.2217e-04 1.1796e-03 7.7783e-04 1.2072e-19 1.5625e+00
63 3.6873e-04 1.1830e-03 8.3127e-04 3.6941e-18 1.5875e+00
64 3.2004e-04 1.1859e-03 8.7996e-04 1.0357e-16 1.6125e+00
65 2.7623e-04 1.1883e-03 9.2377e-04 2.6573e-15 1.6375e+00
66 2.3720e-04 1.1903e-03 9.6280e-04 6.2721e-14 1.6625e+00
67 2.0268e-04 1.1920e-03 9.9732e-04 1.4041e-12 1.6875e+00
68 1.7232e-04 1.1934e-03 1.0277e-03 2.9709e-11 1.7125e+00
69 1.4570e-04 1.1945e-03 1.0543e-03 5.8657e-10 1.7375e+00
70 1.2238e-04 1.1955e-03 1.0776e-03 1.1507e-08 1.7625e+00
71 1.0193e-04 1.1963e-03 1.0977e-03 2.0826e-07 1.7875e+00
72 8.3815e-05 1.1970e-03 1.1095e-03 3.3299e-06 1.8125e+00
73 6.6682e-05 1.1975e-03 1.0249e-03 5.4190e-05 1.8375e+00
74 5.0532e-05 1.1980e-03 7.3505e-04 2.0721e-04 1.8625e+00
75 3.8797e-05 1.1983e-03 5.3569e-04 3.1276e-04 1.8875e+00
76 3.0077e-05 1.1986e-03 4.0212e-04 3.8390e-04 1.9125e+00
77 2.3445e-05 1.1989e-03 3.0685e-04 4.3485e-04 1.9375e+00
78 1.8340e-05 1.1991e-03 2.3662e-04 4.7252e-04 1.9625e+00
79 1.4384e-05 1.1993e-03 1.8380e-04 5.0091e-04 1.9875e+00
80 1.1303e-05 1.1994e-03 1.4355e-04 5.2257e-04 2.0125e+00
81 8.8949e-06 1.1995e-03 1.1260e-04 5.3925e-04 2.0375e+00
82 7.0081e-06 1.1996e-03 8.8613e-05 5.5219e-04 2.0625e+00
83 5.5269e-06 1.1997e-03 6.9934e-05 5.6227e-04 2.0875e+00
84 4.3622e-06 1.1997e-03 5.5321e-05 5.7016e-04 2.1125e+00
85 3.4452e-06 1.1998e-03 4.3847e-05 5.7635e-04 2.1375e+00
86 2.7225e-06 1.1998e-03 3.4813e-05 5.8123e-04 2.1625e+00
87 2.1523e-06 1.1999e-03 2.7680e-05 5.8508e-04 2.1875e+00
88 1.7023e-06 1.1999e-03 2.2038e-05 5.8813e-04 2.2125e+00
89 1.3467e-06 1.1999e-03 1.7565e-05 5.9054e-04 2.2375e+00
90 1.0658e-06 1.1999e-03 1.4014e-05 5.9246e-04 2.2625e+00
91 8.4359e-07 1.1999e-03 1.1192e-05 5.9398e-04 2.2875e+00
92 6.6787e-07 1.2000e-03 8.9443e-06 5.9519e-04 2.3125e+00
93 5.2883e-07 1.2000e-03 7.1535e-06 5.9616e-04 2.3375e+00
94 4.1880e-07 1.2000e-03 5.7250e-06 5.9693e-04 2.3625e+00
95 3.3169e-07 1.2000e-03 4.5844e-06 5.9754e-04 2.3875e+00
96 2.6273e-07 1.2000e-03 3.6730e-06 5.9803e-04 2.4125e+00
97 2.0811e-07 1.2000e-03 2.9442e-06 5.9842e-04 2.4375e+00
98 1.6486e-07 1.2000e-03 2.3611e-06 5.9874e-04 2.4625e+00
99 1.3060e-07 1.2000e-03 1.8942e-06 5.9899e-04 2.4875e+00
100 1.0347e-07 1.2000e-03 1.5202e-06 5.9919e-04 2.5125e+00
101 8.1970e-08 1.2000e-03 1.2205e-06 5.9935e-04 2.5375e+00
102 6.4939e-08 1.2000e-03 9.8015e-07 5.9948e-04 2.5625e+00
103 5.1446e-08 1.2000e-03 7.8736e-07 5.9958e-04 2.5875e+00
104 4.0756e-08 1.2000e-03 6.3266e-07 5.9966e-04 2.6125e+00
105 3.2287e-08 1.2000e-03 5.0848e-07 5.9973e-04 2.6375e+00
106 2.5577e-08 1.2000e-03 4.0877e-07 5.9978e-04 2.6625e+00
107 2.0260e-08 1.2000e-03 3.2868e-07 5.9983e-04 2.6875e+00
108 1.6048e-08 1.2000e-03 2.6433e-07 5.9986e-04 2.7125e+00
109 1.2712e-08 1.2000e-03 2.1262e-07 5.9989e-04 2.7375e+00
110 1.0068e-08 1.2000e-03 1.7105e-07 5.9991e-04 2.7625e+00
111 7.9740e-09 1.2000e-03 1.3763e-07 5.9993e-04 2.7875e+00
112 6.3151e-09 1.2000e-03 1.1076e-07 5.9994e-04 2.8125e+00
113 5.0010e-09 1.2000e-03 8.9141e-08 5.9995e-04 2.8375e+00
114 3.9601e-09 1.2000e-03 7.1753e-08 5.9996e-04 2.8625e+00
115 3.1357e-09 1.2000e-03 5.7764e-08 5.9997e-04 2.8875e+00
116 2.4828e-09 1.2000e-03 4.6507e-08 5.9998e-04 2.9125e+00
117 1.9657e-09 1.2000e-03 3.7447e-08 5.9998e-04 2.9375e+00
118 1.5562e-09 1.2000e-03 3.0156e-08 5.9998e-04 2.9625e+00
119 1.2319e-09 1.2000e-03 2.4286e-08 5.9999e-04 2.9875e+00
120 9.7513e-10 1.2000e-03 1.9560e-08 5.9999e-04 3.0125e+00

0
Sun/examples/ex12.log Normal file
View File

99
Sun/examples/ex12.out Normal file
View File

@ -0,0 +1,99 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex12
Output file: ex12.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 12.--Advective and diffusive transport of heat and solutes.
Constant boundary condition at one end, closed at other.
The problem is designed so that temperature should equal Na-conc
(in mmol/kgw) after diffusion.
EXCHANGE_SPECIES
Na+ + X- = NaX
log_k 0.0
gamma 4.0 0.075
H+ + X- = HX
log_k -99.
gamma 9.0 0.0
K+ + X- = KX
log_k 0.0
gamma 3.5 0.015
SOLUTION 0 24.0 mM KNO3
units mol/kgw
temp 0 # Incoming solution 0C
pH 7.0
pe 12.0 O2(g) -0.67
K 24.e-3
N(5) 24.e-3
SOLUTION 1-20 0.001 mM KCl
units mol/kgw
temp 25 # Column is at 25C
pH 7.0
pe 12.0 O2(g) -0.67
K 1e-6
Cl 1e-6
EXCHANGE 1-20
KX 0.048
TRANSPORT # Make column temperature 0C, displace Cl
cells 20
shifts 19
flow_direction forward
bcond flux flux
length 1.0
disp 0.0 # No dispersion
diffc 0.0 # No diffusion
thermal_diffusion 1.0 # No retardation for heat
PRINT
WARNING: Cell-lengths were read for 1 cells. Last value is used till cell 20.
WARNING: Dispersivities were read for 1 cells. Last value is used till cell 20.
reset false
END
SOLUTION 0 Fixed temp 24C, and NaCl conc (first type boundary cond) at inlet
units mol/kgw
temp 24
pH 7.0
pe 12.0 O2(g) -0.67
Na 24.e-3
Cl 24.e-3
SOLUTION 20 Same as soln 0 in cell 20 at closed column end (second type boundary cond)
units mol/kgw
temp 24
pH 7.0
pe 12.0 O2(g) -0.67
Na 24.e-3
Cl 24.e-3
EXCHANGE 20
NaX 0.048
TRANSPORT # Diffuse 24C, NaCl solution from column end
shifts 1
flow_direction diffusion
bcond constant closed
thermal_diffusion 3.0 # heat is retarded equal to Na
diffc 0.3e-9 # m^2/s
timest 1.0e+10 # 317 years, 19 substeps will be used
SELECTED_OUTPUT
file ex12.sel
high_precision true
reset false
distance true
temperature true
USER_PUNCH
heading Na_mmol K_mmol Cl_mmol
10 PUNCH TOT("Na")*1000, TOT("K")*1000, TOT("Cl")*1000
END
No memory leaks

44
Sun/examples/ex12.sel Normal file
View File

@ -0,0 +1,44 @@
dist_x temp Na_mmol K_mmol Cl_mmol
-99 2.400000000000e+01 2.400000000000e+01 0.000000000000e+00 2.400000000000e+01
-99 2.400000000000e+01 2.400000000000e+01 0.000000000000e+00 2.400000000000e+01
-99 2.400000000000e+01 2.400000000000e+01 0.000000000000e+00 2.400000000000e+01
0.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
1.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
2.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
3.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
4.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
5.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
6.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
7.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
8.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
9.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
10.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
11.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
12.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
13.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
14.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
15.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
16.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
17.5 0.000000000000e+00 0.000000000000e+00 2.400000000010e+01 0.000000000000e+00
18.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
19.5 2.400000000000e+01 2.400000000000e+01 0.000000000000e+00 2.400000000000e+01
0.5 1.686181418415e+01 1.686181416184e+01 7.138185829939e+00 2.011377529332e+01
1.5 6.421492325960e+00 6.421492342616e+00 1.757850764418e+01 1.294968671951e+01
2.5 1.759908541854e+00 1.759908557221e+00 2.224009143309e+01 7.342808261321e+00
3.5 3.571924631562e-01 3.571924666823e-01 2.364280752813e+01 3.623408283684e+00
4.5 5.490209781370e-02 5.490209803302e-02 2.394509789974e+01 1.538555967129e+00
5.5 6.484238380348e-03 6.484238322345e-03 2.399351576095e+01 5.556625533113e-01
6.5 5.926340095484e-04 5.926339925265e-04 2.399940736587e+01 1.684990632469e-01
7.5 4.190926756604e-05 4.190926525116e-05 2.399995809080e+01 4.224784404205e-02
8.5 2.276345750780e-06 2.276345548554e-06 2.399999772377e+01 8.664946370896e-03
9.5 1.396593677778e-07 1.396593266673e-07 2.399999986046e+01 2.055609847093e-03
10.5 1.138869021831e-06 1.138868368161e-06 2.399999886125e+01 4.374443607427e-03
11.5 2.090811414205e-05 2.090810331638e-05 2.399997909199e+01 2.044715368548e-02
12.5 2.951795282278e-04 2.951793938629e-04 2.399970482061e+01 7.995922685941e-02
13.5 3.221164570742e-03 3.221163321490e-03 2.399677883641e+01 2.567109777341e-01
14.5 2.715473190226e-02 2.715472330367e-02 2.397284527577e+01 6.850286499844e-01
15.5 1.753541123879e-01 1.753540697297e-01 2.382464592812e+01 1.533872870596e+00
16.5 8.525032220200e-01 8.525030769812e-01 2.314749691919e+01 2.902126148041e+00
17.5 3.032149931402e+00 3.032149625513e+00 2.096785036949e+01 4.663139220104e+00
18.5 7.550952821146e+00 7.550952502686e+00 1.644904749357e+01 6.385483516941e+00
19.5 1.235834674495e+01 1.235834658501e+01 1.164165341481e+01 7.468268986482e+00

0
Sun/examples/ex12a.log Normal file
View File

188
Sun/examples/ex12a.out Normal file
View File

@ -0,0 +1,188 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex12a
Output file: ex12a.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 12a.--Advective and diffusive transport of heat and solutes.
Constant boundary condition at one end, closed at other.
The problem is designed so that temperature should equal Na-conc
(in mmol/kgw) after diffusion. Compares with analytical solution
for 20-cell and 60-cell models.
EXCHANGE_SPECIES
Na+ + X- = NaX
log_k 0.0
gamma 4.0 0.075
H+ + X- = HX
log_k -99.
gamma 9.0 0.0
K+ + X- = KX
log_k 0.0
gamma 3.5 0.015
SOLUTION 0 Fixed temp 24C, and NaCl conc (first type boundary cond) at inlet
units mol/kgw
temp 24
pH 7.0
pe 12.0 O2(g) -0.67
Na 24.e-3
Cl 24.e-3
SOLUTION 1-19 24.0 mM KNO3
units mol/kgw
temp 0 # Incoming solution 0C
pH 7.0
pe 12.0 O2(g) -0.67
K 24.e-3
N(5) 24.e-3
EXCHANGE 1-19
KX 0.048
SOLUTION 20 Same as soln 0 in cell 20 at closed column end (second type boundary cond)
units mol/kgw
temp 24
pH 7.0
pe 12.0 O2(g) -0.67
Na 24.e-3
Cl 24.e-3
EXCHANGE 20
NaX 0.048
PRINT
reset false
END
TRANSPORT # Diffuse 24C, NaCl solution from column end
cells 20
shifts 1
flow_direction diffusion
bcond constant closed
length 1.0
thermal_diffusion 3.0 # Heat is retarded equal to Na
disp 0.0 # No dispersion
diffc 0.3e-9 # m^2/s
timest 1.0e+10 # 317 years, 19 substeps will be used
SELECTED_OUTPUT
WARNING: Cell-lengths were read for 1 cells. Last value is used till cell 20.
WARNING: Dispersivities were read for 1 cells. Last value is used till cell 20.
file ex12a.sel
high_precision true
reset false
distance true
temperature true
USER_PUNCH
heading Na_mmol K_mmol Cl_mmol Cl-analytic Na_analytic
10 PUNCH TOT("Na")*1000, TOT("K")*1000, TOT("Cl")*1000
20 DATA 0.254829592, -0.284496736, 1.421413741, -1.453152027, 1.061405429
30 x = DIST
40 if (x > 8.5 OR SIM_TIME <= 0) THEN END
50 IF (ABS(x MOD 0.5) > 1e-3) OR (TC <= 0) THEN END
60 READ a1, a2, a3, a4, a5
70 REM calculate error in Cl
80 Arg = x / (2*SQRT(3e-10 * SIM_TIME / 1.0))
90 e = 1/(1 + 0.3275911 * Arg)
100 erfc_Cl = (e*(a1+e*(a2+e*(a3+e*(a4+e*a5)))))*EXP(-Arg*Arg)
110 REM calculate error in Na
120 Arg = x / (2*SQRT(3e-10 * SIM_TIME / 3.0))
130 e = 1/(1 + 0.3275911 * Arg)
140 erfc_Na = (e*(a1+e*(a2+e*(a3+e*(a4+e*a5)))))*EXP(-Arg*Arg)
150 REM punch results
160 error_Cl = 0.024 * erfc_Cl - TOT("Cl")
170 error_Na = 0.024 * erfc_Na - TOT("Na")
180 PUNCH error_Cl, error_Na
190 REM store results
200 j = x - 0.5
210 PUT(error_Cl, SIM_NO, j, 1)
220 PUT(error_Na, SIM_NO, j, 2)
500 END
END
SELECTED_OUTPUT
user_punch false
SOLUTION 0 Fixed temp 24C, and NaCl conc (first type boundary cond) at inlet
units mol/kgw
temp 24
pH 7.0
pe 12.0 O2(g) -0.67
Na 24.e-3
Cl 24.e-3
SOLUTION 1-59 24.0 mM KNO3
units mol/kgw
temp 0 # Incoming solution 0C
pH 7.0
pe 12.0 O2(g) -0.67
K 24.e-3
N(5) 24.e-3
EXCHANGE 1-59
KX 0.048
SOLUTION 60 Same as soln 0 in cell 60 at closed column end (second type boundary cond)
units mol/kgw
temp 24
pH 7.0
pe 12.0 O2(g) -0.67
Na 24.e-3
Cl 24.e-3
EXCHANGE 60
NaX 0.048
END
TRANSPORT # Diffuse 24C, NaCl solution from column end
cells 60
shifts 1
flow_direction diffusion
bcond constant closed
thermal_diffusion 3.0 # Heat is retarded equal to Na
disp 0.0 # No dispersion
diffc 0.3e-9 # m^2/s
length .33333333333333333
timest 1.0e+10 # 317 years
punch_cells 1-60
SELECTED_OUTPUT
WARNING: Cell-lengths were read for 1 cells. Last value is used till cell 60.
WARNING: Dispersivities were read for 1 cells. Last value is used till cell 60.
high_precision true
user_punch true
reset false
distance true
temperature true
END
SOLUTION # Initial solution calculation for pure water
PRINT
reset false # Initial solution calculation not printed
user_print true
SELECTED_OUTPUT
high_precision false # Controls precision for USER_PRINT too.
USER_PRINT
10 PRINT " Error in Cl concentration Error in Na concentration"
20 PRINT " ------------------------- -------------------------"
30 PRINT " Distance 20-cell 60-cell 20-cell 60-cell"
40 PRINT " "
50 FOR j = 0 TO 8
60 PRINT j + 0.5, GET(2, j, 1), GET(4, j, 1), GET(2, j, 2), GET(4, j, 2)
70 NEXT j
END
----------------------------------User print-----------------------------------
Error in Cl concentration Error in Na concentration
------------------------- -------------------------
Distance 20-cell 60-cell 20-cell 60-cell
5.0000e-01 4.3817e-06 9.0009e-08 5.0636e-04 3.9397e-05
1.5000e+00 1.7304e-05 1.0407e-06 5.1077e-04 5.5286e-05
2.5000e+00 3.5613e-05 3.2028e-06 9.0486e-05 1.4725e-05
3.5000e+00 4.9599e-05 5.2170e-06 -3.7312e-05 -3.8884e-06
4.5000e+00 5.0063e-05 5.6394e-06 -1.9794e-05 -2.5770e-06
5.5000e+00 3.8208e-05 4.4562e-06 -4.0684e-06 -5.0254e-07
6.5000e+00 2.2627e-05 2.7007e-06 -4.8926e-07 -4.8938e-08
7.5000e+00 1.0547e-05 1.2850e-06 -3.9174e-08 -2.7009e-09
8.5000e+00 3.8231e-06 4.5302e-07 -2.2318e-09 -9.0081e-11
No memory leaks

169
Sun/examples/ex12a.sel Normal file
View File

@ -0,0 +1,169 @@
dist_x temp Na_mmol K_mmol Cl_mmol Cl-analytic Na_analytic
0.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
1.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
2.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
3.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
4.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
5.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
6.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
7.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
8.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
9.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
10.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
11.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
12.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
13.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
14.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
15.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
16.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
17.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
18.5 0.000000000000e+00 0.000000000000e+00 2.400000000009e+01 0.000000000000e+00
19.5 2.400000000000e+01 2.400000000000e+01 0.000000000000e+00 2.400000000000e+01
0.5 1.686181418415e+01 1.686181419284e+01 7.138185798940e+00 2.011377529332e+01 4.381717721817e-06 5.063555346726e-04
1.5 6.421492325960e+00 6.421492401967e+00 1.757850758482e+01 1.294968671951e+01 1.730376465525e-05 5.107739267532e-04
2.5 1.759908541854e+00 1.759908596887e+00 2.224009139342e+01 7.342808261321e+00 3.561257289983e-05 9.048612448212e-05
3.5 3.571924631562e-01 3.571924817826e-01 2.364280751302e+01 3.623408283684e+00 4.959925523712e-05 -3.731213350966e-05
4.5 5.490209781370e-02 5.490210180416e-02 2.394509789597e+01 1.538555967129e+00 5.006313596727e-05 -1.979378199416e-05
5.5 6.484238380348e-03 6.484238983030e-03 2.399351576028e+01 5.556625533113e-01 3.820767165714e-05 -4.068366980646e-06
6.5 5.926340095484e-04 5.926340766447e-04 2.399940736578e+01 1.684990632469e-01 2.262672987200e-05 -4.892608394194e-07
7.5 4.190926756604e-05 4.190927316640e-05 2.399995809078e+01 4.224784404205e-02 1.054699173423e-05 -3.917411153365e-08
8.5 2.276345750780e-06 2.276346101865e-06 2.399999772376e+01 8.664946370896e-03 3.823149392506e-06 -2.231772077916e-09
9.5 1.396593677778e-07 1.396593921606e-07 2.399999986046e+01 2.055609847093e-03
10.5 1.138869021831e-06 1.138869196840e-06 2.399999886124e+01 4.374443607427e-03
11.5 2.090811414205e-05 2.090811693112e-05 2.399997909197e+01 2.044715368548e-02
12.5 2.951795282278e-04 2.951795617161e-04 2.399970482043e+01 7.995922685941e-02
13.5 3.221164570742e-03 3.221164872772e-03 2.399677883485e+01 2.567109777341e-01
14.5 2.715473190226e-02 2.715473392142e-02 2.397284526515e+01 6.850286499844e-01
15.5 1.753541123879e-01 1.753541220807e-01 2.382464587576e+01 1.533872870596e+00
16.5 8.525032220200e-01 8.525032534626e-01 2.314749674271e+01 2.902126148041e+00
17.5 3.032149931402e+00 3.032149994216e+00 2.096785000078e+01 4.663139220104e+00
18.5 7.550952821146e+00 7.550952899109e+00 1.644904709714e+01 6.385483516941e+00
19.5 1.235834674495e+01 1.235834684370e+01 1.164165315611e+01 7.468268986482e+00
dist_x temp
-99 2.400000000000e+01
-99 0.000000000000e+00
-99 2.400000000000e+01
-99 2.400000000000e+01
dist_x temp Na_mmol K_mmol Cl_mmol Cl-analytic Na_analytic
0.166667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
0.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
0.833333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
1.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
1.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
1.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
2.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
2.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
2.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
3.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
3.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
3.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
4.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
4.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
4.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
5.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
5.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
5.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
6.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
6.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
6.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
7.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
7.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
7.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
8.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
8.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
8.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
9.16667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
9.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
9.83333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
10.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
10.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
10.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
11.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
11.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
11.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
12.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
12.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
12.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
13.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
13.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
13.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
14.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
14.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
14.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
15.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
15.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
15.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
16.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
16.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
16.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
17.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
17.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
17.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
18.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
18.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
18.8333 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
19.1667 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
19.5 0.000000000000e+00 0.000000000000e+00 2.400000000000e+01 0.000000000000e+00
19.8333 2.400000000000e+01 2.400000000000e+01 0.000000000000e+00 2.400000000000e+01
0.166667 2.173421305916e+01 2.173421306343e+01 2.265786933713e+00 2.269804666237e+01
0.5 1.732877230198e+01 1.732877231885e+01 6.671227673618e+00 2.011806700231e+01 9.000873062853e-08 3.939740866218e-05
0.833333 1.328083118787e+01 1.328083122259e+01 1.071916876673e+01 1.760855984610e+01
1.16667 9.764783869793e+00 9.764783923632e+00 1.423521606399e+01 1.521226338251e+01
1.5 6.876979954453e+00 6.876980022636e+00 1.712301996456e+01 1.296594983180e+01 1.040652364160e-06 5.528630608450e-05
1.83333 4.633445178532e+00 4.633445251920e+00 1.936655473578e+01 1.089878644688e+01
2.16667 2.983957613764e+00 2.983957682799e+00 2.101604230602e+01 9.031332911172e+00
2.5 1.835670035272e+00 1.835670093239e+00 2.216432989702e+01 7.375218041863e+00 3.202792358406e-06 1.472462813043e-05
2.83333 1.078309641703e+00 1.078309685856e+00 2.292169030595e+01 5.933464823536e+00
3.16667 6.047271172834e-01 6.047271481610e-01 2.339527284513e+01 4.701369002513e+00
3.5 3.237687663205e-01 3.237687863260e-01 2.367623120832e+01 3.667790505378e+00 5.217033543007e-06 -3.888438053093e-06
3.83333 1.655091653734e-01 1.655091774636e-01 2.383449081836e+01 2.816693047508e+00
4.16667 8.080184009388e-02 8.080184694439e-02 2.391919814987e+01 2.128765884991e+00
4.5 3.768529738011e-02 3.768530103391e-02 2.396231469660e+01 1.582979737206e+00 5.639365889894e-06 -2.576981223905e-06
4.83333 1.679748179371e-02 1.679748363383e-02 2.398320251464e+01 1.157961028529e+00
5.16667 7.158658672534e-03 7.158659549847e-03 2.399284133922e+01 8.331081560779e-01
5.5 2.918406916536e-03 2.918407313331e-03 2.399708159183e+01 5.894139758477e-01 4.456249120743e-06 -5.025353109470e-07
5.83333 1.138704483513e-03 1.138704654056e-03 2.399886129476e+01 4.099947290008e-01
6.16667 4.254614091980e-04 4.254614789566e-04 2.399957453813e+01 2.803535790356e-01
6.5 1.523110828875e-04 1.523111100786e-04 2.399984768864e+01 1.884251292313e-01 2.700663887612e-06 -4.893787285338e-08
6.83333 5.227158932778e-05 5.227159943954e-05 2.399994772825e+01 1.244558376472e-01
7.16667 1.720693829075e-05 1.720694188206e-05 2.399998279298e+01 8.077556918093e-02
7.5 5.436060808742e-06 5.436062028079e-06 2.399999456390e+01 5.150981286307e-02 1.285022913218e-06 -2.700900395322e-09
7.83333 1.649087567417e-06 1.649087963540e-06 2.399999835090e+01 3.227276557119e-02
8.16667 4.806328011003e-07 4.806329243359e-07 2.399999951938e+01 1.987075437176e-02
8.5 1.346545980534e-07 1.346546347973e-07 2.399999986537e+01 1.203507596490e-02 4.530197984976e-07 -9.008061084852e-11
8.83333 3.628418612942e-08 3.628419663780e-08 2.399999996375e+01 7.194421703709e-03
9.16667 9.420115605087e-09 9.420118494085e-09 2.399999999061e+01 4.290208467916e-03
9.5 2.409789753518e-09 2.409790536015e-09 2.399999999763e+01 2.633460429579e-03
9.83333 8.318493065839e-10 8.318495907164e-10 2.399999999921e+01 1.799170182453e-03
10.1667 1.239138622414e-09 1.239139029450e-09 2.399999999880e+01 1.552911248870e-03
10.5 4.450121249069e-09 4.450122620282e-09 2.399999999559e+01 1.804410616828e-03
10.8333 1.697307773631e-08 1.697308267056e-08 2.399999998306e+01 2.583364148394e-03
11.1667 6.262520065472e-08 6.262521780825e-08 2.399999993741e+01 4.033590225456e-03
11.5 2.221760110271e-07 2.221760682136e-07 2.399999977785e+01 6.422343300949e-03
11.8333 7.572168365738e-07 7.572170191795e-07 2.399999924281e+01 1.016200278611e-02
12.1667 2.477714073998e-06 2.477714631994e-06 2.399999752230e+01 1.584124624556e-02
12.5 7.778925375184e-06 7.778927005412e-06 2.399999222108e+01 2.426212581439e-02
12.8333 2.341776426203e-05 2.341776881132e-05 2.399997658222e+01 3.647820852624e-02
13.1667 6.755207229881e-05 6.755208441218e-05 2.399993244787e+01 5.382725013175e-02
13.5 1.865949099352e-04 1.865949406769e-04 2.399981340498e+01 7.795002257855e-02
13.8333 4.931967003130e-04 4.931967745830e-04 2.399950680310e+01 1.107853267574e-01
14.1667 1.246472753669e-03 1.246472924261e-03 2.399875352688e+01 1.545304347559e-01
14.5 3.009977094510e-03 3.009977466523e-03 2.399699002225e+01 2.115568175130e-01
14.8333 6.939537438586e-03 6.939538207639e-03 2.399306046140e+01 2.842735712027e-01
15.1667 1.526331935379e-02 1.526332085840e-02 2.398473667861e+01 3.749358095681e-01
15.5 3.200217915009e-02 3.200218193090e-02 2.396799781737e+01 4.854024361712e-01
15.8333 6.391193399667e-02 6.391193884267e-02 2.393608806026e+01 6.168566584837e-01
16.1667 1.214834631133e-01 1.214834710604e-01 2.387851652783e+01 7.695123116931e-01
16.5 2.196089759550e-01 2.196089881955e-01 2.378039101048e+01 9.423379783552e-01
16.8333 3.772704376914e-01 3.772704553669e-01 2.362272954311e+01 1.132837159798e+00
17.1667 6.154714589941e-01 6.154714828922e-01 2.338452851541e+01 1.336924520486e+00
17.5 9.528239860304e-01 9.528240162733e-01 2.304717598190e+01 1.548934044811e+00
17.8333 1.398887571630e+00 1.398887607499e+00 2.260111239061e+01 1.761784203671e+00
18.1667 1.946511170344e+00 1.946511210371e+00 2.205348878777e+01 1.967308461518e+00
18.5 2.565669345631e+00 2.565669387970e+00 2.143433061028e+01 2.156738468785e+00
18.8333 3.201925616708e+00 3.201925659659e+00 2.079807433877e+01 2.321305007457e+00
19.1667 3.781994216092e+00 3.781994258530e+00 2.021800574010e+01 2.452901809002e+00
19.5 4.226690935644e+00 4.226690977196e+00 1.977330902162e+01 2.544743405451e+00
19.8333 4.468507319433e+00 4.468507360365e+00 1.953149263856e+01 2.591943163049e+00
dist_x temp Na_mmol K_mmol Cl_mmol Cl-analytic Na_analytic
-99 25.000 0.0000e+00 0.0000e+00 0.0000e+00

0
Sun/examples/ex13a.log Normal file
View File

310
Sun/examples/ex13a.out Normal file
View File

@ -0,0 +1,310 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex13a
Output file: ex13a.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 13A.--1 mmol/l NaCl/NO3 enters column with stagnant zones.
Implicit definition of first-order exchange model.
SOLUTION 0 # 1 mmol/l NaCl
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
Na 1.0 # Na has Retardation = 2
Cl 1.0 # Cl has Retardation = 1, stagnant exchange
N(5) 1.0 # NO3 is conservative
END
-----
TITLE
-----
Example 13A.--1 mmol/l NaCl/NO3 enters column with stagnant zones.
Implicit definition of first-order exchange model.
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 0.
-----------------------------Solution composition------------------------------
Elements Molality Moles
Cl 1.000e-03 1.000e-03
N(5) 1.000e-03 1.000e-03
Na 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000
pe = 13.605 Equilibrium with O2(g)
Activity of water = 1.000
Ionic strength = 1.500e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 4.551e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.000e-03
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -33.33
Iterations = 3
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.046e-07 1.001e-07 -6.981 -7.000 -0.019
H+ 1.042e-07 1.000e-07 -6.982 -7.000 -0.018
H2O 5.551e+01 9.999e-01 1.744 -0.000 0.000
Cl 1.000e-03
Cl- 1.000e-03 9.576e-04 -3.000 -3.019 -0.019
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
N(5) 1.000e-03
NO3- 1.000e-03 9.573e-04 -3.000 -3.019 -0.019
Na 1.000e-03
Na+ 1.000e-03 9.580e-04 -3.000 -3.019 -0.019
NaOH 6.327e-11 6.329e-11 -10.199 -10.199 0.000
O(0) 4.374e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
Halite -7.62 -6.04 1.58 NaCl
O2(g) -0.70 -3.66 -2.96 O2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
SOLUTION 1-41 # Column with KNO3
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
K 1.0
N(5) 1.0
EXCHANGE 1-41
equilibrate 1
X 1.e-3
EXCHANGE_SPECIES # For linear exchange, make KX exch. coeff. equal to NaX
K+ + X- = KX
log_k 0.0
gamma 3.5 0.015
END
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1.
-----------------------------Solution composition------------------------------
Elements Molality Moles
K 1.000e-03 1.000e-03
N(5) 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000
pe = 13.605 Equilibrium with O2(g)
Activity of water = 1.000
Ionic strength = 1.000e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.351e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -3.351e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 3
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.038e-07 1.001e-07 -6.984 -7.000 -0.016
H+ 1.034e-07 1.000e-07 -6.985 -7.000 -0.015
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
K 1.000e-03
K+ 1.000e-03 9.649e-04 -3.000 -3.016 -0.016
KOH 3.345e-11 3.346e-11 -10.476 -10.476 0.000
N(5) 1.000e-03
NO3- 1.000e-03 9.647e-04 -3.000 -3.016 -0.016
O(0) 4.375e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
O2(g) -0.70 -3.66 -2.96 O2
-------------------------------------------------------
Beginning of initial exchange-composition calculations.
-------------------------------------------------------
Exchange 1.
X 1.000e-03 mol
Equiv- Equivalent Log
Species Moles alents Fraction Gamma
KX 1.000e-03 1.000e-03 1.000e+00 -0.016
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using solution 1.
Using exchange 1. Exchange assemblage after simulation 2.
-----------------------------Exchange composition------------------------------
X 1.000e-03 mol
Equiv- Equivalent Log
Species Moles alents Fraction Gamma
KX 1.000e-03 1.000e-03 1.000e+00 -0.016
NH4X 6.872e-63 6.872e-63 6.872e-60 -0.016
-----------------------------Solution composition------------------------------
Elements Molality Moles
K 1.000e-03 1.000e-03
N 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000 Charge balance
pe = 13.605 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 1.000e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.351e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -3.351e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 0
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.038e-07 1.001e-07 -6.984 -7.000 -0.016
H+ 1.034e-07 1.000e-07 -6.985 -7.000 -0.015
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
K 1.000e-03
K+ 1.000e-03 9.649e-04 -3.000 -3.016 -0.016
KOH 3.345e-11 3.346e-11 -10.476 -10.476 0.000
N(-3) 0.000e+00
NH4+ 0.000e+00 0.000e+00 -62.763 -62.779 -0.016
NH3 0.000e+00 0.000e+00 -65.023 -65.023 0.000
N(0) 1.994e-19
N2 9.971e-20 9.973e-20 -19.001 -19.001 0.000
N(3) 2.291e-16
NO2- 2.291e-16 2.210e-16 -15.640 -15.656 -0.016
N(5) 1.000e-03
NO3- 1.000e-03 9.647e-04 -3.000 -3.016 -0.016
O(0) 4.375e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
N2(g) -15.74 -19.00 -3.26 N2
NH3(g) -66.79 -65.02 1.77 NH3
O2(g) -0.70 -3.66 -2.96 O2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 3.
------------------------------------
TRANSPORT
cells 20
shifts 5
flow_direction forward
timest 3600
bcond flux flux
diffc 0.0
length 0.1
disp 0.015
stagnant 1 6.8e-6 0.3 0.1
PRINT
WARNING: Cell-lengths were read for 1 cells. Last value is used till cell 20.
WARNING: Dispersivities were read for 1 cells. Last value is used till cell 20.
reset false
END
SOLUTION 0 # Original solution reenters
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
K 1.0
N(5) 1.0
TRANSPORT
shifts 10
punch_frequency 10
punch_cells 1-20
SELECTED_OUTPUT
file ex13a.sel
reset false
solution
distance true
USER_PUNCH
heading Cl_mmol Na_mmol
10 PUNCH TOT("Cl")*1000, TOT("Na")*1000
END
No memory leaks

42
Sun/examples/ex13a.sel Normal file
View File

@ -0,0 +1,42 @@
soln dist_x Cl_mmol Na_mmol
0 -99 0.0000e+00 0.0000e+00
1 0.05 9.6495e-01 8.8504e-01
2 0.15 9.1812e-01 6.9360e-01
3 0.25 8.4451e-01 4.3288e-01
4 0.35 7.1652e-01 1.9734e-01
5 0.45 4.9952e-01 6.0705e-02
6 0.55 2.4048e-01 1.1785e-02
7 0.65 7.2812e-02 1.4039e-03
8 0.75 1.3132e-02 9.9324e-05
9 0.85 1.2882e-03 3.8318e-06
10 0.95 5.2940e-05 6.2140e-08
11 1.05 0.0000e+00 0.0000e+00
12 1.15 0.0000e+00 0.0000e+00
13 1.25 0.0000e+00 0.0000e+00
14 1.35 0.0000e+00 0.0000e+00
15 1.45 0.0000e+00 0.0000e+00
16 1.55 0.0000e+00 0.0000e+00
17 1.65 0.0000e+00 0.0000e+00
18 1.75 0.0000e+00 0.0000e+00
19 1.85 0.0000e+00 0.0000e+00
20 1.95 0.0000e+00 0.0000e+00
1 0.05 7.5889e-03 2.0250e-02
2 0.15 1.7993e-02 5.0943e-02
3 0.25 3.3135e-02 1.0209e-01
4 0.35 5.3591e-02 1.7480e-01
5 0.45 8.0158e-02 2.5484e-01
6 0.55 1.1396e-01 3.1308e-01
7 0.65 1.5767e-01 3.2277e-01
8 0.75 2.1666e-01 2.7968e-01
9 0.85 2.9573e-01 2.0468e-01
10 0.95 3.8769e-01 1.2726e-01
11 1.05 4.6467e-01 6.7581e-02
12 1.15 4.9243e-01 3.0745e-02
13 1.25 4.5811e-01 1.1988e-02
14 1.35 3.7620e-01 3.9981e-03
15 1.45 2.7323e-01 1.1366e-03
16 1.55 1.7416e-01 2.7440e-04
17 1.65 9.6074e-02 5.6038e-05
18 1.75 4.5211e-02 9.6477e-06
19 1.85 1.7934e-02 1.3954e-06
20 1.95 6.4869e-03 1.7678e-07

0
Sun/examples/ex13b.log Normal file
View File

430
Sun/examples/ex13b.out Normal file
View File

@ -0,0 +1,430 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex13b
Output file: ex13b.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 13B.--1 mmol/l NaCl/NO3 enters column with stagnant zones.
Explicit definition of first-order exchange factors.
SOLUTION 0 # 1 mmol/l NaCl
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
Na 1.0 # Na has Retardation = 2
Cl 1.0 # Cl has Retardation = 1, stagnant exchange
N(5) 1.0 # NO3 is conservative
END
-----
TITLE
-----
Example 13B.--1 mmol/l NaCl/NO3 enters column with stagnant zones.
Explicit definition of first-order exchange factors.
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 0.
-----------------------------Solution composition------------------------------
Elements Molality Moles
Cl 1.000e-03 1.000e-03
N(5) 1.000e-03 1.000e-03
Na 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000
pe = 13.605 Equilibrium with O2(g)
Activity of water = 1.000
Ionic strength = 1.500e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 4.551e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.000e-03
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -33.33
Iterations = 3
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.046e-07 1.001e-07 -6.981 -7.000 -0.019
H+ 1.042e-07 1.000e-07 -6.982 -7.000 -0.018
H2O 5.551e+01 9.999e-01 1.744 -0.000 0.000
Cl 1.000e-03
Cl- 1.000e-03 9.576e-04 -3.000 -3.019 -0.019
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
N(5) 1.000e-03
NO3- 1.000e-03 9.573e-04 -3.000 -3.019 -0.019
Na 1.000e-03
Na+ 1.000e-03 9.580e-04 -3.000 -3.019 -0.019
NaOH 6.327e-11 6.329e-11 -10.199 -10.199 0.000
O(0) 4.374e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
Halite -7.62 -6.04 1.58 NaCl
O2(g) -0.70 -3.66 -2.96 O2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
SOLUTION 1-41 # Column with KNO3
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
K 1.0
N(5) 1.0
EXCHANGE 1-41
equilibrate 1
X 1.e-3
EXCHANGE_SPECIES # For linear exchange, make KX exch. coeff. equal to NaX
K+ + X- = KX
log_k 0.0
gamma 3.5 0.015
END
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1.
-----------------------------Solution composition------------------------------
Elements Molality Moles
K 1.000e-03 1.000e-03
N(5) 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000
pe = 13.605 Equilibrium with O2(g)
Activity of water = 1.000
Ionic strength = 1.000e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.351e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -3.351e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 3
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.038e-07 1.001e-07 -6.984 -7.000 -0.016
H+ 1.034e-07 1.000e-07 -6.985 -7.000 -0.015
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
K 1.000e-03
K+ 1.000e-03 9.649e-04 -3.000 -3.016 -0.016
KOH 3.345e-11 3.346e-11 -10.476 -10.476 0.000
N(5) 1.000e-03
NO3- 1.000e-03 9.647e-04 -3.000 -3.016 -0.016
O(0) 4.375e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
O2(g) -0.70 -3.66 -2.96 O2
-------------------------------------------------------
Beginning of initial exchange-composition calculations.
-------------------------------------------------------
Exchange 1.
X 1.000e-03 mol
Equiv- Equivalent Log
Species Moles alents Fraction Gamma
KX 1.000e-03 1.000e-03 1.000e+00 -0.016
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using solution 1.
Using exchange 1. Exchange assemblage after simulation 2.
-----------------------------Exchange composition------------------------------
X 1.000e-03 mol
Equiv- Equivalent Log
Species Moles alents Fraction Gamma
KX 1.000e-03 1.000e-03 1.000e+00 -0.016
NH4X 6.872e-63 6.872e-63 6.872e-60 -0.016
-----------------------------Solution composition------------------------------
Elements Molality Moles
K 1.000e-03 1.000e-03
N 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000 Charge balance
pe = 13.605 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 1.000e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.351e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -3.351e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 0
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.038e-07 1.001e-07 -6.984 -7.000 -0.016
H+ 1.034e-07 1.000e-07 -6.985 -7.000 -0.015
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
K 1.000e-03
K+ 1.000e-03 9.649e-04 -3.000 -3.016 -0.016
KOH 3.345e-11 3.346e-11 -10.476 -10.476 0.000
N(-3) 0.000e+00
NH4+ 0.000e+00 0.000e+00 -62.763 -62.779 -0.016
NH3 0.000e+00 0.000e+00 -65.023 -65.023 0.000
N(0) 1.994e-19
N2 9.971e-20 9.973e-20 -19.001 -19.001 0.000
N(3) 2.291e-16
NO2- 2.291e-16 2.210e-16 -15.640 -15.656 -0.016
N(5) 1.000e-03
NO3- 1.000e-03 9.647e-04 -3.000 -3.016 -0.016
O(0) 4.375e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
N2(g) -15.74 -19.00 -3.26 N2
NH3(g) -66.79 -65.02 1.77 NH3
O2(g) -0.70 -3.66 -2.96 O2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 3.
------------------------------------
MIX 1
1 .93038
22 .06962
MIX 2
2 .93038
23 .06962
MIX 3
3 .93038
24 .06962
MIX 4
4 .93038
25 .06962
MIX 5
5 .93038
26 .06962
MIX 6
6 .93038
27 .06962
MIX 7
7 .93038
28 .06962
MIX 8
8 .93038
29 .06962
MIX 9
9 .93038
30 .06962
MIX 10
10 .93038
31 .06962
MIX 11
11 .93038
32 .06962
MIX 12
12 .93038
33 .06962
MIX 13
13 .93038
34 .06962
MIX 14
14 .93038
35 .06962
MIX 15
15 .93038
36 .06962
MIX 16
16 .93038
37 .06962
MIX 17
17 .93038
38 .06962
MIX 18
18 .93038
39 .06962
MIX 19
19 .93038
40 .06962
MIX 20
20 .93038
41 .06962
MIX 22
1 .20886
22 .79114
MIX 23
2 .20886
23 .79114
MIX 24
3 .20886
24 .79114
MIX 25
4 .20886
25 .79114
MIX 26
5 .20886
26 .79114
MIX 27
6 .20886
27 .79114
MIX 28
7 .20886
28 .79114
MIX 29
8 .20886
29 .79114
MIX 30
9 .20886
30 .79114
MIX 31
10 .20886
31 .79114
MIX 32
11 .20886
32 .79114
MIX 33
12 .20886
33 .79114
MIX 34
13 .20886
34 .79114
MIX 35
14 .20886
35 .79114
MIX 36
15 .20886
36 .79114
MIX 37
16 .20886
37 .79114
MIX 38
17 .20886
38 .79114
MIX 39
18 .20886
39 .79114
MIX 40
19 .20886
40 .79114
MIX 41
20 .20886
41 .79114
TRANSPORT
cells 20
shifts 5
flow_direction forward
timest 3600
bcond flux flux
diffc 0.0
length 0.1
disp 0.015
stagnant 1
PRINT
WARNING: Cell-lengths were read for 1 cells. Last value is used till cell 20.
WARNING: Dispersivities were read for 1 cells. Last value is used till cell 20.
reset false
END
SOLUTION 0 # Original solution reenters
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
K 1.0
N(5) 1.0
TRANSPORT
shifts 10
punch_frequency 10
punch_cells 1-20
SELECTED_OUTPUT
file ex13b.sel
reset false
distance true
solution
USER_PUNCH
heading Cl_mmol Na_mmol
10 PUNCH TOT("Cl")*1000, TOT("Na")*1000
END
No memory leaks

42
Sun/examples/ex13b.sel Normal file
View File

@ -0,0 +1,42 @@
soln dist_x Cl_mmol Na_mmol
0 -99 0.0000e+00 0.0000e+00
1 0.05 9.6495e-01 8.8504e-01
2 0.15 9.1812e-01 6.9360e-01
3 0.25 8.4451e-01 4.3288e-01
4 0.35 7.1652e-01 1.9734e-01
5 0.45 4.9952e-01 6.0705e-02
6 0.55 2.4048e-01 1.1785e-02
7 0.65 7.2813e-02 1.4039e-03
8 0.75 1.3132e-02 9.9324e-05
9 0.85 1.2882e-03 3.8318e-06
10 0.95 5.2941e-05 6.2140e-08
11 1.05 0.0000e+00 0.0000e+00
12 1.15 0.0000e+00 0.0000e+00
13 1.25 0.0000e+00 0.0000e+00
14 1.35 0.0000e+00 0.0000e+00
15 1.45 0.0000e+00 0.0000e+00
16 1.55 0.0000e+00 0.0000e+00
17 1.65 0.0000e+00 0.0000e+00
18 1.75 0.0000e+00 0.0000e+00
19 1.85 0.0000e+00 0.0000e+00
20 1.95 0.0000e+00 0.0000e+00
1 0.05 7.5889e-03 2.0249e-02
2 0.15 1.7993e-02 5.0943e-02
3 0.25 3.3135e-02 1.0209e-01
4 0.35 5.3590e-02 1.7480e-01
5 0.45 8.0158e-02 2.5484e-01
6 0.55 1.1395e-01 3.1308e-01
7 0.65 1.5766e-01 3.2277e-01
8 0.75 2.1666e-01 2.7969e-01
9 0.85 2.9573e-01 2.0468e-01
10 0.95 3.8768e-01 1.2727e-01
11 1.05 4.6467e-01 6.7581e-02
12 1.15 4.9243e-01 3.0745e-02
13 1.25 4.5811e-01 1.1988e-02
14 1.35 3.7620e-01 3.9981e-03
15 1.45 2.7323e-01 1.1366e-03
16 1.55 1.7416e-01 2.7440e-04
17 1.65 9.6075e-02 5.6039e-05
18 1.75 4.5211e-02 9.6477e-06
19 1.85 1.7934e-02 1.3954e-06
20 1.95 6.4870e-03 1.7678e-07

0
Sun/examples/ex13c.log Normal file
View File

751
Sun/examples/ex13c.out Normal file
View File

@ -0,0 +1,751 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex13c
Output file: ex13c.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 13C.--1 mmol/l NaCl/NO3 enters column with stagnant zones.
5 layer stagnant zone with finite differences.
SOLUTION 0 # 1 mmol/l NaCl
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
Na 1.0 # Na has Retardation = 2
Cl 1.0 # Cl has Retardation = 1, stagnant exchange
N(5) 1.0 # NO3 is conservative
END
-----
TITLE
-----
Example 13C.--1 mmol/l NaCl/NO3 enters column with stagnant zones.
5 layer stagnant zone with finite differences.
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 0.
-----------------------------Solution composition------------------------------
Elements Molality Moles
Cl 1.000e-03 1.000e-03
N(5) 1.000e-03 1.000e-03
Na 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000
pe = 13.605 Equilibrium with O2(g)
Activity of water = 1.000
Ionic strength = 1.500e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 4.551e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.000e-03
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -33.33
Iterations = 3
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.046e-07 1.001e-07 -6.981 -7.000 -0.019
H+ 1.042e-07 1.000e-07 -6.982 -7.000 -0.018
H2O 5.551e+01 9.999e-01 1.744 -0.000 0.000
Cl 1.000e-03
Cl- 1.000e-03 9.576e-04 -3.000 -3.019 -0.019
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
N(5) 1.000e-03
NO3- 1.000e-03 9.573e-04 -3.000 -3.019 -0.019
Na 1.000e-03
Na+ 1.000e-03 9.580e-04 -3.000 -3.019 -0.019
NaOH 6.327e-11 6.329e-11 -10.199 -10.199 0.000
O(0) 4.374e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
Halite -7.62 -6.04 1.58 NaCl
O2(g) -0.70 -3.66 -2.96 O2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
SOLUTION 1-121 # Column with KNO3
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
K 1.0
N(5) 1.0
EXCHANGE 1-121
equilibrate 1
X 1.e-3
EXCHANGE_SPECIES # For linear exchange, make KX exch. coeff. equal to NaX
K+ + X- = KX
log_k 0.0
gamma 3.5 0.015
END
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1.
-----------------------------Solution composition------------------------------
Elements Molality Moles
K 1.000e-03 1.000e-03
N(5) 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000
pe = 13.605 Equilibrium with O2(g)
Activity of water = 1.000
Ionic strength = 1.000e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.351e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -3.351e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 3
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.038e-07 1.001e-07 -6.984 -7.000 -0.016
H+ 1.034e-07 1.000e-07 -6.985 -7.000 -0.015
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
K 1.000e-03
K+ 1.000e-03 9.649e-04 -3.000 -3.016 -0.016
KOH 3.345e-11 3.346e-11 -10.476 -10.476 0.000
N(5) 1.000e-03
NO3- 1.000e-03 9.647e-04 -3.000 -3.016 -0.016
O(0) 4.375e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
O2(g) -0.70 -3.66 -2.96 O2
-------------------------------------------------------
Beginning of initial exchange-composition calculations.
-------------------------------------------------------
Exchange 1.
X 1.000e-03 mol
Equiv- Equivalent Log
Species Moles alents Fraction Gamma
KX 1.000e-03 1.000e-03 1.000e+00 -0.016
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using solution 1.
Using exchange 1. Exchange assemblage after simulation 2.
-----------------------------Exchange composition------------------------------
X 1.000e-03 mol
Equiv- Equivalent Log
Species Moles alents Fraction Gamma
KX 1.000e-03 1.000e-03 1.000e+00 -0.016
NH4X 6.872e-63 6.872e-63 6.872e-60 -0.016
-----------------------------Solution composition------------------------------
Elements Molality Moles
K 1.000e-03 1.000e-03
N 1.000e-03 1.000e-03
----------------------------Description of solution----------------------------
pH = 7.000 Charge balance
pe = 13.605 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 1.000e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.351e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -3.351e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 0
Total H = 1.110124e+02
Total O = 5.550965e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.038e-07 1.001e-07 -6.984 -7.000 -0.016
H+ 1.034e-07 1.000e-07 -6.985 -7.000 -0.015
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -44.360 -44.360 0.000
K 1.000e-03
K+ 1.000e-03 9.649e-04 -3.000 -3.016 -0.016
KOH 3.345e-11 3.346e-11 -10.476 -10.476 0.000
N(-3) 0.000e+00
NH4+ 0.000e+00 0.000e+00 -62.763 -62.779 -0.016
NH3 0.000e+00 0.000e+00 -65.023 -65.023 0.000
N(0) 1.994e-19
N2 9.971e-20 9.973e-20 -19.001 -19.001 0.000
N(3) 2.291e-16
NO2- 2.291e-16 2.210e-16 -15.640 -15.656 -0.016
N(5) 1.000e-03
NO3- 1.000e-03 9.647e-04 -3.000 -3.016 -0.016
O(0) 4.375e-04
O2 2.187e-04 2.188e-04 -3.660 -3.660 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -41.21 -44.36 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
N2(g) -15.74 -19.00 -3.26 N2
NH3(g) -66.79 -65.02 1.77 NH3
O2(g) -0.70 -3.66 -2.96 O2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 3.
------------------------------------
MIX 1
1 0.90712
22 0.09288
MIX 22
1 0.57098
22 0.21656
42 0.21246
MIX 42
22 0.35027
42 0.45270
62 0.19703
MIX 62
42 0.38368
62 0.44579
82 0.17053
MIX 82
62 0.46286
82 0.42143
102 0.11571
MIX 102
82 0.81000
102 0.19000
MIX 2
2 0.90712
23 0.09288
MIX 23
2 0.57098
23 0.21656
43 0.21246
MIX 43
23 0.35027
43 0.45270
63 0.19703
MIX 63
43 0.38368
63 0.44579
83 0.17053
MIX 83
63 0.46286
83 0.42143
103 0.11571
MIX 103
83 0.81000
103 0.19000
MIX 3
3 0.90712
24 0.09288
MIX 24
3 0.57098
24 0.21656
44 0.21246
MIX 44
24 0.35027
44 0.45270
64 0.19703
MIX 64
44 0.38368
64 0.44579
84 0.17053
MIX 84
64 0.46286
84 0.42143
104 0.11571
MIX 104
84 0.81000
104 0.19000
MIX 4
4 0.90712
25 0.09288
MIX 25
4 0.57098
25 0.21656
45 0.21246
MIX 45
25 0.35027
45 0.45270
65 0.19703
MIX 65
45 0.38368
65 0.44579
85 0.17053
MIX 85
65 0.46286
85 0.42143
105 0.11571
MIX 105
85 0.81000
105 0.19000
MIX 5
5 0.90712
26 0.09288
MIX 26
5 0.57098
26 0.21656
46 0.21246
MIX 46
26 0.35027
46 0.45270
66 0.19703
MIX 66
46 0.38368
66 0.44579
86 0.17053
MIX 86
66 0.46286
86 0.42143
106 0.11571
MIX 106
86 0.81000
106 0.19000
MIX 6
6 0.90712
27 0.09288
MIX 27
6 0.57098
27 0.21656
47 0.21246
MIX 47
27 0.35027
47 0.45270
67 0.19703
MIX 67
47 0.38368
67 0.44579
87 0.17053
MIX 87
67 0.46286
87 0.42143
107 0.11571
MIX 107
87 0.81000
107 0.19000
MIX 7
7 0.90712
28 0.09288
MIX 28
7 0.57098
28 0.21656
48 0.21246
MIX 48
28 0.35027
48 0.45270
68 0.19703
MIX 68
48 0.38368
68 0.44579
88 0.17053
MIX 88
68 0.46286
88 0.42143
108 0.11571
MIX 108
88 0.81000
108 0.19000
MIX 8
8 0.90712
29 0.09288
MIX 29
8 0.57098
29 0.21656
49 0.21246
MIX 49
29 0.35027
49 0.45270
69 0.19703
MIX 69
49 0.38368
69 0.44579
89 0.17053
MIX 89
69 0.46286
89 0.42143
109 0.11571
MIX 109
89 0.81000
109 0.19000
MIX 9
9 0.90712
30 0.09288
MIX 30
9 0.57098
30 0.21656
50 0.21246
MIX 50
30 0.35027
50 0.45270
70 0.19703
MIX 70
50 0.38368
70 0.44579
90 0.17053
MIX 90
70 0.46286
90 0.42143
110 0.11571
MIX 110
90 0.81000
110 0.19000
MIX 10
10 0.90712
31 0.09288
MIX 31
10 0.57098
31 0.21656
51 0.21246
MIX 51
31 0.35027
51 0.45270
71 0.19703
MIX 71
51 0.38368
71 0.44579
91 0.17053
MIX 91
71 0.46286
91 0.42143
111 0.11571
MIX 111
91 0.81000
111 0.19000
MIX 11
11 0.90712
32 0.09288
MIX 32
11 0.57098
32 0.21656
52 0.21246
MIX 52
32 0.35027
52 0.45270
72 0.19703
MIX 72
52 0.38368
72 0.44579
92 0.17053
MIX 92
72 0.46286
92 0.42143
112 0.11571
MIX 112
92 0.81000
112 0.19000
MIX 12
12 0.90712
33 0.09288
MIX 33
12 0.57098
33 0.21656
53 0.21246
MIX 53
33 0.35027
53 0.45270
73 0.19703
MIX 73
53 0.38368
73 0.44579
93 0.17053
MIX 93
73 0.46286
93 0.42143
113 0.11571
MIX 113
93 0.81000
113 0.19000
MIX 13
13 0.90712
34 0.09288
MIX 34
13 0.57098
34 0.21656
54 0.21246
MIX 54
34 0.35027
54 0.45270
74 0.19703
MIX 74
54 0.38368
74 0.44579
94 0.17053
MIX 94
74 0.46286
94 0.42143
114 0.11571
MIX 114
94 0.81000
114 0.19000
MIX 14
14 0.90712
35 0.09288
MIX 35
14 0.57098
35 0.21656
55 0.21246
MIX 55
35 0.35027
55 0.45270
75 0.19703
MIX 75
55 0.38368
75 0.44579
95 0.17053
MIX 95
75 0.46286
95 0.42143
115 0.11571
MIX 115
95 0.81000
115 0.19000
MIX 15
15 0.90712
36 0.09288
MIX 36
15 0.57098
36 0.21656
56 0.21246
MIX 56
36 0.35027
56 0.45270
76 0.19703
MIX 76
56 0.38368
76 0.44579
96 0.17053
MIX 96
76 0.46286
96 0.42143
116 0.11571
MIX 116
96 0.81000
116 0.19000
MIX 16
16 0.90712
37 0.09288
MIX 37
16 0.57098
37 0.21656
57 0.21246
MIX 57
37 0.35027
57 0.45270
77 0.19703
MIX 77
57 0.38368
77 0.44579
97 0.17053
MIX 97
77 0.46286
97 0.42143
117 0.11571
MIX 117
97 0.81000
117 0.19000
MIX 17
17 0.90712
38 0.09288
MIX 38
17 0.57098
38 0.21656
58 0.21246
MIX 58
38 0.35027
58 0.45270
78 0.19703
MIX 78
58 0.38368
78 0.44579
98 0.17053
MIX 98
78 0.46286
98 0.42143
118 0.11571
MIX 118
98 0.81000
118 0.19000
MIX 18
18 0.90712
39 0.09288
MIX 39
18 0.57098
39 0.21656
59 0.21246
MIX 59
39 0.35027
59 0.45270
79 0.19703
MIX 79
59 0.38368
79 0.44579
99 0.17053
MIX 99
79 0.46286
99 0.42143
119 0.11571
MIX 119
99 0.81000
119 0.19000
MIX 19
19 0.90712
40 0.09288
MIX 40
19 0.57098
40 0.21656
60 0.21246
MIX 60
40 0.35027
60 0.45270
80 0.19703
MIX 80
60 0.38368
80 0.44579
100 0.17053
MIX 100
80 0.46286
100 0.42143
120 0.11571
MIX 120
100 0.81000
120 0.19000
MIX 20
20 0.90712
41 0.09288
MIX 41
20 0.57098
41 0.21656
61 0.21246
MIX 61
41 0.35027
61 0.45270
81 0.19703
MIX 81
61 0.38368
81 0.44579
101 0.17053
MIX 101
81 0.46286
101 0.42143
121 0.11571
MIX 121
101 0.81000
121 0.19000
TRANSPORT
cells 20
shifts 5
flow_direction forward
timest 3600
tempr 3.0
bcond flux flux
diffc 0.0
length 0.10
disp 0.015
stagnant 5
PRINT
WARNING: Cell-lengths were read for 1 cells. Last value is used till cell 20.
WARNING: Dispersivities were read for 1 cells. Last value is used till cell 20.
reset false
END
SOLUTION 0 # Original solution reenters
units mmol/l
pH 7.0
pe 13.0 O2(g) -0.7
K 1.0
N(5) 1.0
TRANSPORT
shifts 10
punch_frequency 10
punch_cells 1-20
SELECTED_OUTPUT
file ex13c.sel
reset false
solution
distance true
USER_PUNCH
heading Cl_mmol Na_mmol
10 PUNCH TOT("Cl")*1000, TOT("Na")*1000
END
No memory leaks

42
Sun/examples/ex13c.sel Normal file
View File

@ -0,0 +1,42 @@
soln dist_x Cl_mmol Na_mmol
0 -99 0.0000e+00 0.0000e+00
1 0.05 9.7683e-01 8.8829e-01
2 0.15 9.4255e-01 6.9066e-01
3 0.25 8.7253e-01 4.2503e-01
4 0.35 7.2600e-01 1.9091e-01
5 0.45 4.8246e-01 5.8021e-02
6 0.55 2.2239e-01 1.1177e-02
7 0.65 6.5489e-02 1.3256e-03
8 0.75 1.1639e-02 9.3569e-05
9 0.85 1.1350e-03 3.6065e-06
10 0.95 4.6646e-05 5.8485e-08
11 1.05 0.0000e+00 0.0000e+00
12 1.15 0.0000e+00 0.0000e+00
13 1.25 0.0000e+00 0.0000e+00
14 1.35 0.0000e+00 0.0000e+00
15 1.45 0.0000e+00 0.0000e+00
16 1.55 0.0000e+00 0.0000e+00
17 1.65 0.0000e+00 0.0000e+00
18 1.75 0.0000e+00 0.0000e+00
19 1.85 0.0000e+00 0.0000e+00
20 1.95 0.0000e+00 0.0000e+00
1 0.05 4.7101e-03 1.6916e-02
2 0.15 1.0234e-02 4.9729e-02
3 0.25 1.8109e-02 1.0883e-01
4 0.35 2.9565e-02 1.9194e-01
5 0.45 4.7408e-02 2.7841e-01
6 0.55 7.7191e-02 3.3492e-01
7 0.65 1.2832e-01 3.3632e-01
8 0.75 2.1109e-01 2.8375e-01
9 0.85 3.2572e-01 2.0251e-01
10 0.95 4.4908e-01 1.2304e-01
11 1.05 5.3819e-01 6.3977e-02
12 1.15 5.5716e-01 2.8554e-02
13 1.25 5.0158e-01 1.0943e-02
14 1.35 3.9581e-01 3.5935e-03
15 1.45 2.7424e-01 1.0078e-03
16 1.55 1.6586e-01 2.4047e-04
17 1.65 8.6688e-02 4.8621e-05
18 1.75 3.8743e-02 8.3007e-06
19 1.85 1.4669e-02 1.1922e-06
20 1.95 5.0940e-03 1.5016e-07

0
Sun/examples/ex14.log Normal file
View File

3000
Sun/examples/ex14.out Normal file

File diff suppressed because it is too large Load Diff

202
Sun/examples/ex14.sel Normal file
View File

@ -0,0 +1,202 @@
step m_Ca m_Mg m_Na umol_As pH
1 4.6428e-01 1.6167e-01 5.4020e+00 5.0000e-02 5.3496e+00
1 5.2071e-04 3.6797e-04 1.0345e-01 2.9703e-04 7.0358e+00
2 4.3418e-05 3.0073e-05 2.7681e-02 1.4274e-02 8.4251e+00
3 1.6723e-05 1.0553e-05 1.5102e-02 1.7369e-01 9.0861e+00
4 1.3810e-05 8.4300e-06 1.2580e-02 3.4749e-01 9.2687e+00
5 1.3241e-05 8.0170e-06 1.1705e-02 4.2057e-01 9.3189e+00
6 1.3253e-05 8.0279e-06 1.1293e-02 4.3148e-01 9.3249e+00
7 1.3481e-05 8.1962e-06 1.1055e-02 4.1548e-01 9.3142e+00
8 1.3805e-05 8.4346e-06 1.0889e-02 3.9004e-01 9.2967e+00
9 1.4178e-05 8.7091e-06 1.0758e-02 3.6247e-01 9.2767e+00
10 1.4581e-05 9.0053e-06 1.0645e-02 3.3557e-01 9.2558e+00
11 1.5006e-05 9.3176e-06 1.0542e-02 3.1029e-01 9.2348e+00
12 1.5449e-05 9.6438e-06 1.0447e-02 2.8686e-01 9.2138e+00
13 1.5911e-05 9.9834e-06 1.0358e-02 2.6525e-01 9.1929e+00
14 1.6392e-05 1.0337e-05 1.0274e-02 2.4534e-01 9.1722e+00
15 1.6892e-05 1.0704e-05 1.0195e-02 2.2698e-01 9.1517e+00
16 1.7412e-05 1.1087e-05 1.0119e-02 2.1004e-01 9.1314e+00
17 1.7954e-05 1.1485e-05 1.0047e-02 1.9440e-01 9.1111e+00
18 1.8519e-05 1.1901e-05 9.9787e-03 1.7994e-01 9.0910e+00
19 1.9109e-05 1.2335e-05 9.9131e-03 1.6656e-01 9.0710e+00
20 1.9725e-05 1.2787e-05 9.8504e-03 1.5418e-01 9.0510e+00
21 2.0368e-05 1.3260e-05 9.7904e-03 1.4270e-01 9.0311e+00
22 2.1041e-05 1.3755e-05 9.7328e-03 1.3206e-01 9.0112e+00
23 2.1745e-05 1.4273e-05 9.6775e-03 1.2220e-01 8.9913e+00
24 2.2482e-05 1.4815e-05 9.6243e-03 1.1304e-01 8.9714e+00
25 2.3254e-05 1.5383e-05 9.5731e-03 1.0454e-01 8.9515e+00
26 2.4064e-05 1.5978e-05 9.5238e-03 9.6657e-02 8.9316e+00
27 2.4914e-05 1.6603e-05 9.4761e-03 8.9334e-02 8.9116e+00
28 2.5807e-05 1.7260e-05 9.4301e-03 8.2534e-02 8.8916e+00
29 2.6745e-05 1.7950e-05 9.3855e-03 7.6219e-02 8.8715e+00
30 2.7732e-05 1.8675e-05 9.3423e-03 7.0356e-02 8.8514e+00
31 2.8770e-05 1.9439e-05 9.3004e-03 6.4912e-02 8.8312e+00
32 2.9863e-05 2.0243e-05 9.2597e-03 5.9857e-02 8.8109e+00
33 3.1015e-05 2.1090e-05 9.2200e-03 5.5166e-02 8.7905e+00
34 3.2230e-05 2.1983e-05 9.1814e-03 5.0812e-02 8.7699e+00
35 3.3513e-05 2.2926e-05 9.1436e-03 4.6773e-02 8.7493e+00
36 3.4867e-05 2.3922e-05 9.1067e-03 4.3028e-02 8.7285e+00
37 3.6299e-05 2.4975e-05 9.0705e-03 3.9555e-02 8.7076e+00
38 3.7813e-05 2.6089e-05 9.0350e-03 3.6337e-02 8.6865e+00
39 3.9416e-05 2.7267e-05 9.0000e-03 3.3356e-02 8.6653e+00
40 4.1113e-05 2.8516e-05 8.9656e-03 3.0597e-02 8.6439e+00
41 4.2913e-05 2.9840e-05 8.9315e-03 2.8043e-02 8.6224e+00
42 4.4823e-05 3.1244e-05 8.8978e-03 2.5682e-02 8.6006e+00
43 4.6851e-05 3.2736e-05 8.8643e-03 2.3500e-02 8.5787e+00
44 4.9006e-05 3.4321e-05 8.8310e-03 2.1485e-02 8.5565e+00
45 5.1298e-05 3.6006e-05 8.7977e-03 1.9626e-02 8.5342e+00
46 5.3738e-05 3.7800e-05 8.7644e-03 1.7911e-02 8.5116e+00
47 5.6337e-05 3.9712e-05 8.7309e-03 1.6331e-02 8.4889e+00
48 5.9107e-05 4.1749e-05 8.6973e-03 1.4877e-02 8.4658e+00
49 6.2064e-05 4.3924e-05 8.6633e-03 1.3539e-02 8.4426e+00
50 6.5221e-05 4.6246e-05 8.6288e-03 1.2309e-02 8.4191e+00
51 6.8596e-05 4.8728e-05 8.5938e-03 1.1181e-02 8.3954e+00
52 7.2206e-05 5.1383e-05 8.5581e-03 1.0146e-02 8.3714e+00
53 7.6071e-05 5.4225e-05 8.5216e-03 9.1972e-03 8.3471e+00
54 8.0212e-05 5.7271e-05 8.4840e-03 8.3294e-03 8.3226e+00
55 8.4653e-05 6.0537e-05 8.4454e-03 7.5361e-03 8.2978e+00
56 8.9419e-05 6.4042e-05 8.4055e-03 6.8118e-03 8.2727e+00
57 9.4538e-05 6.7807e-05 8.3641e-03 6.1514e-03 8.2473e+00
58 1.0004e-04 7.1853e-05 8.3211e-03 5.5498e-03 8.2217e+00
59 1.0596e-04 7.6206e-05 8.2762e-03 5.0027e-03 8.1958e+00
60 1.1233e-04 8.0892e-05 8.2293e-03 4.5057e-03 8.1696e+00
61 1.1919e-04 8.5939e-05 8.1800e-03 4.0548e-03 8.1431e+00
62 1.2659e-04 9.1378e-05 8.1283e-03 3.6464e-03 8.1164e+00
63 1.3456e-04 9.7244e-05 8.0737e-03 3.2769e-03 8.0893e+00
64 1.4317e-04 1.0357e-04 8.0161e-03 2.9432e-03 8.0621e+00
65 1.5246e-04 1.1040e-04 7.9550e-03 2.6421e-03 8.0345e+00
66 1.6249e-04 1.1778e-04 7.8904e-03 2.3710e-03 8.0067e+00
67 1.7301e-04 1.2608e-04 7.8205e-03 2.1257e-03 7.9786e+00
68 1.8432e-04 1.3516e-04 7.7465e-03 1.9049e-03 7.9501e+00
69 1.9654e-04 1.4497e-04 7.6681e-03 1.7071e-03 7.9214e+00
70 2.0974e-04 1.5559e-04 7.5847e-03 1.5302e-03 7.8925e+00
71 2.2397e-04 1.6707e-04 7.4960e-03 1.3724e-03 7.8636e+00
72 2.3933e-04 1.7947e-04 7.4015e-03 1.2317e-03 7.8345e+00
73 2.5587e-04 1.9285e-04 7.3009e-03 1.1064e-03 7.8054e+00
74 2.7370e-04 2.0729e-04 7.1938e-03 9.9507e-04 7.7763e+00
75 2.9288e-04 2.2286e-04 7.0799e-03 8.9618e-04 7.7472e+00
76 3.1349e-04 2.3961e-04 6.9590e-03 8.0843e-04 7.7182e+00
77 3.3561e-04 2.5763e-04 6.8306e-03 7.3066e-04 7.6893e+00
78 3.5933e-04 2.7696e-04 6.6948e-03 6.6179e-04 7.6606e+00
79 3.8469e-04 2.9767e-04 6.5512e-03 6.0086e-04 7.6321e+00
80 4.1177e-04 3.1980e-04 6.3998e-03 5.4698e-04 7.6039e+00
81 4.4060e-04 3.4340e-04 6.2406e-03 4.9938e-04 7.5760e+00
82 4.7122e-04 3.6849e-04 6.0737e-03 4.5735e-04 7.5485e+00
83 5.0365e-04 3.9509e-04 5.8993e-03 4.2027e-04 7.5215e+00
84 5.3788e-04 4.2320e-04 5.7176e-03 3.8756e-04 7.4950e+00
85 5.7386e-04 4.5277e-04 5.5290e-03 3.5874e-04 7.4691e+00
86 6.1156e-04 4.8377e-04 5.3342e-03 3.3335e-04 7.4438e+00
87 6.5087e-04 5.1613e-04 5.1337e-03 3.1101e-04 7.4193e+00
88 6.9168e-04 5.4973e-04 4.9284e-03 2.9135e-04 7.3955e+00
89 7.3384e-04 5.8447e-04 4.7190e-03 2.7407e-04 7.3726e+00
90 7.7716e-04 6.2017e-04 4.5066e-03 2.5890e-04 7.3505e+00
91 8.2146e-04 6.5669e-04 4.2923e-03 2.4559e-04 7.3293e+00
92 8.6649e-04 6.9381e-04 4.0771e-03 2.3392e-04 7.3090e+00
93 9.1201e-04 7.3133e-04 3.8623e-03 2.2372e-04 7.2897e+00
94 9.5775e-04 7.6903e-04 3.6490e-03 2.1480e-04 7.2714e+00
95 1.0035e-03 8.0669e-04 3.4384e-03 2.0702e-04 7.2541e+00
96 1.0489e-03 8.4407e-04 3.2315e-03 2.0024e-04 7.2377e+00
97 1.0937e-03 8.8096e-04 3.0295e-03 1.9436e-04 7.2223e+00
98 1.1377e-03 9.1715e-04 2.8333e-03 1.8926e-04 7.2079e+00
99 1.1807e-03 9.5246e-04 2.6436e-03 1.8485e-04 7.1945e+00
100 1.2224e-03 9.8670e-04 2.4613e-03 1.8105e-04 7.1819e+00
101 1.2628e-03 1.0197e-03 2.2869e-03 1.7780e-04 7.1703e+00
102 1.3015e-03 1.0514e-03 2.1208e-03 1.7501e-04 7.1595e+00
103 1.3386e-03 1.0817e-03 1.9634e-03 1.7264e-04 7.1495e+00
104 1.3740e-03 1.1105e-03 1.8148e-03 1.7063e-04 7.1403e+00
105 1.4074e-03 1.1377e-03 1.6752e-03 1.6893e-04 7.1318e+00
106 1.4391e-03 1.1633e-03 1.5444e-03 1.6752e-04 7.1239e+00
107 1.4689e-03 1.1874e-03 1.4225e-03 1.6634e-04 7.1168e+00
108 1.4968e-03 1.2099e-03 1.3090e-03 1.6537e-04 7.1102e+00
109 1.5229e-03 1.2309e-03 1.2038e-03 1.6458e-04 7.1042e+00
110 1.5472e-03 1.2503e-03 1.1066e-03 1.6394e-04 7.0987e+00
111 1.5699e-03 1.2683e-03 1.0170e-03 1.6344e-04 7.0937e+00
112 1.5909e-03 1.2849e-03 9.3458e-04 1.6305e-04 7.0891e+00
113 1.6103e-03 1.3002e-03 8.5895e-04 1.6275e-04 7.0850e+00
114 1.6282e-03 1.3143e-03 7.8970e-04 1.6254e-04 7.0812e+00
115 1.6448e-03 1.3271e-03 7.2642e-04 1.6239e-04 7.0777e+00
116 1.6600e-03 1.3389e-03 6.6867e-04 1.6229e-04 7.0746e+00
117 1.6740e-03 1.3496e-03 6.1608e-04 1.6225e-04 7.0718e+00
118 1.6868e-03 1.3594e-03 5.6824e-04 1.6224e-04 7.0692e+00
119 1.6986e-03 1.3682e-03 5.2478e-04 1.6226e-04 7.0669e+00
120 1.7093e-03 1.3763e-03 4.8535e-04 1.6230e-04 7.0648e+00
121 1.7192e-03 1.3836e-03 4.4962e-04 1.6236e-04 7.0629e+00
122 1.7282e-03 1.3901e-03 4.1726e-04 1.6244e-04 7.0612e+00
123 1.7365e-03 1.3960e-03 3.8800e-04 1.6252e-04 7.0596e+00
124 1.7441e-03 1.4014e-03 3.6155e-04 1.6262e-04 7.0582e+00
125 1.7509e-03 1.4062e-03 3.3765e-04 1.6272e-04 7.0569e+00
126 1.7572e-03 1.4105e-03 3.1609e-04 1.6282e-04 7.0558e+00
127 1.7630e-03 1.4143e-03 2.9664e-04 1.6292e-04 7.0547e+00
128 1.7683e-03 1.4178e-03 2.7910e-04 1.6302e-04 7.0538e+00
129 1.7731e-03 1.4208e-03 2.6330e-04 1.6312e-04 7.0529e+00
130 1.7774e-03 1.4236e-03 2.4907e-04 1.6321e-04 7.0522e+00
131 1.7815e-03 1.4260e-03 2.3626e-04 1.6331e-04 7.0515e+00
132 1.7851e-03 1.4281e-03 2.2472e-04 1.6339e-04 7.0509e+00
133 1.7885e-03 1.4300e-03 2.1435e-04 1.6348e-04 7.0503e+00
134 1.7916e-03 1.4317e-03 2.0502e-04 1.6356e-04 7.0498e+00
135 1.7944e-03 1.4331e-03 1.9662e-04 1.6364e-04 7.0494e+00
136 1.7970e-03 1.4344e-03 1.8908e-04 1.6371e-04 7.0490e+00
137 1.7994e-03 1.4355e-03 1.8230e-04 1.6377e-04 7.0486e+00
138 1.8016e-03 1.4364e-03 1.7621e-04 1.6384e-04 7.0483e+00
139 1.8036e-03 1.4372e-03 1.7073e-04 1.6390e-04 7.0480e+00
140 1.8055e-03 1.4379e-03 1.6582e-04 1.6395e-04 7.0477e+00
141 1.8072e-03 1.4385e-03 1.6140e-04 1.6400e-04 7.0475e+00
142 1.8088e-03 1.4390e-03 1.5743e-04 1.6405e-04 7.0473e+00
143 1.8103e-03 1.4394e-03 1.5387e-04 1.6409e-04 7.0471e+00
144 1.8117e-03 1.4397e-03 1.5068e-04 1.6413e-04 7.0469e+00
145 1.8130e-03 1.4399e-03 1.4780e-04 1.6417e-04 7.0467e+00
146 1.8142e-03 1.4401e-03 1.4523e-04 1.6421e-04 7.0466e+00
147 1.8153e-03 1.4402e-03 1.4291e-04 1.6424e-04 7.0465e+00
148 1.8164e-03 1.4402e-03 1.4084e-04 1.6427e-04 7.0464e+00
149 1.8174e-03 1.4402e-03 1.3897e-04 1.6429e-04 7.0463e+00
150 1.8183e-03 1.4402e-03 1.3730e-04 1.6432e-04 7.0462e+00
151 1.8192e-03 1.4401e-03 1.3580e-04 1.6434e-04 7.0461e+00
152 1.8200e-03 1.4400e-03 1.3445e-04 1.6436e-04 7.0461e+00
153 1.8208e-03 1.4399e-03 1.3325e-04 1.6438e-04 7.0460e+00
154 1.8216e-03 1.4397e-03 1.3216e-04 1.6440e-04 7.0459e+00
155 1.8223e-03 1.4396e-03 1.3119e-04 1.6441e-04 7.0459e+00
156 1.8230e-03 1.4394e-03 1.3032e-04 1.6443e-04 7.0459e+00
157 1.8236e-03 1.4391e-03 1.2953e-04 1.6444e-04 7.0458e+00
158 1.8243e-03 1.4389e-03 1.2883e-04 1.6446e-04 7.0458e+00
159 1.8249e-03 1.4386e-03 1.2820e-04 1.6447e-04 7.0458e+00
160 1.8255e-03 1.4384e-03 1.2763e-04 1.6448e-04 7.0457e+00
161 1.8260e-03 1.4381e-03 1.2713e-04 1.6449e-04 7.0457e+00
162 1.8266e-03 1.4378e-03 1.2667e-04 1.6450e-04 7.0457e+00
163 1.8271e-03 1.4375e-03 1.2626e-04 1.6451e-04 7.0457e+00
164 1.8276e-03 1.4372e-03 1.2590e-04 1.6451e-04 7.0457e+00
165 1.8281e-03 1.4369e-03 1.2557e-04 1.6452e-04 7.0457e+00
166 1.8286e-03 1.4366e-03 1.2527e-04 1.6453e-04 7.0457e+00
167 1.8291e-03 1.4363e-03 1.2501e-04 1.6453e-04 7.0456e+00
168 1.8296e-03 1.4360e-03 1.2477e-04 1.6454e-04 7.0456e+00
169 1.8300e-03 1.4356e-03 1.2456e-04 1.6454e-04 7.0456e+00
170 1.8305e-03 1.4353e-03 1.2437e-04 1.6455e-04 7.0456e+00
171 1.8309e-03 1.4350e-03 1.2420e-04 1.6455e-04 7.0456e+00
172 1.8313e-03 1.4347e-03 1.2404e-04 1.6456e-04 7.0456e+00
173 1.8318e-03 1.4343e-03 1.2390e-04 1.6456e-04 7.0456e+00
174 1.8322e-03 1.4340e-03 1.2378e-04 1.6456e-04 7.0456e+00
175 1.8326e-03 1.4337e-03 1.2367e-04 1.6457e-04 7.0456e+00
176 1.8330e-03 1.4333e-03 1.2357e-04 1.6457e-04 7.0456e+00
177 1.8334e-03 1.4330e-03 1.2348e-04 1.6457e-04 7.0456e+00
178 1.8338e-03 1.4327e-03 1.2340e-04 1.6458e-04 7.0456e+00
179 1.8342e-03 1.4323e-03 1.2333e-04 1.6458e-04 7.0457e+00
180 1.8346e-03 1.4320e-03 1.2326e-04 1.6458e-04 7.0457e+00
181 1.8349e-03 1.4317e-03 1.2321e-04 1.6458e-04 7.0457e+00
182 1.8353e-03 1.4313e-03 1.2315e-04 1.6459e-04 7.0457e+00
183 1.8357e-03 1.4310e-03 1.2311e-04 1.6459e-04 7.0457e+00
184 1.8360e-03 1.4307e-03 1.2306e-04 1.6459e-04 7.0457e+00
185 1.8364e-03 1.4304e-03 1.2303e-04 1.6459e-04 7.0457e+00
186 1.8368e-03 1.4300e-03 1.2299e-04 1.6460e-04 7.0457e+00
187 1.8371e-03 1.4297e-03 1.2296e-04 1.6460e-04 7.0457e+00
188 1.8375e-03 1.4294e-03 1.2294e-04 1.6460e-04 7.0457e+00
189 1.8378e-03 1.4291e-03 1.2291e-04 1.6460e-04 7.0457e+00
190 1.8382e-03 1.4287e-03 1.2289e-04 1.6460e-04 7.0457e+00
191 1.8385e-03 1.4284e-03 1.2287e-04 1.6460e-04 7.0457e+00
192 1.8388e-03 1.4281e-03 1.2285e-04 1.6461e-04 7.0457e+00
193 1.8392e-03 1.4278e-03 1.2284e-04 1.6461e-04 7.0457e+00
194 1.8395e-03 1.4275e-03 1.2282e-04 1.6461e-04 7.0457e+00
195 1.8398e-03 1.4272e-03 1.2281e-04 1.6461e-04 7.0457e+00
196 1.8402e-03 1.4269e-03 1.2280e-04 1.6461e-04 7.0458e+00
197 1.8405e-03 1.4266e-03 1.2279e-04 1.6461e-04 7.0458e+00
198 1.8408e-03 1.4263e-03 1.2278e-04 1.6462e-04 7.0458e+00
199 1.8411e-03 1.4260e-03 1.2277e-04 1.6462e-04 7.0458e+00
200 1.8415e-03 1.4257e-03 1.2276e-04 1.6462e-04 7.0458e+00

0
Sun/examples/ex15.log Normal file
View File

2299
Sun/examples/ex15.out Normal file

File diff suppressed because it is too large Load Diff

78
Sun/examples/ex15.sel Normal file
View File

@ -0,0 +1,78 @@
sim state soln dist_x time step pH pe m_Nta-3 m_CoNta- m_HNta-2 m_Co+2 hours Co_sorb CoNta_sorb Biomass
1 transp 10 9.5 0 0 6 14.3937 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 5.0000e-01 0.0000e+00 0.0000e+00 0.0000e+00
1 transp 10 9.5 3600 1 6 14.3937 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.5000e+00 0.0000e+00 0.0000e+00 1.3572e-04
1 transp 10 9.5 7200 2 6 14.3937 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 2.5000e+00 0.0000e+00 0.0000e+00 1.3544e-04
1 transp 10 9.5 10800 3 6 14.3937 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 3.5000e+00 0.0000e+00 0.0000e+00 1.3515e-04
1 transp 10 9.5 14400 4 6 14.3937 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 4.5000e+00 0.0000e+00 0.0000e+00 1.3487e-04
1 transp 10 9.5 18000 5 6 14.3937 4.1637e-17 4.8355e-19 8.3076e-13 2.3172e-14 5.5000e+00 6.1781e-18 1.4377e-22 1.3459e-04
1 transp 10 9.5 21600 6 6.00019 14.3935 5.3587e-15 7.6672e-15 1.0687e-10 2.8548e-12 6.5000e+00 1.0994e-15 2.6066e-18 1.3431e-04
1 transp 10 9.5 25200 7 6.00441 14.3893 1.1039e-13 3.4338e-12 2.1803e-09 6.2065e-11 7.5000e+00 2.2731e-14 9.7754e-16 1.3406e-04
1 transp 10 9.5 28800 8 6.03587 14.3576 8.7248e-13 1.8088e-10 1.6028e-08 4.1366e-10 8.5000e+00 1.5703e-13 4.8045e-14 1.3399e-04
1 transp 10 9.5 32400 9 6.12883 14.264 3.7779e-12 1.9561e-09 5.6030e-08 1.0331e-09 9.5000e+00 4.8525e-13 5.5433e-13 1.3445e-04
1 transp 10 9.5 36000 10 6.2369 14.1549 9.6448e-12 8.0004e-09 1.1153e-07 1.6551e-09 1.0500e+01 9.8421e-13 2.4608e-12 1.3556e-04
1 transp 10 9.5 39600 11 6.30614 14.0851 1.5152e-11 2.0272e-08 1.4940e-07 2.6695e-09 1.1500e+01 1.7623e-12 6.7849e-12 1.3707e-04
1 transp 10 9.5 43200 12 6.35376 14.0371 1.9799e-11 4.1065e-08 1.7494e-07 4.1384e-09 1.2500e+01 2.9364e-12 1.4662e-11 1.3886e-04
1 transp 10 9.5 46800 13 6.3909 13.9998 2.3996e-11 7.2616e-08 1.9464e-07 6.0380e-09 1.3500e+01 4.6059e-12 2.7261e-11 1.4085e-04
1 transp 10 9.5 50400 14 6.4217 13.9688 2.7923e-11 1.1683e-07 2.1099e-07 8.3484e-09 1.4500e+01 6.8561e-12 4.5675e-11 1.4301e-04
1 transp 10 9.5 54000 15 6.44804 13.9423 3.1619e-11 1.7515e-07 2.2486e-07 1.1052e-08 1.5500e+01 9.7615e-12 7.0827e-11 1.4533e-04
1 transp 10 9.5 57600 16 6.47097 13.9193 3.5087e-11 2.4844e-07 2.3669e-07 1.4128e-08 1.6500e+01 1.3385e-11 1.0340e-10 1.4778e-04
1 transp 10 9.5 61200 17 6.49117 13.8989 3.8321e-11 3.3699e-07 2.4675e-07 1.7546e-08 1.7500e+01 1.7779e-11 1.4381e-10 1.5036e-04
1 transp 10 9.5 64800 18 6.50914 13.8808 4.1316e-11 4.4051e-07 2.5526e-07 2.1274e-08 1.8500e+01 2.2982e-11 1.9215e-10 1.5306e-04
1 transp 10 9.5 68400 19 6.52519 13.8647 4.4065e-11 5.5820e-07 2.6236e-07 2.5276e-08 1.9500e+01 2.9022e-11 2.4826e-10 1.5586e-04
1 transp 10 9.5 72000 20 6.53959 13.8502 4.6562e-11 6.8880e-07 2.6819e-07 2.9517e-08 2.0500e+01 3.5915e-11 3.1170e-10 1.5876e-04
2 transp 10 9.5 72000 0 6.53959 13.8502 4.6562e-11 6.8880e-07 2.6819e-07 2.9517e-08 2.0500e+01 0.0000e+00 0.0000e+00 0.0000e+00
2 transp 10 9.5 75600 1 6.55254 13.8371 4.8804e-11 8.3068e-07 2.7284e-07 3.3961e-08 2.1500e+01 4.3669e-11 3.8179e-10 1.6174e-04
2 transp 10 9.5 79200 2 6.56419 13.8254 5.0791e-11 9.8198e-07 2.7644e-07 3.8576e-08 2.2500e+01 5.2280e-11 4.5769e-10 1.6481e-04
2 transp 10 9.5 82800 3 6.57469 13.8148 5.2526e-11 1.1406e-06 2.7905e-07 4.3329e-08 2.3500e+01 6.1739e-11 5.3842e-10 1.6796e-04
2 transp 10 9.5 86400 4 6.58413 13.8053 5.4012e-11 1.3046e-06 2.8077e-07 4.8193e-08 2.4500e+01 7.2027e-11 6.2293e-10 1.7117e-04
2 transp 10 9.5 90000 5 6.59263 13.7967 5.5256e-11 1.4717e-06 2.8168e-07 5.3142e-08 2.5500e+01 8.3123e-11 7.1013e-10 1.7444e-04
2 transp 10 9.5 93600 6 6.60028 13.789 5.6269e-11 1.6400e-06 2.8183e-07 5.8153e-08 2.6500e+01 9.4998e-11 7.9893e-10 1.7778e-04
2 transp 10 9.5 97200 7 6.60754 13.7817 5.7056e-11 1.8075e-06 2.8103e-07 6.3208e-08 2.7500e+01 1.0762e-10 8.8826e-10 1.8116e-04
2 transp 10 9.5 100800 8 6.61795 13.7713 5.7637e-11 1.9718e-06 2.7717e-07 6.8258e-08 2.8500e+01 1.2096e-10 9.7697e-10 1.8457e-04
2 transp 10 9.5 104400 9 6.64212 13.7473 5.8212e-11 2.1299e-06 2.6478e-07 7.3002e-08 2.9500e+01 1.3490e-10 1.0636e-09 1.8791e-04
2 transp 10 9.5 108000 10 6.6795 13.7103 5.8949e-11 2.2783e-06 2.4602e-07 7.7114e-08 3.0500e+01 1.4924e-10 1.1465e-09 1.9109e-04
2 transp 10 9.5 111600 11 6.69156 13.6985 5.8746e-11 2.4117e-06 2.3846e-07 8.1911e-08 3.1500e+01 1.6415e-10 1.2236e-09 1.9424e-04
2 transp 10 9.5 115200 12 6.68638 13.7039 5.7684e-11 2.5260e-06 2.3696e-07 8.7374e-08 3.2500e+01 1.7978e-10 1.2925e-09 1.9741e-04
2 transp 10 9.5 118800 13 6.67462 13.7157 5.6097e-11 2.6183e-06 2.3676e-07 9.3127e-08 3.3500e+01 1.9616e-10 1.3514e-09 2.0062e-04
2 transp 10 9.5 122400 14 6.66009 13.7304 5.4144e-11 2.6860e-06 2.3630e-07 9.8982e-08 3.4500e+01 2.1330e-10 1.3987e-09 2.0387e-04
2 transp 10 9.5 126000 15 6.64373 13.7469 5.1900e-11 2.7276e-06 2.3520e-07 1.0486e-07 3.5500e+01 2.3114e-10 1.4332e-09 2.0716e-04
2 transp 10 9.5 129600 16 6.62579 13.7649 4.9419e-11 2.7424e-06 2.3341e-07 1.1072e-07 3.6500e+01 2.4964e-10 1.4540e-09 2.1047e-04
2 transp 10 9.5 133200 17 6.60638 13.7845 4.6754e-11 2.7304e-06 2.3091e-07 1.1652e-07 3.7500e+01 2.6875e-10 1.4608e-09 2.1379e-04
2 transp 10 9.5 136800 18 6.58562 13.8054 4.3956e-11 2.6927e-06 2.2772e-07 1.2223e-07 3.8500e+01 2.8841e-10 1.4537e-09 2.1712e-04
2 transp 10 9.5 140400 19 6.56361 13.8275 4.1075e-11 2.6309e-06 2.2386e-07 1.2780e-07 3.9500e+01 3.0854e-10 1.4333e-09 2.2044e-04
2 transp 10 9.5 144000 20 6.54047 13.8508 3.8158e-11 2.5474e-06 2.1934e-07 1.3320e-07 4.0500e+01 3.2906e-10 1.4004e-09 2.2375e-04
2 transp 10 9.5 147600 21 6.51631 13.8751 3.5247e-11 2.4449e-06 2.1419e-07 1.3841e-07 4.1500e+01 3.4990e-10 1.3562e-09 2.2702e-04
2 transp 10 9.5 151200 22 6.49127 13.9003 3.2379e-11 2.3266e-06 2.0845e-07 1.4337e-07 4.2500e+01 3.7097e-10 1.3021e-09 2.3026e-04
2 transp 10 9.5 154800 23 6.46547 13.9262 2.9588e-11 2.1956e-06 2.0213e-07 1.4806e-07 4.3500e+01 3.9217e-10 1.2398e-09 2.3344e-04
2 transp 10 9.5 158400 24 6.43907 13.9527 2.6899e-11 2.0552e-06 1.9529e-07 1.5245e-07 4.4500e+01 4.1340e-10 1.1710e-09 2.3656e-04
2 transp 10 9.5 162000 25 6.41223 13.9797 2.4336e-11 1.9087e-06 1.8794e-07 1.5649e-07 4.5500e+01 4.3456e-10 1.0972e-09 2.3959e-04
2 transp 10 9.5 165600 26 6.38512 14.0069 2.1913e-11 1.7589e-06 1.8013e-07 1.6016e-07 4.6500e+01 4.5554e-10 1.0202e-09 2.4253e-04
2 transp 10 9.5 169200 27 6.35794 14.0343 1.9643e-11 1.6088e-06 1.7189e-07 1.6342e-07 4.7500e+01 4.7623e-10 9.4150e-10 2.4537e-04
2 transp 10 9.5 172800 28 6.33089 14.0614 1.7532e-11 1.4607e-06 1.6329e-07 1.6624e-07 4.8500e+01 4.9652e-10 8.6254e-10 2.4809e-04
2 transp 10 9.5 176400 29 6.30416 14.0883 1.5584e-11 1.3168e-06 1.5436e-07 1.6859e-07 4.9500e+01 5.1630e-10 7.8460e-10 2.5068e-04
2 transp 10 9.5 180000 30 6.27797 14.1146 1.3798e-11 1.1788e-06 1.4516e-07 1.7047e-07 5.0500e+01 5.3545e-10 7.0877e-10 2.5312e-04
2 transp 10 9.5 183600 31 6.25252 14.1402 1.2170e-11 1.0482e-06 1.3576e-07 1.7185e-07 5.1500e+01 5.5388e-10 6.3597e-10 2.5541e-04
2 transp 10 9.5 187200 32 6.228 14.1648 1.0695e-11 9.2591e-07 1.2623e-07 1.7274e-07 5.2500e+01 5.7148e-10 5.6693e-10 2.5754e-04
2 transp 10 9.5 190800 33 6.20459 14.1883 9.3648e-12 8.1273e-07 1.1666e-07 1.7316e-07 5.3500e+01 5.8818e-10 5.0219e-10 2.5949e-04
2 transp 10 9.5 194400 34 6.18244 14.2105 8.1717e-12 7.0904e-07 1.0712e-07 1.7312e-07 5.4500e+01 6.0391e-10 4.4212e-10 2.6127e-04
2 transp 10 9.5 198000 35 6.16167 14.2314 7.1059e-12 6.1497e-07 9.7713e-08 1.7268e-07 5.5500e+01 6.1861e-10 3.8695e-10 2.6286e-04
2 transp 10 9.5 201600 36 6.14237 14.2508 6.1578e-12 5.3042e-07 8.8524e-08 1.7187e-07 5.6500e+01 6.3226e-10 3.3676e-10 2.6427e-04
2 transp 10 9.5 205200 37 6.12459 14.2686 5.3178e-12 4.5509e-07 7.9641e-08 1.7075e-07 5.7500e+01 6.4483e-10 2.9149e-10 2.6550e-04
2 transp 10 9.5 208800 38 6.10837 14.2849 4.5763e-12 3.8853e-07 7.1145e-08 1.6940e-07 5.8500e+01 6.5634e-10 2.5101e-10 2.6655e-04
2 transp 10 9.5 212400 39 6.09369 14.2996 3.9244e-12 3.3017e-07 6.3107e-08 1.6787e-07 5.9500e+01 6.6679e-10 2.1511e-10 2.6742e-04
2 transp 10 9.5 216000 40 6.08053 14.3129 3.3534e-12 2.7937e-07 5.5584e-08 1.6623e-07 6.0500e+01 6.7624e-10 1.8349e-10 2.6813e-04
2 transp 10 9.5 219600 41 6.06883 14.3246 2.8552e-12 2.3545e-07 4.8619e-08 1.6454e-07 6.1500e+01 6.8474e-10 1.5585e-10 2.6869e-04
2 transp 10 9.5 223200 42 6.05851 14.335 2.4224e-12 1.9772e-07 4.2241e-08 1.6286e-07 6.2500e+01 6.9233e-10 1.3184e-10 2.6910e-04
2 transp 10 9.5 226800 43 6.04948 14.3441 2.0479e-12 1.6548e-07 3.6461e-08 1.6123e-07 6.3500e+01 6.9911e-10 1.1112e-10 2.6938e-04
2 transp 10 9.5 230400 44 6.04163 14.3519 1.7253e-12 1.3809e-07 3.1277e-08 1.5969e-07 6.4500e+01 7.0513e-10 9.3326e-11 2.6955e-04
2 transp 10 9.5 234000 45 6.03487 14.3587 1.4485e-12 1.1491e-07 2.6672e-08 1.5827e-07 6.5500e+01 7.1047e-10 7.8132e-11 2.6960e-04
2 transp 10 9.5 237600 46 6.02908 14.3645 1.2122e-12 9.5378e-08 2.2620e-08 1.5699e-07 6.6500e+01 7.1521e-10 6.5220e-11 2.6957e-04
2 transp 10 9.5 241200 47 6.02415 14.3695 1.0113e-12 7.8988e-08 1.9086e-08 1.5585e-07 6.7500e+01 7.1941e-10 5.4292e-11 2.6945e-04
2 transp 10 9.5 244800 48 6.01999 14.3737 8.4110e-13 6.5277e-08 1.6027e-08 1.5485e-07 6.8500e+01 7.2315e-10 4.5082e-11 2.6926e-04
2 transp 10 9.5 248400 49 6.01648 14.3772 6.9760e-13 5.3842e-08 1.3400e-08 1.5400e-07 6.9500e+01 7.2648e-10 3.7348e-11 2.6901e-04
2 transp 10 9.5 252000 50 6.01355 14.3801 5.7705e-13 4.4330e-08 1.1160e-08 1.5328e-07 7.0500e+01 7.2947e-10 3.0873e-11 2.6870e-04
2 transp 10 9.5 255600 51 6.01111 14.3826 4.7615e-13 3.6437e-08 9.2604e-09 1.5268e-07 7.1500e+01 7.3215e-10 2.5469e-11 2.6836e-04
2 transp 10 9.5 259200 52 6.00908 14.3846 3.9198e-13 2.9901e-08 7.6592e-09 1.5220e-07 7.2500e+01 7.3458e-10 2.0972e-11 2.6798e-04
2 transp 10 9.5 262800 53 6.00741 14.3863 3.2200e-13 2.4501e-08 6.3161e-09 1.5182e-07 7.3500e+01 7.3678e-10 1.7238e-11 2.6756e-04
2 transp 10 9.5 266400 54 6.00603 14.3877 2.6398e-13 2.0046e-08 5.1944e-09 1.5152e-07 7.4500e+01 7.3880e-10 1.4145e-11 2.6713e-04
2 transp 10 9.5 270000 55 6.0049 14.3888 2.1600e-13 1.6379e-08 4.2615e-09 1.5130e-07 7.5500e+01 7.4066e-10 1.1589e-11 2.6667e-04

0
Sun/examples/ex16.log Normal file
View File

435
Sun/examples/ex16.out Normal file
View File

@ -0,0 +1,435 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex16
Output file: ex16.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 16.--Inverse modeling of Sierra springs
SOLUTION_SPREAD
units mmol/L
Number pH Si Ca Mg Na K Alkalinity S(6) Cl
1 6.2 0.273 0.078 0.029 0.134 0.028 0.328 0.01 0.014
2 6.8 0.41 0.26 0.071 0.259 0.04 0.895 0.025 0.03
INVERSE_MODELING 1
solutions 1 2
uncertainty 0.025
range
phases
Halite
Gypsum
Kaolinite precip
Ca-montmorillonite precip
CO2(g)
Calcite
Chalcedony precip
Biotite dissolve
Plagioclase dissolve
balances
Ca 0.05 0.025
PHASES
Biotite
KMg3AlSi3O10(OH)2 + 6H+ + 4H2O = K+ + 3Mg+2 + Al(OH)4- + 3H4SiO4
log_k 0.0 # No log_k, Inverse modeling only
Plagioclase
Na0.62Ca0.38Al1.38Si2.62O8 + 5.52 H+ + 2.48H2O = 0.62Na+ + 0.38Ca+2 + 1.38Al+3 + 2.62H4SiO4
log_k 0.0 # No log_k, inverse modeling only
END
-----
TITLE
-----
Example 16.--Inverse modeling of Sierra springs
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1.
-----------------------------Solution composition------------------------------
Elements Molality Moles
Alkalinity 3.280e-04 3.280e-04
Ca 7.800e-05 7.800e-05
Cl 1.400e-05 1.400e-05
K 2.800e-05 2.800e-05
Mg 2.900e-05 2.900e-05
Na 1.340e-04 1.340e-04
S(6) 1.000e-05 1.000e-05
Si 2.730e-04 2.730e-04
----------------------------Description of solution----------------------------
pH = 6.200
pe = 4.000
Activity of water = 1.000
Ionic strength = 4.851e-04
Mass of water (kg) = 1.000e+00
Total carbon (mol/kg) = 7.825e-04
Total CO2 (mol/kg) = 7.825e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = 1.400e-05
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 1.90
Iterations = 7
Total H = 1.110139e+02
Total O = 5.550924e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
H+ 6.464e-07 6.310e-07 -6.189 -6.200 -0.011
OH- 1.627e-08 1.587e-08 -7.789 -7.800 -0.011
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
C(4) 7.825e-04
CO2 4.540e-04 4.540e-04 -3.343 -3.343 0.000
HCO3- 3.281e-04 3.200e-04 -3.484 -3.495 -0.011
CaHCO3+ 2.940e-07 2.868e-07 -6.532 -6.542 -0.011
MgHCO3+ 1.003e-07 9.783e-08 -6.999 -7.010 -0.011
CO3-2 2.628e-08 2.379e-08 -7.580 -7.624 -0.043
NaHCO3 2.351e-08 2.352e-08 -7.629 -7.629 0.000
CaCO3 2.806e-09 2.807e-09 -8.552 -8.552 0.000
MgCO3 5.929e-10 5.930e-10 -9.227 -9.227 0.000
NaCO3- 5.935e-11 5.788e-11 -10.227 -10.237 -0.011
Ca 7.800e-05
Ca+2 7.758e-05 7.023e-05 -4.110 -4.153 -0.043
CaHCO3+ 2.940e-07 2.868e-07 -6.532 -6.542 -0.011
CaSO4 1.244e-07 1.245e-07 -6.905 -6.905 0.000
CaCO3 2.806e-09 2.807e-09 -8.552 -8.552 0.000
CaOH+ 1.894e-11 1.847e-11 -10.723 -10.733 -0.011
CaHSO4+ 4.717e-13 4.600e-13 -12.326 -12.337 -0.011
Cl 1.400e-05
Cl- 1.400e-05 1.365e-05 -4.854 -4.865 -0.011
H(0) 5.636e-24
H2 2.818e-24 2.818e-24 -23.550 -23.550 0.000
K 2.800e-05
K+ 2.800e-05 2.730e-05 -4.553 -4.564 -0.011
KSO4- 1.747e-09 1.704e-09 -8.758 -8.769 -0.011
KOH 1.500e-13 1.500e-13 -12.824 -12.824 0.000
Mg 2.900e-05
Mg+2 2.885e-05 2.612e-05 -4.540 -4.583 -0.043
MgHCO3+ 1.003e-07 9.783e-08 -6.999 -7.010 -0.011
MgSO4 5.438e-08 5.439e-08 -7.265 -7.264 0.000
MgCO3 5.929e-10 5.930e-10 -9.227 -9.227 0.000
MgOH+ 1.541e-10 1.503e-10 -9.812 -9.823 -0.011
Na 1.340e-04
Na+ 1.340e-04 1.307e-04 -3.873 -3.884 -0.011
NaHCO3 2.351e-08 2.352e-08 -7.629 -7.629 0.000
NaSO4- 5.964e-09 5.816e-09 -8.224 -8.235 -0.011
NaCO3- 5.935e-11 5.788e-11 -10.227 -10.237 -0.011
NaOH 1.368e-12 1.368e-12 -11.864 -11.864 0.000
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -45.280 -45.280 0.000
S(6) 1.000e-05
SO4-2 9.813e-06 8.882e-06 -5.008 -5.052 -0.043
CaSO4 1.244e-07 1.245e-07 -6.905 -6.905 0.000
MgSO4 5.438e-08 5.439e-08 -7.265 -7.264 0.000
NaSO4- 5.964e-09 5.816e-09 -8.224 -8.235 -0.011
KSO4- 1.747e-09 1.704e-09 -8.758 -8.769 -0.011
HSO4- 5.587e-10 5.448e-10 -9.253 -9.264 -0.011
CaHSO4+ 4.717e-13 4.600e-13 -12.326 -12.337 -0.011
Si 2.730e-04
H4SiO4 2.729e-04 2.730e-04 -3.564 -3.564 0.000
H3SiO4- 6.541e-08 6.379e-08 -7.184 -7.195 -0.011
H2SiO4-2 7.604e-15 6.877e-15 -14.119 -14.163 -0.044
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -4.84 -9.20 -4.36 CaSO4
Aragonite -3.44 -11.78 -8.34 CaCO3
Calcite -3.30 -11.78 -8.48 CaCO3
Chalcedony -0.01 -3.56 -3.55 SiO2
Chrysotile -15.88 16.32 32.20 Mg3Si2O5(OH)4
CO2(g) -1.87 -3.34 -1.47 CO2
Dolomite -6.89 -23.98 -17.09 CaMg(CO3)2
Gypsum -4.62 -9.20 -4.58 CaSO4:2H2O
H2(g) -20.40 -23.55 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
Halite -10.33 -8.75 1.58 NaCl
O2(g) -42.32 -45.28 -2.96 O2
Quartz 0.42 -3.56 -3.98 SiO2
Sepiolite -10.82 4.94 15.76 Mg2Si3O7.5OH:3H2O
Sepiolite(d) -13.72 4.94 18.66 Mg2Si3O7.5OH:3H2O
SiO2(a) -0.85 -3.56 -2.71 SiO2
Talc -12.20 9.20 21.40 Mg3Si4O10(OH)2
Initial solution 2.
-----------------------------Solution composition------------------------------
Elements Molality Moles
Alkalinity 8.951e-04 8.951e-04
Ca 2.600e-04 2.600e-04
Cl 3.000e-05 3.000e-05
K 4.000e-05 4.000e-05
Mg 7.101e-05 7.101e-05
Na 2.590e-04 2.590e-04
S(6) 2.500e-05 2.500e-05
Si 4.100e-04 4.100e-04
----------------------------Description of solution----------------------------
pH = 6.800
pe = 4.000
Activity of water = 1.000
Ionic strength = 1.313e-03
Mass of water (kg) = 1.000e+00
Total carbon (mol/kg) = 1.199e-03
Total CO2 (mol/kg) = 1.199e-03
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.400e-05
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.73
Iterations = 6
Total H = 1.110150e+02
Total O = 5.551125e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
H+ 1.647e-07 1.585e-07 -6.783 -6.800 -0.017
OH- 6.579e-08 6.316e-08 -7.182 -7.200 -0.018
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
C(4) 1.199e-03
HCO3- 8.907e-04 8.559e-04 -3.050 -3.068 -0.017
CO2 3.049e-04 3.050e-04 -3.516 -3.516 0.000
CaHCO3+ 2.485e-06 2.387e-06 -5.605 -5.622 -0.017
MgHCO3+ 6.235e-07 5.987e-07 -6.205 -6.223 -0.018
CO3-2 2.971e-07 2.533e-07 -6.527 -6.596 -0.069
NaHCO3 1.196e-07 1.197e-07 -6.922 -6.922 0.000
CaCO3 9.299e-08 9.302e-08 -7.032 -7.031 0.000
MgCO3 1.444e-08 1.445e-08 -7.840 -7.840 0.000
NaCO3- 1.221e-09 1.173e-09 -8.913 -8.931 -0.018
Ca 2.600e-04
Ca+2 2.566e-04 2.186e-04 -3.591 -3.660 -0.069
CaHCO3+ 2.485e-06 2.387e-06 -5.605 -5.622 -0.017
CaSO4 8.841e-07 8.843e-07 -6.054 -6.053 0.000
CaCO3 9.299e-08 9.302e-08 -7.032 -7.031 0.000
CaOH+ 2.384e-10 2.289e-10 -9.623 -9.640 -0.018
CaHSO4+ 8.551e-13 8.211e-13 -12.068 -12.086 -0.018
Cl 3.000e-05
Cl- 3.000e-05 2.880e-05 -4.523 -4.541 -0.018
H(0) 3.555e-25
H2 1.778e-25 1.778e-25 -24.750 -24.750 0.000
K 4.000e-05
K+ 4.000e-05 3.840e-05 -4.398 -4.416 -0.018
KSO4- 5.696e-09 5.470e-09 -8.244 -8.262 -0.018
KOH 8.398e-13 8.401e-13 -12.076 -12.076 0.000
Mg 7.101e-05
Mg+2 7.008e-05 5.978e-05 -4.154 -4.223 -0.069
MgHCO3+ 6.235e-07 5.987e-07 -6.205 -6.223 -0.018
MgSO4 2.840e-07 2.841e-07 -6.547 -6.547 0.000
MgCO3 1.444e-08 1.445e-08 -7.840 -7.840 0.000
MgOH+ 1.426e-09 1.370e-09 -8.846 -8.863 -0.018
Na 2.590e-04
Na+ 2.589e-04 2.486e-04 -3.587 -3.604 -0.018
NaHCO3 1.196e-07 1.197e-07 -6.922 -6.922 0.000
NaSO4- 2.631e-08 2.526e-08 -7.580 -7.598 -0.018
NaCO3- 1.221e-09 1.173e-09 -8.913 -8.931 -0.018
NaOH 1.036e-11 1.036e-11 -10.985 -10.984 0.000
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -42.880 -42.880 0.000
S(6) 2.500e-05
SO4-2 2.380e-05 2.027e-05 -4.623 -4.693 -0.070
CaSO4 8.841e-07 8.843e-07 -6.054 -6.053 0.000
MgSO4 2.840e-07 2.841e-07 -6.547 -6.547 0.000
NaSO4- 2.631e-08 2.526e-08 -7.580 -7.598 -0.018
KSO4- 5.696e-09 5.470e-09 -8.244 -8.262 -0.018
HSO4- 3.253e-10 3.124e-10 -9.488 -9.505 -0.018
CaHSO4+ 8.551e-13 8.211e-13 -12.068 -12.086 -0.018
Si 4.100e-04
H4SiO4 4.096e-04 4.098e-04 -3.388 -3.387 0.000
H3SiO4- 3.970e-07 3.812e-07 -6.401 -6.419 -0.018
H2SiO4-2 1.924e-13 1.636e-13 -12.716 -12.786 -0.070
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -3.99 -8.35 -4.36 CaSO4
Aragonite -1.92 -10.26 -8.34 CaCO3
Calcite -1.78 -10.26 -8.48 CaCO3
Chalcedony 0.16 -3.39 -3.55 SiO2
Chrysotile -10.85 21.35 32.20 Mg3Si2O5(OH)4
CO2(g) -2.05 -3.52 -1.47 CO2
Dolomite -3.99 -21.08 -17.09 CaMg(CO3)2
Gypsum -3.77 -8.35 -4.58 CaSO4:2H2O
H2(g) -21.60 -24.75 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
Halite -9.73 -8.14 1.58 NaCl
O2(g) -39.92 -42.88 -2.96 O2
Quartz 0.59 -3.39 -3.98 SiO2
Sepiolite -7.17 8.59 15.76 Mg2Si3O7.5OH:3H2O
Sepiolite(d) -10.07 8.59 18.66 Mg2Si3O7.5OH:3H2O
SiO2(a) -0.68 -3.39 -2.71 SiO2
Talc -6.82 14.58 21.40 Mg3Si4O10(OH)2
-------------------------------------------
Beginning of inverse modeling calculations.
-------------------------------------------
Solution 1:
Input Delta Input+Delta
pH 6.200e+00 + 1.246e-02 = 6.212e+00
Al 0.000e+00 + 0.000e+00 = 0.000e+00
Alkalinity 3.280e-04 + 5.500e-06 = 3.335e-04
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 7.825e-04 + 0.000e+00 = 7.825e-04
Ca 7.800e-05 + -3.900e-06 = 7.410e-05
Cl 1.400e-05 + 0.000e+00 = 1.400e-05
H(0) 0.000e+00 + 0.000e+00 = 0.000e+00
K 2.800e-05 + -7.000e-07 = 2.730e-05
Mg 2.900e-05 + 0.000e+00 = 2.900e-05
Na 1.340e-04 + 0.000e+00 = 1.340e-04
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 0.000e+00 + 0.000e+00 = 0.000e+00
S(6) 1.000e-05 + 0.000e+00 = 1.000e-05
Si 2.730e-04 + 0.000e+00 = 2.730e-04
Solution 2:
Input Delta Input+Delta
pH 6.800e+00 + -3.407e-03 = 6.797e+00
Al 0.000e+00 + 0.000e+00 = 0.000e+00
Alkalinity 8.951e-04 + -1.796e-06 = 8.933e-04
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 1.199e-03 + 0.000e+00 = 1.199e-03
Ca 2.600e-04 + 6.501e-06 = 2.665e-04
Cl 3.000e-05 + 0.000e+00 = 3.000e-05
H(0) 0.000e+00 + 0.000e+00 = 0.000e+00
K 4.000e-05 + 1.000e-06 = 4.100e-05
Mg 7.101e-05 + -8.979e-07 = 7.011e-05
Na 2.590e-04 + 0.000e+00 = 2.590e-04
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 0.000e+00 + 0.000e+00 = 0.000e+00
S(6) 2.500e-05 + 0.000e+00 = 2.500e-05
Si 4.100e-04 + 0.000e+00 = 4.100e-04
Solution fractions: Minimum Maximum
Solution 1 1.000e+00 1.000e+00 1.000e+00
Solution 2 1.000e+00 1.000e+00 1.000e+00
Phase mole transfers: Minimum Maximum
Halite 1.600e-05 1.490e-05 1.710e-05 NaCl
Gypsum 1.500e-05 1.413e-05 1.588e-05 CaSO4:2H2O
Kaolinite -3.392e-05 -5.587e-05 -1.224e-05 Al2Si2O5(OH)4
Ca-Montmorillon -8.090e-05 -1.100e-04 -5.154e-05 Ca0.165Al2.33Si3.67O10(OH)2
CO2(g) 2.928e-04 2.363e-04 3.563e-04 CO2
Calcite 1.240e-04 1.007e-04 1.309e-04 CaCO3
Biotite 1.370e-05 1.317e-05 1.370e-05 KMg3AlSi3O10(OH)2
Plagioclase 1.758e-04 1.582e-04 1.935e-04 Na0.62Ca0.38Al1.38Si2.62O8
Redox mole transfers:
Sum of residuals (epsilons in documentation): 5.574e+00
Sum of delta/uncertainty limit: 5.574e+00
Maximum fractional error in element concentration: 5.000e-02
Model contains minimum number of phases.
===============================================================================
Solution 1:
Input Delta Input+Delta
pH 6.200e+00 + 1.246e-02 = 6.212e+00
Al 0.000e+00 + 0.000e+00 = 0.000e+00
Alkalinity 3.280e-04 + 5.500e-06 = 3.335e-04
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 7.825e-04 + 0.000e+00 = 7.825e-04
Ca 7.800e-05 + -3.900e-06 = 7.410e-05
Cl 1.400e-05 + 0.000e+00 = 1.400e-05
H(0) 0.000e+00 + 0.000e+00 = 0.000e+00
K 2.800e-05 + -7.000e-07 = 2.730e-05
Mg 2.900e-05 + 0.000e+00 = 2.900e-05
Na 1.340e-04 + 0.000e+00 = 1.340e-04
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 0.000e+00 + 0.000e+00 = 0.000e+00
S(6) 1.000e-05 + 0.000e+00 = 1.000e-05
Si 2.730e-04 + 0.000e+00 = 2.730e-04
Solution 2:
Input Delta Input+Delta
pH 6.800e+00 + -3.407e-03 = 6.797e+00
Al 0.000e+00 + 0.000e+00 = 0.000e+00
Alkalinity 8.951e-04 + -1.796e-06 = 8.933e-04
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 1.199e-03 + 0.000e+00 = 1.199e-03
Ca 2.600e-04 + 6.501e-06 = 2.665e-04
Cl 3.000e-05 + 0.000e+00 = 3.000e-05
H(0) 0.000e+00 + 0.000e+00 = 0.000e+00
K 4.000e-05 + 1.000e-06 = 4.100e-05
Mg 7.101e-05 + -8.980e-07 = 7.011e-05
Na 2.590e-04 + 0.000e+00 = 2.590e-04
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 0.000e+00 + 0.000e+00 = 0.000e+00
S(6) 2.500e-05 + 0.000e+00 = 2.500e-05
Si 4.100e-04 + 0.000e+00 = 4.100e-04
Solution fractions: Minimum Maximum
Solution 1 1.000e+00 1.000e+00 1.000e+00
Solution 2 1.000e+00 1.000e+00 1.000e+00
Phase mole transfers: Minimum Maximum
Halite 1.600e-05 1.490e-05 1.710e-05 NaCl
Gypsum 1.500e-05 1.413e-05 1.588e-05 CaSO4:2H2O
Kaolinite -1.282e-04 -1.403e-04 -1.159e-04 Al2Si2O5(OH)4
CO2(g) 3.061e-04 2.490e-04 3.703e-04 CO2
Calcite 1.106e-04 8.680e-05 1.182e-04 CaCO3
Chalcedony -1.084e-04 -1.473e-04 -6.906e-05 SiO2
Biotite 1.370e-05 1.317e-05 1.370e-05 KMg3AlSi3O10(OH)2
Plagioclase 1.758e-04 1.582e-04 1.935e-04 Na0.62Ca0.38Al1.38Si2.62O8
Redox mole transfers:
Sum of residuals (epsilons in documentation): 5.574e+00
Sum of delta/uncertainty limit: 5.574e+00
Maximum fractional error in element concentration: 5.000e-02
Model contains minimum number of phases.
===============================================================================
Summary of inverse modeling:
Number of models found: 2
Number of minimal models found: 2
Number of infeasible sets of phases saved: 20
Number of calls to cl1: 62
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
-----------
End of run.
-----------
No memory leaks

0
Sun/examples/ex17.log Normal file
View File

349
Sun/examples/ex17.out Normal file
View File

@ -0,0 +1,349 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex17
Output file: ex17.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 17.--Inverse modeling of Black Sea water evaporation
SOLUTION 1 Black Sea water
units mg/L
density 1.014
pH 8.0 # estimated
Ca 233
Mg 679
Na 5820
K 193
S(6) 1460
Cl 10340
Br 35
C 1 CO2(g) -3.5
SOLUTION 2 Composition during halite precipitation
units mg/L
density 1.271
pH 5.0 # estimated
Ca 0.0
Mg 50500
Na 55200
K 15800
S(6) 76200
Cl 187900
Br 2670
C 1 CO2(g) -3.5
INVERSE_MODELING
solutions 1 2
uncertainties .025
range
balances
Br
K
Mg
phases
H2O(g) pre
Calcite pre
CO2(g) pre
Gypsum pre
Halite pre
END
-----
TITLE
-----
Example 17.--Inverse modeling of Black Sea water evaporation
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1. Black Sea water
-----------------------------Solution composition------------------------------
Elements Molality Moles
Br 4.401e-04 4.401e-04
C 8.284e-04 8.284e-04 Equilibrium with CO2(g)
Ca 5.841e-03 5.841e-03
Cl 2.930e-01 2.930e-01
K 4.959e-03 4.959e-03
Mg 2.806e-02 2.806e-02
Na 2.544e-01 2.544e-01
S(6) 1.527e-02 1.527e-02
----------------------------Description of solution----------------------------
pH = 8.000
pe = 4.000
Activity of water = 0.990
Ionic strength = 3.540e-01
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 8.625e-04
Total CO2 (mol/kg) = 8.284e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = 2.240e-03
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.36
Iterations = 5
Total H = 1.110132e+02
Total O = 5.556978e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.500e-06 9.909e-07 -5.824 -6.004 -0.180
H+ 1.288e-08 1.000e-08 -7.890 -8.000 -0.110
H2O 5.551e+01 9.899e-01 1.744 -0.004 0.000
Br 4.401e-04
Br- 4.401e-04 2.835e-04 -3.356 -3.547 -0.191
C(-4) 0.000e+00
CH4 0.000e+00 0.000e+00 -76.604 -76.569 0.035
C(4) 8.284e-04
HCO3- 6.657e-04 4.740e-04 -3.177 -3.324 -0.147
MgHCO3+ 5.725e-05 4.187e-05 -4.242 -4.378 -0.136
NaHCO3 4.444e-05 4.822e-05 -4.352 -4.317 0.035
MgCO3 1.476e-05 1.601e-05 -4.831 -4.796 0.035
CaHCO3+ 1.247e-05 8.879e-06 -4.904 -5.052 -0.147
NaCO3- 1.024e-05 7.488e-06 -4.990 -5.126 -0.136
CO2 9.923e-06 1.077e-05 -5.003 -4.968 0.035
CO3-2 8.646e-06 2.223e-06 -5.063 -5.653 -0.590
CaCO3 5.053e-06 5.483e-06 -5.296 -5.261 0.035
Ca 5.841e-03
Ca+2 5.267e-03 1.468e-03 -2.278 -2.833 -0.555
CaSO4 5.563e-04 6.035e-04 -3.255 -3.219 0.035
CaHCO3+ 1.247e-05 8.879e-06 -4.904 -5.052 -0.147
CaCO3 5.053e-06 5.483e-06 -5.296 -5.261 0.035
CaOH+ 3.298e-08 2.412e-08 -7.482 -7.618 -0.136
CaHSO4+ 4.835e-11 3.536e-11 -10.316 -10.452 -0.136
Cl 2.930e-01
Cl- 2.930e-01 1.960e-01 -0.533 -0.708 -0.175
H(0) 1.305e-27
H2 6.525e-28 7.079e-28 -27.185 -27.150 0.035
K 4.959e-03
K+ 4.895e-03 3.274e-03 -2.310 -2.485 -0.175
KSO4- 6.480e-05 4.739e-05 -4.188 -4.324 -0.136
KOH 1.036e-09 1.124e-09 -8.985 -8.949 0.035
Mg 2.806e-02
Mg+2 2.463e-02 7.549e-03 -1.609 -2.122 -0.514
MgSO4 3.360e-03 3.646e-03 -2.474 -2.438 0.035
MgHCO3+ 5.725e-05 4.187e-05 -4.242 -4.378 -0.136
MgCO3 1.476e-05 1.601e-05 -4.831 -4.796 0.035
MgOH+ 3.710e-06 2.713e-06 -5.431 -5.567 -0.136
Na 2.544e-01
Na+ 2.518e-01 1.809e-01 -0.599 -0.743 -0.144
NaSO4- 2.554e-03 1.868e-03 -2.593 -2.729 -0.136
NaHCO3 4.444e-05 4.822e-05 -4.352 -4.317 0.035
NaCO3- 1.024e-05 7.488e-06 -4.990 -5.126 -0.136
NaOH 1.090e-07 1.183e-07 -6.962 -6.927 0.035
O(0) 1.502e-38
O2 7.512e-39 8.150e-39 -38.124 -38.089 0.035
S(6) 1.527e-02
SO4-2 8.735e-03 2.060e-03 -2.059 -2.686 -0.627
MgSO4 3.360e-03 3.646e-03 -2.474 -2.438 0.035
NaSO4- 2.554e-03 1.868e-03 -2.593 -2.729 -0.136
CaSO4 5.563e-04 6.035e-04 -3.255 -3.219 0.035
KSO4- 6.480e-05 4.739e-05 -4.188 -4.324 -0.136
HSO4- 2.739e-09 2.003e-09 -8.562 -8.698 -0.136
CaHSO4+ 4.835e-11 3.536e-11 -10.316 -10.452 -0.136
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -1.16 -5.52 -4.36 CaSO4
Aragonite -0.15 -8.49 -8.34 CaCO3
Calcite -0.01 -8.49 -8.48 CaCO3
CH4(g) -73.71 -76.57 -2.86 CH4
CO2(g) -3.50 -4.97 -1.47 CO2
Dolomite 0.83 -16.26 -17.09 CaMg(CO3)2
Gypsum -0.95 -5.53 -4.58 CaSO4:2H2O
H2(g) -24.00 -27.15 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
Halite -3.03 -1.45 1.58 NaCl
O2(g) -35.13 -38.09 -2.96 O2
Initial solution 2. Composition during halite precipitation
-----------------------------Solution composition------------------------------
Elements Molality Moles
Br 3.785e-02 3.785e-02
C 7.019e-06 7.019e-06 Equilibrium with CO2(g)
Cl 6.004e+00 6.004e+00
K 4.578e-01 4.578e-01
Mg 2.353e+00 2.353e+00
Na 2.720e+00 2.720e+00
S(6) 8.986e-01 8.986e-01
----------------------------Description of solution----------------------------
pH = 5.000
pe = 4.000
Activity of water = 0.802
Ionic strength = 7.827e+00
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = -9.195e-06
Total CO2 (mol/kg) = 7.019e-06
Temperature (deg C) = 25.000
Electrical balance (eq) = 4.491e-02
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.36
Iterations = 10
Total H = 1.110125e+02
Total O = 5.910064e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
H+ 1.425e-05 1.000e-05 -4.846 -5.000 -0.154
OH- 1.749e-09 8.029e-10 -8.757 -9.095 -0.338
H2O 5.551e+01 8.021e-01 1.744 -0.096 0.000
Br 3.785e-02
Br- 3.785e-02 1.580e-02 -1.422 -1.801 -0.379
C(-4) 0.000e+00
CH4 0.000e+00 0.000e+00 -53.169 -52.386 0.783
C(4) 7.019e-06
MgHCO3+ 4.391e-06 2.905e-05 -5.357 -4.537 0.821
CO2 1.776e-06 1.077e-05 -5.751 -4.968 0.783
HCO3- 6.660e-07 3.841e-07 -6.177 -6.416 -0.239
NaHCO3 1.847e-07 1.120e-06 -6.734 -5.951 0.783
MgCO3 1.833e-09 1.111e-08 -8.737 -7.954 0.783
NaCO3- 2.628e-11 1.739e-10 -10.580 -9.760 0.821
CO3-2 1.629e-11 1.801e-12 -10.788 -11.744 -0.956
Cl 6.004e+00
Cl- 6.004e+00 3.612e+00 0.778 0.558 -0.221
H(0) 2.335e-22
H2 1.168e-22 7.079e-22 -21.933 -21.150 0.783
K 4.578e-01
K+ 4.568e-01 2.748e-01 -0.340 -0.561 -0.221
KSO4- 9.513e-04 6.294e-03 -3.022 -2.201 0.821
KOH 1.261e-11 7.643e-11 -10.899 -10.117 0.783
Mg 2.353e+00
Mg+2 1.538e+00 6.465e+00 0.187 0.811 0.624
MgSO4 8.148e-01 4.940e+00 -0.089 0.694 0.783
MgHCO3+ 4.391e-06 2.905e-05 -5.357 -4.537 0.821
MgOH+ 2.845e-07 1.883e-06 -6.546 -5.725 0.821
MgCO3 1.833e-09 1.111e-08 -8.737 -7.954 0.783
Na 2.720e+00
Na+ 2.707e+00 5.184e+00 0.433 0.715 0.282
NaSO4- 1.280e-02 8.469e-02 -1.893 -1.072 0.821
NaHCO3 1.847e-07 1.120e-06 -6.734 -5.951 0.783
NaOH 4.531e-10 2.747e-09 -9.344 -8.561 0.783
NaCO3- 2.628e-11 1.739e-10 -10.580 -9.760 0.821
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -51.054 -50.272 0.783
S(6) 8.986e-01
MgSO4 8.148e-01 4.940e+00 -0.089 0.694 0.783
SO4-2 7.004e-02 3.259e-03 -1.155 -2.487 -1.332
NaSO4- 1.280e-02 8.469e-02 -1.893 -1.072 0.821
KSO4- 9.513e-04 6.294e-03 -3.022 -2.201 0.821
HSO4- 4.789e-07 3.169e-06 -6.320 -5.499 0.821
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
CH4(g) -49.53 -52.39 -2.86 CH4
CO2(g) -3.50 -4.97 -1.47 CO2
H2(g) -18.00 -21.15 -3.15 H2
H2O(g) -1.61 -0.10 1.51 H2O
Halite -0.31 1.27 1.58 NaCl
O2(g) -47.31 -50.27 -2.96 O2
-------------------------------------------
Beginning of inverse modeling calculations.
-------------------------------------------
Solution 1: Black Sea water
Input Delta Input+Delta
pH 8.000e+00 + 0.000e+00 = 8.000e+00
Alkalinity 8.625e-04 + 0.000e+00 = 8.625e-04
Br 4.401e-04 + 0.000e+00 = 4.401e-04
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 8.284e-04 + 0.000e+00 = 8.284e-04
Ca 5.841e-03 + 0.000e+00 = 5.841e-03
Cl 2.930e-01 + 7.845e-04 = 2.938e-01
H(0) 0.000e+00 + 0.000e+00 = 0.000e+00
K 4.959e-03 + 1.034e-04 = 5.063e-03
Mg 2.806e-02 + -7.016e-04 = 2.736e-02
Na 2.544e-01 + 0.000e+00 = 2.544e-01
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 0.000e+00 + 0.000e+00 = 0.000e+00
S(6) 1.527e-02 + 7.768e-05 = 1.535e-02
Solution 2: Composition during halite precipitation
Input Delta Input+Delta
pH 5.000e+00 + 5.711e-14 = 5.000e+00
Alkalinity -9.195e-06 + 0.000e+00 = -9.195e-06
Br 3.785e-02 + 9.440e-04 = 3.880e-02
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 7.019e-06 + 0.000e+00 = 7.019e-06
Ca 0.000e+00 + 0.000e+00 = 0.000e+00
Cl 6.004e+00 + 1.501e-01 = 6.154e+00
H(0) 0.000e+00 + 0.000e+00 = 0.000e+00
K 4.578e-01 + -1.144e-02 = 4.463e-01
Mg 2.353e+00 + 5.883e-02 = 2.412e+00
Na 2.720e+00 + -4.500e-02 = 2.675e+00
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 0.000e+00 + 0.000e+00 = 0.000e+00
S(6) 8.986e-01 + -2.247e-02 = 8.761e-01
Solution fractions: Minimum Maximum
Solution 1 8.815e+01 8.780e+01 8.815e+01
Solution 2 1.000e+00 1.000e+00 1.000e+00
Phase mole transfers: Minimum Maximum
H2O(g) -4.837e+03 -4.817e+03 -4.817e+03 H2O
Calcite -3.802e-02 -3.897e-02 -3.692e-02 CaCO3
CO2(g) -3.500e-02 -3.615e-02 -3.371e-02 CO2
Gypsum -4.769e-01 -4.907e-01 -4.612e-01 CaSO4:2H2O
Halite -1.975e+01 -2.033e+01 -1.901e+01 NaCl
Redox mole transfers:
Sum of residuals (epsilons in documentation): 1.947e+02
Sum of delta/uncertainty limit: 7.804e+00
Maximum fractional error in element concentration: 2.500e-02
Model contains minimum number of phases.
===============================================================================
Summary of inverse modeling:
Number of models found: 1
Number of minimal models found: 1
Number of infeasible sets of phases saved: 6
Number of calls to cl1: 22
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
-----------
End of run.
-----------
No memory leaks

0
Sun/examples/ex18.log Normal file
View File

550
Sun/examples/ex18.out Normal file
View File

@ -0,0 +1,550 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex18
Output file: ex18.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 18.--Inverse modeling of Madison aquifer
SOLUTION 1 Recharge number 3
units mmol/kgw
temp 9.9
pe 0.
pH 7.55
Ca 1.2
Mg 1.01
Na 0.02
K 0.02
Fe(2) 0.001
Cl 0.02
S(6) 0.16
S(-2) 0
C(4) 4.30
isotope 13C -7.0 1.4
isotope 34S 9.7 0.9
SOLUTION 2 Mysse
units mmol/kgw
temp 63.
pH 6.61
pe 0.
redox S(6)/S(-2)
Ca 11.28
Mg 4.54
Na 31.89
K 2.54
Fe(2) 0.0004
Cl 17.85
S(6) 19.86
S(-2) 0.26
C(4) 6.87
isotope 13C -2.3 0.2
isotope 34S(6) 16.3 1.5
isotope 34S(-2) -22.1 7
INVERSE_MODELING 1
solutions 1 2
uncertainty 0.05
range
isotopes
13C
34S
balances
Fe(2) 1.0
ph 0.1
phases
Dolomite dis 13C 3.0 2
Calcite pre 13C -1.5 1
Anhydrite dis 34S 13.5 2
CH2O dis 13C -25.0 5
Goethite
Pyrite pre 34S -22. 2
CaX2 pre
Ca.75Mg.25X2 pre
MgX2 pre
NaX
Halite
Sylvite
PHASES
Sylvite
KCl = K+ + Cl-
log_k 0.0
CH2O
CH2O + H2O = CO2 + 4H+ + 4e-
log_k 0.0
EXCHANGE_SPECIES
0.75Ca+2 + 0.25Mg+2 + 2X- = Ca.75Mg.25X2
log_k 0.0
END
-----
TITLE
-----
Example 18.--Inverse modeling of Madison aquifer
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1. Recharge number 3
-----------------------------Solution composition------------------------------
Elements Molality Moles
C(4) 4.300e-03 4.300e-03
Ca 1.200e-03 1.200e-03
Cl 2.000e-05 2.000e-05
Fe(2) 1.000e-06 1.000e-06
K 2.000e-05 2.000e-05
Mg 1.010e-03 1.010e-03
Na 2.000e-05 2.000e-05
S(6) 1.600e-04 1.600e-04
----------------------------Description of solution----------------------------
pH = 7.550
pe = 0.000
Activity of water = 1.000
Ionic strength = 6.543e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 4.016e-03
Total CO2 (mol/kg) = 4.300e-03
Temperature (deg C) = 9.900
Electrical balance (eq) = 1.061e-04
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 1.24
Iterations = 8
Total H = 1.110164e+02
Total O = 5.551946e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.120e-07 1.029e-07 -6.951 -6.988 -0.037
H+ 3.038e-08 2.818e-08 -7.517 -7.550 -0.033
H2O 5.551e+01 9.999e-01 1.744 -0.000 0.000
C(4) 4.300e-03
HCO3- 3.929e-03 3.623e-03 -2.406 -2.441 -0.035
CO2 2.970e-04 2.974e-04 -3.527 -3.527 0.001
MgHCO3+ 3.098e-05 2.850e-05 -4.509 -4.545 -0.036
CaHCO3+ 3.027e-05 2.792e-05 -4.519 -4.554 -0.035
CO3-2 5.765e-06 4.168e-06 -5.239 -5.380 -0.141
CaCO3 4.727e-06 4.734e-06 -5.325 -5.325 0.001
MgCO3 2.208e-06 2.211e-06 -5.656 -5.655 0.001
FeHCO3+ 2.086e-07 1.919e-07 -6.681 -6.717 -0.036
FeCO3 5.289e-08 5.297e-08 -7.277 -7.276 0.001
NaHCO3 3.737e-08 3.742e-08 -7.428 -7.427 0.001
NaCO3- 6.948e-10 6.391e-10 -9.158 -9.194 -0.036
Ca 1.200e-03
Ca+2 1.151e-03 8.317e-04 -2.939 -3.080 -0.141
CaHCO3+ 3.027e-05 2.792e-05 -4.519 -4.554 -0.035
CaSO4 1.393e-05 1.395e-05 -4.856 -4.855 0.001
CaCO3 4.727e-06 4.734e-06 -5.325 -5.325 0.001
CaOH+ 5.323e-09 4.897e-09 -8.274 -8.310 -0.036
CaHSO4+ 2.136e-12 1.965e-12 -11.670 -11.707 -0.036
Cl 2.000e-05
Cl- 2.000e-05 1.838e-05 -4.699 -4.736 -0.037
FeCl+ 1.461e-11 1.344e-11 -10.835 -10.872 -0.036
Fe(2) 1.000e-06
Fe+2 7.296e-07 5.298e-07 -6.137 -6.276 -0.139
FeHCO3+ 2.086e-07 1.919e-07 -6.681 -6.717 -0.036
FeCO3 5.289e-08 5.297e-08 -7.277 -7.276 0.001
FeSO4 6.861e-09 6.871e-09 -8.164 -8.163 0.001
FeOH+ 1.969e-09 1.811e-09 -8.706 -8.742 -0.036
FeCl+ 1.461e-11 1.344e-11 -10.835 -10.872 -0.036
FeHSO4+ 1.361e-15 1.252e-15 -14.866 -14.903 -0.036
H(0) 1.316e-18
H2 6.579e-19 6.588e-19 -18.182 -18.181 0.001
K 2.000e-05
K+ 1.999e-05 1.837e-05 -4.699 -4.736 -0.037
KSO4- 1.037e-08 9.538e-09 -7.984 -8.021 -0.036
KOH 2.256e-12 2.260e-12 -11.647 -11.646 0.001
Mg 1.010e-03
Mg+2 9.662e-04 7.011e-04 -3.015 -3.154 -0.139
MgHCO3+ 3.098e-05 2.850e-05 -4.509 -4.545 -0.036
MgSO4 1.063e-05 1.064e-05 -4.974 -4.973 0.001
MgCO3 2.208e-06 2.211e-06 -5.656 -5.655 0.001
MgOH+ 2.335e-08 2.148e-08 -7.632 -7.668 -0.036
Na 2.000e-05
Na+ 1.995e-05 1.837e-05 -4.700 -4.736 -0.036
NaHCO3 3.737e-08 3.742e-08 -7.428 -7.427 0.001
NaSO4- 8.826e-09 8.119e-09 -8.054 -8.090 -0.036
NaCO3- 6.948e-10 6.391e-10 -9.158 -9.194 -0.036
NaOH 4.299e-12 4.306e-12 -11.367 -11.366 0.001
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -61.151 -61.151 0.001
S(6) 1.600e-04
SO4-2 1.354e-04 9.754e-05 -3.868 -4.011 -0.142
CaSO4 1.393e-05 1.395e-05 -4.856 -4.855 0.001
MgSO4 1.063e-05 1.064e-05 -4.974 -4.973 0.001
KSO4- 1.037e-08 9.538e-09 -7.984 -8.021 -0.036
NaSO4- 8.826e-09 8.119e-09 -8.054 -8.090 -0.036
FeSO4 6.861e-09 6.871e-09 -8.164 -8.163 0.001
HSO4- 2.136e-10 1.965e-10 -9.670 -9.707 -0.036
CaHSO4+ 2.136e-12 1.965e-12 -11.670 -11.707 -0.036
FeHSO4+ 1.361e-15 1.252e-15 -14.866 -14.903 -0.036
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -2.76 -7.09 -4.34 CaSO4
Aragonite -0.21 -8.46 -8.25 CaCO3
Calcite -0.05 -8.46 -8.41 CaCO3
CH2O -33.73 -33.73 0.00 CH2O
CO2(g) -2.26 -3.53 -1.27 CO2
Dolomite -0.27 -16.99 -16.72 CaMg(CO3)2
Gypsum -2.50 -7.09 -4.59 CaSO4:2H2O
H2(g) -15.10 -18.18 -3.08 H2
H2O(g) -1.92 -0.00 1.92 H2O
Halite -11.02 -9.47 1.55 NaCl
Melanterite -7.88 -10.29 -2.41 FeSO4:7H2O
O2(g) -58.26 -61.15 -2.89 O2
Siderite -0.86 -11.66 -10.79 FeCO3
Sylvite -9.47 -9.47 0.00 KCl
Initial solution 2. Mysse
-----------------------------Solution composition------------------------------
Elements Molality Moles
C(4) 6.870e-03 6.870e-03
Ca 1.128e-02 1.128e-02
Cl 1.785e-02 1.785e-02
Fe(2) 4.000e-07 4.000e-07
K 2.540e-03 2.540e-03
Mg 4.540e-03 4.540e-03
Na 3.189e-02 3.189e-02
S(-2) 2.600e-04 2.600e-04
S(6) 1.986e-02 1.986e-02
----------------------------Description of solution----------------------------
pH = 6.610
pe = 0.000
Activity of water = 0.999
Ionic strength = 7.256e-02
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 5.258e-03
Total CO2 (mol/kg) = 6.870e-03
Temperature (deg C) = 63.000
Electrical balance (eq) = 3.242e-03
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 3.20
Iterations = 8
Total H = 1.110179e+02
Total O = 5.560448e+01
---------------------------------Redox couples---------------------------------
Redox couple pe Eh (volts)
S(-2)/S(6) -3.6487 -0.2434
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 5.726e-07 4.419e-07 -6.242 -6.355 -0.112
H+ 2.963e-07 2.455e-07 -6.528 -6.610 -0.082
H2O 5.551e+01 9.985e-01 1.744 -0.001 0.000
C(4) 6.870e-03
HCO3- 4.711e-03 3.746e-03 -2.327 -2.426 -0.100
CO2 1.784e-03 1.814e-03 -2.749 -2.741 0.007
CaHCO3+ 2.347e-04 1.867e-04 -3.629 -3.729 -0.100
MgHCO3+ 6.578e-05 5.169e-05 -4.182 -4.287 -0.105
NaHCO3 5.046e-05 5.131e-05 -4.297 -4.290 0.007
CaCO3 1.560e-05 1.586e-05 -4.807 -4.800 0.007
NaCO3- 3.512e-06 2.760e-06 -5.454 -5.559 -0.105
CO3-2 2.780e-06 1.112e-06 -5.556 -5.954 -0.398
MgCO3 1.642e-06 1.670e-06 -5.784 -5.777 0.007
FeHCO3+ 1.177e-08 9.248e-09 -7.929 -8.034 -0.105
FeCO3 6.474e-10 6.583e-10 -9.189 -9.182 0.007
Ca 1.128e-02
Ca+2 7.217e-03 2.899e-03 -2.142 -2.538 -0.396
CaSO4 3.813e-03 3.877e-03 -2.419 -2.411 0.007
CaHCO3+ 2.347e-04 1.867e-04 -3.629 -3.729 -0.100
CaCO3 1.560e-05 1.586e-05 -4.807 -4.800 0.007
CaHSO4+ 1.322e-08 1.039e-08 -7.879 -7.983 -0.105
CaOH+ 2.491e-09 1.957e-09 -8.604 -8.708 -0.105
Cl 1.785e-02
Cl- 1.785e-02 1.381e-02 -1.748 -1.860 -0.111
FeCl+ 5.988e-10 4.706e-10 -9.223 -9.327 -0.105
Fe(2) 4.000e-07
Fe(HS)2 2.830e-07 2.878e-07 -6.548 -6.541 0.007
Fe+2 5.978e-08 2.468e-08 -7.223 -7.608 -0.384
FeSO4 3.911e-08 3.977e-08 -7.408 -7.400 0.007
FeHCO3+ 1.177e-08 9.248e-09 -7.929 -8.034 -0.105
Fe(HS)3- 4.561e-09 3.585e-09 -8.341 -8.446 -0.105
FeCO3 6.474e-10 6.583e-10 -9.189 -9.182 0.007
FeCl+ 5.988e-10 4.706e-10 -9.223 -9.327 -0.105
FeOH+ 5.014e-10 3.940e-10 -9.300 -9.404 -0.105
FeHSO4+ 1.125e-13 8.843e-14 -12.949 -13.053 -0.105
H(0) 1.190e-09
H2 5.948e-10 6.048e-10 -9.226 -9.218 0.007
K 2.540e-03
K+ 2.394e-03 1.852e-03 -2.621 -2.732 -0.111
KSO4- 1.459e-04 1.146e-04 -3.836 -3.941 -0.105
KOH 2.569e-11 2.613e-11 -10.590 -10.583 0.007
Mg 4.540e-03
MgSO4 2.360e-03 2.399e-03 -2.627 -2.620 0.007
Mg+2 2.113e-03 8.783e-04 -2.675 -3.056 -0.381
MgHCO3+ 6.578e-05 5.169e-05 -4.182 -4.287 -0.105
MgCO3 1.642e-06 1.670e-06 -5.784 -5.777 0.007
MgOH+ 3.463e-07 2.721e-07 -6.461 -6.565 -0.105
Na 3.189e-02
Na+ 3.090e-02 2.435e-02 -1.510 -1.613 -0.103
NaSO4- 9.408e-04 7.393e-04 -3.027 -3.131 -0.105
NaHCO3 5.046e-05 5.131e-05 -4.297 -4.290 0.007
NaCO3- 3.512e-06 2.760e-06 -5.454 -5.559 -0.105
NaOH 6.437e-10 6.545e-10 -9.191 -9.184 0.007
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -63.075 -63.067 0.007
S(-2) 2.600e-04
HS- 1.482e-04 1.144e-04 -3.829 -3.942 -0.112
H2S 1.112e-04 1.131e-04 -3.954 -3.947 0.007
Fe(HS)2 2.830e-07 2.878e-07 -6.548 -6.541 0.007
Fe(HS)3- 4.561e-09 3.585e-09 -8.341 -8.446 -0.105
S-2 1.449e-09 5.662e-10 -8.839 -9.247 -0.408
S(6) 1.986e-02
SO4-2 1.260e-02 4.892e-03 -1.900 -2.311 -0.411
CaSO4 3.813e-03 3.877e-03 -2.419 -2.411 0.007
MgSO4 2.360e-03 2.399e-03 -2.627 -2.620 0.007
NaSO4- 9.408e-04 7.393e-04 -3.027 -3.131 -0.105
KSO4- 1.459e-04 1.146e-04 -3.836 -3.941 -0.105
HSO4- 3.792e-07 2.980e-07 -6.421 -6.526 -0.105
FeSO4 3.911e-08 3.977e-08 -7.408 -7.400 0.007
CaHSO4+ 1.322e-08 1.039e-08 -7.879 -7.983 -0.105
FeHSO4+ 1.125e-13 8.843e-14 -12.949 -13.053 -0.105
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -0.14 -4.85 -4.71 CaSO4
Aragonite 0.18 -8.49 -8.67 CaCO3
Calcite 0.30 -8.49 -8.79 CaCO3
CH2O -14.59 -14.59 0.00 CH2O
CO2(g) -0.94 -2.74 -1.80 CO2
Dolomite 0.37 -17.50 -17.87 CaMg(CO3)2
FeS(ppt) -1.02 -4.94 -3.92 FeS
Gypsum -0.18 -4.85 -4.67 CaSO4:2H2O
H2(g) -5.92 -9.22 -3.30 H2
H2O(g) -0.64 -0.00 0.64 H2O
H2S(g) -2.57 -3.95 -1.38 H2S
Halite -5.13 -3.47 1.66 NaCl
Mackinawite -0.29 -4.94 -4.65 FeS
Melanterite -8.07 -9.92 -1.85 FeSO4:7H2O
O2(g) -59.95 -63.07 -3.11 O2
Pyrite 7.97 -9.57 -17.54 FeS2
Siderite -2.47 -13.56 -11.10 FeCO3
Sulfur -2.12 1.98 4.09 S
Sylvite -4.59 -4.59 0.00 KCl
-------------------------------------------
Beginning of inverse modeling calculations.
-------------------------------------------
Solution 1: Recharge number 3
Input Delta Input+Delta
pH 7.550e+00 + 0.000e+00 = 7.550e+00
Alkalinity 4.016e-03 + 0.000e+00 = 4.016e-03
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 4.300e-03 + 0.000e+00 = 4.300e-03
Ca 1.200e-03 + -5.306e-05 = 1.147e-03
Cl 2.000e-05 + 0.000e+00 = 2.000e-05
Fe(2) 1.000e-06 + 0.000e+00 = 1.000e-06
Fe(3) 0.000e+00 + 0.000e+00 = 0.000e+00
H(0) 0.000e+00 + 0.000e+00 = 0.000e+00
K 2.000e-05 + 0.000e+00 = 2.000e-05
Mg 1.010e-03 + 0.000e+00 = 1.010e-03
Na 2.000e-05 + 0.000e+00 = 2.000e-05
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 0.000e+00 + 0.000e+00 = 0.000e+00
S(6) 1.600e-04 + 0.000e+00 = 1.600e-04
X 0.000e+00 + 0.000e+00 = 0.000e+00
13C(-4) -7 + 0 = -7
13C(4) -7 + 0 = -7
34S(-2) 9.7 + 0 = 9.7
34S(6) 9.7 + 0 = 9.7
Solution 2: Mysse
Input Delta Input+Delta
pH 6.610e+00 + 0.000e+00 = 6.610e+00
Alkalinity 5.258e-03 + 0.000e+00 = 5.258e-03
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 6.870e-03 + 0.000e+00 = 6.870e-03
Ca 1.128e-02 + 0.000e+00 = 1.128e-02
Cl 1.785e-02 + 0.000e+00 = 1.785e-02
Fe(2) 4.000e-07 + 0.000e+00 = 4.000e-07
Fe(3) 0.000e+00 + 0.000e+00 = 0.000e+00
H(0) 1.190e-09 + 0.000e+00 = 1.190e-09
K 2.540e-03 + 0.000e+00 = 2.540e-03
Mg 4.540e-03 + 0.000e+00 = 4.540e-03
Na 3.189e-02 + -1.256e-03 = 3.063e-02
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 2.600e-04 + 0.000e+00 = 2.600e-04
S(6) 1.986e-02 + 9.930e-04 = 2.085e-02
X 0.000e+00 + 0.000e+00 = 0.000e+00
13C(-4) -2.3 + 0 = -2.3
13C(4) -2.3 + 0 = -2.3
34S(-2) -22.1 + 0 = -22.1
34S(6) 16.3 + 0 = 16.3
Isotopic composition of phases:
13C Dolomite 3 + 0 = 3
13C Calcite -1.5 + 0 = -1.5
34S Anhydrite 13.5 + -0.65116 = 12.8488
13C CH2O -25 + 3.56577 = -21.4342
34S Pyrite -22 + 2 = -20
Solution fractions: Minimum Maximum
Solution 1 1.000e+00 9.999e-01 1.000e+00
Solution 2 1.000e+00 1.000e+00 1.000e+00
Phase mole transfers: Minimum Maximum
Dolomite 1.118e-02 1.022e-02 1.193e-02 CaMg(CO3)2
Calcite -2.393e-02 -2.567e-02 -2.144e-02 CaCO3
Anhydrite 2.288e-02 2.076e-02 2.348e-02 CaSO4
CH2O 4.138e-03 3.003e-03 5.273e-03 CH2O
Goethite 9.642e-04 6.533e-04 1.275e-03 FeOOH
Pyrite -9.648e-04 -1.274e-03 -6.553e-04 FeS2
MgX2 -7.652e-03 -8.576e-03 -6.972e-03 MgX2
NaX 1.530e-02 1.394e-02 1.715e-02 NaX
Halite 1.531e-02 1.429e-02 1.633e-02 NaCl
Sylvite 2.520e-03 2.392e-03 2.648e-03 KCl
Redox mole transfers:
Fe(3) 9.642e-04
H(0) -1.190e-09
S(-2) -2.190e-03
Sum of residuals (epsilons in documentation): 2.684e+00
Sum of delta/uncertainty limit: 4.711e+00
Maximum fractional error in element concentration: 5.000e-02
Model contains minimum number of phases.
===============================================================================
Solution 1: Recharge number 3
Input Delta Input+Delta
pH 7.550e+00 + 0.000e+00 = 7.550e+00
Alkalinity 4.016e-03 + 1.061e-04 = 4.122e-03
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 4.300e-03 + 1.136e-04 = 4.414e-03
Ca 1.200e-03 + 0.000e+00 = 1.200e-03
Cl 2.000e-05 + 0.000e+00 = 2.000e-05
Fe(2) 1.000e-06 + 0.000e+00 = 1.000e-06
Fe(3) 0.000e+00 + 0.000e+00 = 0.000e+00
H(0) 0.000e+00 + 0.000e+00 = 0.000e+00
K 2.000e-05 + 0.000e+00 = 2.000e-05
Mg 1.010e-03 + 0.000e+00 = 1.010e-03
Na 2.000e-05 + 0.000e+00 = 2.000e-05
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 0.000e+00 + 0.000e+00 = 0.000e+00
S(6) 1.600e-04 + 0.000e+00 = 1.600e-04
X 0.000e+00 + 0.000e+00 = 0.000e+00
13C(-4) -7 + 0 = -7
13C(4) -7 + 0 = -7
34S(-2) 9.7 + 0 = 9.7
34S(6) 9.7 + 0 = 9.7
Solution 2: Mysse
Input Delta Input+Delta
pH 6.610e+00 + 5.872e-02 = 6.669e+00
Alkalinity 5.258e-03 + 0.000e+00 = 5.258e-03
C(-4) 0.000e+00 + 0.000e+00 = 0.000e+00
C(4) 6.870e-03 + -2.581e-04 = 6.612e-03
Ca 1.128e-02 + 0.000e+00 = 1.128e-02
Cl 1.785e-02 + 0.000e+00 = 1.785e-02
Fe(2) 4.000e-07 + 0.000e+00 = 4.000e-07
Fe(3) 0.000e+00 + 0.000e+00 = 0.000e+00
H(0) 1.190e-09 + 0.000e+00 = 1.190e-09
K 2.540e-03 + 0.000e+00 = 2.540e-03
Mg 4.540e-03 + 0.000e+00 = 4.540e-03
Na 3.189e-02 + -1.256e-03 = 3.063e-02
O(0) 0.000e+00 + 0.000e+00 = 0.000e+00
S(-2) 2.600e-04 + 0.000e+00 = 2.600e-04
S(6) 1.986e-02 + 9.930e-04 = 2.085e-02
X 0.000e+00 + 0.000e+00 = 0.000e+00
13C(-4) -2.3 + 0 = -2.3
13C(4) -2.3 + 0 = -2.3
34S(-2) -22.1 + 0 = -22.1
34S(6) 16.3 + 0 = 16.3
Isotopic composition of phases:
13C Dolomite 3 + 2 = 5
13C Calcite -1.5 + -1 = -2.5
34S Anhydrite 13.5 + -0.119926 = 13.3801
13C CH2O -25 + 5 = -20
34S Pyrite -22 + 2 = -20
Solution fractions: Minimum Maximum
Solution 1 1.000e+00 1.000e+00 1.000e+00
Solution 2 1.000e+00 1.000e+00 1.000e+00
Phase mole transfers: Minimum Maximum
Dolomite 5.443e-03 4.995e-03 5.838e-03 CaMg(CO3)2
Calcite -1.214e-02 -1.333e-02 -1.098e-02 CaCO3
Anhydrite 2.252e-02 2.076e-02 2.297e-02 CaSO4
CH2O 3.455e-03 3.003e-03 4.297e-03 CH2O
Goethite 7.821e-04 6.533e-04 1.015e-03 FeOOH
Pyrite -7.827e-04 -1.014e-03 -6.553e-04 FeS2
Ca.75Mg.25X2 -7.652e-03 -8.576e-03 -6.972e-03 Ca.75Mg.25X2
NaX 1.530e-02 1.394e-02 1.715e-02 NaX
Halite 1.531e-02 1.429e-02 1.633e-02 NaCl
Sylvite 2.520e-03 2.392e-03 2.648e-03 KCl
Redox mole transfers:
Fe(3) 7.821e-04
H(0) -1.190e-09
S(-2) -1.825e-03
Sum of residuals (epsilons in documentation): 4.207e+00
Sum of delta/uncertainty limit: 8.243e+00
Maximum fractional error in element concentration: 5.000e-02
Model contains minimum number of phases.
===============================================================================
Summary of inverse modeling:
Number of models found: 2
Number of minimal models found: 2
Number of infeasible sets of phases saved: 28
Number of calls to cl1: 80
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
-----------
End of run.
-----------
No memory leaks

0
Sun/examples/ex2.log Normal file
View File

4037
Sun/examples/ex2.out Normal file

File diff suppressed because it is too large Load Diff

53
Sun/examples/ex2.sel Normal file
View File

@ -0,0 +1,53 @@
sim state soln dist_x time step pH pe temp si_anhydrite si_gypsum
1 i_soln 1 -99 -99 -99 7 4 25.000 -999.9990 -999.9990
1 react 1 -99 0 1 7.06676 10.6862 25.000 -0.2197 0.0000
1 react 1 -99 0 2 7.05329 10.6168 26.000 -0.2157 0.0000
1 react 1 -99 0 3 7.03993 10.5719 27.000 -0.2115 0.0000
1 react 1 -99 0 4 7.02667 10.4793 28.000 -0.2071 0.0000
1 react 1 -99 0 5 7.01353 10.4109 29.000 -0.2025 0.0000
1 react 1 -99 0 6 7.00051 10.3439 30.000 -0.1977 0.0000
1 react 1 -99 0 7 6.9876 10.2766 31.000 -0.1928 0.0000
1 react 1 -99 0 8 6.97482 10.2099 32.000 -0.1877 0.0000
1 react 1 -99 0 9 6.96217 10.149 33.000 -0.1824 0.0000
1 react 1 -99 0 10 6.94965 10.0785 34.000 -0.1769 0.0000
1 react 1 -99 0 11 6.93726 10.0131 35.000 -0.1713 0.0000
1 react 1 -99 0 12 6.925 9.94603 36.000 -0.1655 0.0000
1 react 1 -99 0 13 6.91288 9.88397 37.000 -0.1595 0.0000
1 react 1 -99 0 14 6.90089 9.86516 38.000 -0.1533 0.0000
1 react 1 -99 0 15 6.88905 9.75536 39.000 -0.1470 0.0000
1 react 1 -99 0 16 6.87734 9.69233 40.000 -0.1406 0.0000
1 react 1 -99 0 17 6.86578 9.62865 41.000 -0.1340 0.0000
1 react 1 -99 0 18 6.85435 9.56448 42.000 -0.1272 0.0000
1 react 1 -99 0 19 6.84307 9.50323 43.000 -0.1203 0.0000
1 react 1 -99 0 20 6.83193 9.44484 44.000 -0.1132 0.0000
1 react 1 -99 0 21 6.82093 9.37869 45.000 -0.1060 0.0000
1 react 1 -99 0 22 6.81008 9.31598 46.000 -0.0986 0.0000
1 react 1 -99 0 23 6.79936 9.25548 47.000 -0.0911 0.0000
1 react 1 -99 0 24 6.78879 9.19236 48.000 -0.0835 0.0000
1 react 1 -99 0 25 6.77836 9.14193 49.000 -0.0757 0.0000
1 react 1 -99 0 26 6.76807 9.07059 50.000 -0.0678 0.0000
1 react 1 -99 0 27 6.75793 9.01241 51.000 -0.0597 0.0000
1 react 1 -99 0 28 6.74792 8.95269 52.000 -0.0515 0.0000
1 react 1 -99 0 29 6.73806 8.89104 53.000 -0.0432 0.0000
1 react 1 -99 0 30 6.72833 8.83437 54.000 -0.0347 0.0000
1 react 1 -99 0 31 6.71874 8.77256 55.000 -0.0261 0.0000
1 react 1 -99 0 32 6.7093 8.71589 56.000 -0.0174 0.0000
1 react 1 -99 0 33 6.69999 8.65867 57.000 -0.0085 0.0000
1 react 1 -99 0 34 6.69076 8.59025 58.000 0.0000 -0.0004
1 react 1 -99 0 35 6.68054 8.53312 59.000 0.0000 -0.0095
1 react 1 -99 0 36 6.67043 8.4773 60.000 0.0000 -0.0187
1 react 1 -99 0 37 6.66041 8.42236 61.000 0.0000 -0.0280
1 react 1 -99 0 38 6.65049 8.36458 62.000 0.0000 -0.0375
1 react 1 -99 0 39 6.64066 8.22145 63.000 0.0000 -0.0471
1 react 1 -99 0 40 6.63093 8.25388 64.000 0.0000 -0.0567
1 react 1 -99 0 41 6.62129 8.1986 65.000 0.0000 -0.0665
1 react 1 -99 0 42 6.61175 8.05474 66.000 0.0000 -0.0764
1 react 1 -99 0 43 6.6023 8.09202 67.000 0.0000 -0.0864
1 react 1 -99 0 44 6.59294 8.03836 68.000 0.0000 -0.0966
1 react 1 -99 0 45 6.58367 7.98491 69.000 0.0000 -0.1068
1 react 1 -99 0 46 6.57449 7.93039 70.000 0.0000 -0.1171
1 react 1 -99 0 47 6.5654 7.87729 71.000 0.0000 -0.1276
1 react 1 -99 0 48 6.55641 7.82446 72.000 0.0000 -0.1381
1 react 1 -99 0 49 6.5475 7.76904 73.000 0.0000 -0.1488
1 react 1 -99 0 50 6.53867 7.71679 74.000 0.0000 -0.1595
1 react 1 -99 0 51 6.52994 7.66434 75.000 0.0000 -0.1704

0
Sun/examples/ex3.log Normal file
View File

789
Sun/examples/ex3.out Normal file
View File

@ -0,0 +1,789 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex3
Output file: ex3.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 3, part A.--Calcite equilibrium at log Pco2 = -2.0 and 25C.
SOLUTION 1 Pure water
pH 7.0
temp 25.0
EQUILIBRIUM_PHASES
CO2(g) -2.0
Calcite 0.0
SAVE solution 1
END
-----
TITLE
-----
Example 3, part A.--Calcite equilibrium at log Pco2 = -2.0 and 25C.
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1. Pure water
-----------------------------Solution composition------------------------------
Elements Molality Moles
Pure water
----------------------------Description of solution----------------------------
pH = 7.000
pe = 4.000
Activity of water = 1.000
Ionic strength = 1.001e-07
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 1.082e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.082e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.05
Iterations = 0
Total H = 1.110124e+02
Total O = 5.550622e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.002e-07 1.001e-07 -6.999 -6.999 -0.000
H+ 1.001e-07 1.000e-07 -7.000 -7.000 -0.000
H2O 5.551e+01 1.000e+00 1.744 0.000 0.000
H(0) 1.416e-25
H2 7.079e-26 7.079e-26 -25.150 -25.150 0.000
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -42.080 -42.080 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -22.00 -25.15 -3.15 H2
H2O(g) -1.51 0.00 1.51 H2O
O2(g) -39.12 -42.08 -2.96 O2
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using solution 1. Pure water
Using pure phase assemblage 1.
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
Calcite 0.00 -8.48 -8.48 1.000e+01 9.998e+00 -1.646e-03
CO2(g) -2.00 -20.15 -18.15 1.000e+01 9.998e+00 -1.976e-03
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 3.622e-03 3.622e-03
Ca 1.646e-03 1.646e-03
----------------------------Description of solution----------------------------
pH = 7.297 Charge balance
pe = -0.987 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 4.826e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.291e-03
Total CO2 (mol/kg) = 3.622e-03
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.082e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 16
Total H = 1.110124e+02
Total O = 5.551511e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 2.137e-07 1.982e-07 -6.670 -6.703 -0.033
H+ 5.403e-08 5.050e-08 -7.267 -7.297 -0.029
H2O 5.551e+01 9.999e-01 1.744 -0.000 0.000
C(-4) 2.799e-30
CH4 2.799e-30 2.802e-30 -29.553 -29.552 0.000
C(4) 3.622e-03
HCO3- 3.224e-03 2.998e-03 -2.492 -2.523 -0.032
CO2 3.401e-04 3.405e-04 -3.468 -3.468 0.000
CaHCO3+ 4.894e-05 4.551e-05 -4.310 -4.342 -0.032
CaCO3 5.559e-06 5.565e-06 -5.255 -5.255 0.000
CO3-2 3.721e-06 2.784e-06 -5.429 -5.555 -0.126
Ca 1.646e-03
Ca+2 1.591e-03 1.190e-03 -2.798 -2.925 -0.126
CaHCO3+ 4.894e-05 4.551e-05 -4.310 -4.342 -0.032
CaCO3 5.559e-06 5.565e-06 -5.255 -5.255 0.000
CaOH+ 4.212e-09 3.910e-09 -8.376 -8.408 -0.032
H(0) 3.403e-16
H2 1.701e-16 1.703e-16 -15.769 -15.769 0.000
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -60.843 -60.843 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Aragonite -0.14 -8.48 -8.34 CaCO3
Calcite 0.00 -8.48 -8.48 CaCO3
CH4(g) -26.69 -29.55 -2.86 CH4
CO2(g) -2.00 -3.47 -1.47 CO2
H2(g) -12.62 -15.77 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
O2(g) -57.88 -60.84 -2.96 O2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
TITLE Example 3, part B.--Definition of seawater.
SOLUTION 2 Seawater
units ppm
pH 8.22
pe 8.451
density 1.023
temp 25.0
Ca 412.3
Mg 1291.8
Na 10768.0
K 399.1
Si 4.28
Cl 19353.0
Alkalinity 141.682 as HCO3
S(6) 2712.0
END
-----
TITLE
-----
Example 3, part B.--Definition of seawater.
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 2. Seawater
-----------------------------Solution composition------------------------------
Elements Molality Moles
Alkalinity 2.406e-03 2.406e-03
Ca 1.066e-02 1.066e-02
Cl 5.657e-01 5.657e-01
K 1.058e-02 1.058e-02
Mg 5.507e-02 5.507e-02
Na 4.854e-01 4.854e-01
S(6) 2.926e-02 2.926e-02
Si 7.382e-05 7.382e-05
----------------------------Description of solution----------------------------
pH = 8.220
pe = 8.451
Activity of water = 0.981
Ionic strength = 6.748e-01
Mass of water (kg) = 1.000e+00
Total carbon (mol/kg) = 2.180e-03
Total CO2 (mol/kg) = 2.180e-03
Temperature (deg C) = 25.000
Electrical balance (eq) = 7.967e-04
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.07
Iterations = 7
Total H = 1.110147e+02
Total O = 5.563008e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 2.674e-06 1.629e-06 -5.573 -5.788 -0.215
H+ 7.981e-09 6.026e-09 -8.098 -8.220 -0.122
H2O 5.551e+01 9.806e-01 1.744 -0.009 0.000
C(4) 2.180e-03
HCO3- 1.514e-03 1.023e-03 -2.820 -2.990 -0.170
MgHCO3+ 2.196e-04 1.640e-04 -3.658 -3.785 -0.127
NaHCO3 1.668e-04 1.948e-04 -3.778 -3.710 0.067
MgCO3 8.914e-05 1.041e-04 -4.050 -3.982 0.067
NaCO3- 6.719e-05 5.020e-05 -4.173 -4.299 -0.127
CaHCO3+ 4.598e-05 3.106e-05 -4.337 -4.508 -0.170
CO3-2 3.821e-05 7.960e-06 -4.418 -5.099 -0.681
CaCO3 2.725e-05 3.183e-05 -4.565 -4.497 0.067
CO2 1.210e-05 1.413e-05 -4.917 -4.850 0.067
Ca 1.066e-02
Ca+2 9.504e-03 2.380e-03 -2.022 -2.623 -0.601
CaSO4 1.083e-03 1.266e-03 -2.965 -2.898 0.067
CaHCO3+ 4.598e-05 3.106e-05 -4.337 -4.508 -0.170
CaCO3 2.725e-05 3.183e-05 -4.565 -4.497 0.067
CaOH+ 8.604e-08 6.429e-08 -7.065 -7.192 -0.127
CaHSO4+ 5.979e-11 4.467e-11 -10.223 -10.350 -0.127
Cl 5.657e-01
Cl- 5.657e-01 3.528e-01 -0.247 -0.452 -0.205
H(0) 5.515e-37
H2 2.757e-37 3.221e-37 -36.559 -36.492 0.067
K 1.058e-02
K+ 1.041e-02 6.495e-03 -1.982 -2.187 -0.205
KSO4- 1.627e-04 1.216e-04 -3.789 -3.915 -0.127
KOH 3.137e-09 3.665e-09 -8.503 -8.436 0.067
Mg 5.507e-02
Mg+2 4.742e-02 1.371e-02 -1.324 -1.863 -0.539
MgSO4 7.330e-03 8.562e-03 -2.135 -2.067 0.067
MgHCO3+ 2.196e-04 1.640e-04 -3.658 -3.785 -0.127
MgCO3 8.914e-05 1.041e-04 -4.050 -3.982 0.067
MgOH+ 1.084e-05 8.100e-06 -4.965 -5.092 -0.127
Na 4.854e-01
Na+ 4.791e-01 3.387e-01 -0.320 -0.470 -0.151
NaSO4- 6.053e-03 4.523e-03 -2.218 -2.345 -0.127
NaHCO3 1.668e-04 1.948e-04 -3.778 -3.710 0.067
NaCO3- 6.719e-05 5.020e-05 -4.173 -4.299 -0.127
NaOH 3.117e-07 3.641e-07 -6.506 -6.439 0.067
O(0) 6.614e-20
O2 3.307e-20 3.863e-20 -19.481 -19.413 0.067
S(6) 2.926e-02
SO4-2 1.463e-02 2.664e-03 -1.835 -2.574 -0.740
MgSO4 7.330e-03 8.562e-03 -2.135 -2.067 0.067
NaSO4- 6.053e-03 4.523e-03 -2.218 -2.345 -0.127
CaSO4 1.083e-03 1.266e-03 -2.965 -2.898 0.067
KSO4- 1.627e-04 1.216e-04 -3.789 -3.915 -0.127
HSO4- 2.089e-09 1.561e-09 -8.680 -8.807 -0.127
CaHSO4+ 5.979e-11 4.467e-11 -10.223 -10.350 -0.127
Si 7.382e-05
H4SiO4 7.110e-05 8.306e-05 -4.148 -4.081 0.067
H3SiO4- 2.720e-06 2.032e-06 -5.565 -5.692 -0.127
H2SiO4-2 7.362e-11 2.294e-11 -10.133 -10.639 -0.506
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -0.84 -5.20 -4.36 CaSO4
Aragonite 0.61 -7.72 -8.34 CaCO3
Calcite 0.76 -7.72 -8.48 CaCO3
Chalcedony -0.51 -4.06 -3.55 SiO2
Chrysotile 3.36 35.56 32.20 Mg3Si2O5(OH)4
CO2(g) -3.38 -4.85 -1.47 CO2
Dolomite 2.41 -14.68 -17.09 CaMg(CO3)2
Gypsum -0.63 -5.21 -4.58 CaSO4:2H2O
H2(g) -33.34 -36.49 -3.15 H2
H2O(g) -1.52 -0.01 1.51 H2O
Halite -2.50 -0.92 1.58 NaCl
O2(g) -16.45 -19.41 -2.96 O2
Quartz -0.08 -4.06 -3.98 SiO2
Sepiolite 1.16 16.92 15.76 Mg2Si3O7.5OH:3H2O
Sepiolite(d) -1.74 16.92 18.66 Mg2Si3O7.5OH:3H2O
SiO2(a) -1.35 -4.06 -2.71 SiO2
Talc 6.04 27.44 21.40 Mg3Si4O10(OH)2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 3.
------------------------------------
TITLE Example 3, part C.--Mix 70% ground water, 30% seawater.
MIX 1
1 0.7
2 0.3
SAVE solution 3
END
-----
TITLE
-----
Example 3, part C.--Mix 70% ground water, 30% seawater.
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using mix 1.
Mixture 1.
7.000e-01 Solution 1 Solution after simulation 1.
3.000e-01 Solution 2 Seawater
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 3.189e-03 3.189e-03
Ca 4.350e-03 4.350e-03
Cl 1.697e-01 1.697e-01
K 3.173e-03 3.173e-03
Mg 1.652e-02 1.652e-02
Na 1.456e-01 1.456e-01
S 8.777e-03 8.777e-03
Si 2.215e-05 2.215e-05
----------------------------Description of solution----------------------------
pH = 7.351 Charge balance
pe = -1.717 Adjusted to redox equilibrium
Activity of water = 0.994
Ionic strength = 2.087e-01
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.026e-03
Total CO2 (mol/kg) = 3.189e-03
Temperature (deg C) = 25.000
Electrical balance (eq) = 2.390e-04
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.06
Iterations = 13
Total H = 1.110131e+02
Total O = 5.554960e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 3.170e-07 2.231e-07 -6.499 -6.651 -0.153
H+ 5.603e-08 4.460e-08 -7.252 -7.351 -0.099
H2O 5.551e+01 9.941e-01 1.744 -0.003 0.000
C(-4) 4.007e-25
CH4 4.007e-25 4.204e-25 -24.397 -24.376 0.021
C(4) 3.189e-03
HCO3- 2.662e-03 1.980e-03 -2.575 -2.703 -0.129
CO2 1.904e-04 1.998e-04 -3.720 -3.699 0.021
MgHCO3+ 1.545e-04 1.151e-04 -3.811 -3.939 -0.128
NaHCO3 1.137e-04 1.192e-04 -3.944 -3.924 0.021
CaHCO3+ 4.245e-05 3.158e-05 -4.372 -4.501 -0.129
MgCO3 9.408e-06 9.871e-06 -5.027 -5.006 0.021
CO3-2 6.803e-06 2.082e-06 -5.167 -5.682 -0.514
NaCO3- 5.572e-06 4.151e-06 -5.254 -5.382 -0.128
CaCO3 4.166e-06 4.371e-06 -5.380 -5.359 0.021
Ca 4.350e-03
Ca+2 3.928e-03 1.250e-03 -2.406 -2.903 -0.497
CaSO4 3.753e-04 3.938e-04 -3.426 -3.405 0.021
CaHCO3+ 4.245e-05 3.158e-05 -4.372 -4.501 -0.129
CaCO3 4.166e-06 4.371e-06 -5.380 -5.359 0.021
CaOH+ 6.204e-09 4.622e-09 -8.207 -8.335 -0.128
CaHSO4+ 1.381e-10 1.029e-10 -9.860 -9.988 -0.128
Cl 1.697e-01
Cl- 1.697e-01 1.203e-01 -0.770 -0.920 -0.149
H(0) 7.279e-15
H2 3.640e-15 3.819e-15 -14.439 -14.418 0.021
K 3.173e-03
K+ 3.140e-03 2.226e-03 -2.503 -2.652 -0.149
KSO4- 3.316e-05 2.470e-05 -4.479 -4.607 -0.128
KOH 1.639e-10 1.720e-10 -9.785 -9.764 0.021
Mg 1.652e-02
Mg+2 1.460e-02 4.968e-03 -1.836 -2.304 -0.468
MgSO4 1.753e-03 1.839e-03 -2.756 -2.735 0.021
MgHCO3+ 1.545e-04 1.151e-04 -3.811 -3.939 -0.128
MgCO3 9.408e-06 9.871e-06 -5.027 -5.006 0.021
MgOH+ 5.396e-07 4.020e-07 -6.268 -6.396 -0.128
Na 1.456e-01
Na+ 1.444e-01 1.071e-01 -0.841 -0.970 -0.130
NaSO4- 1.138e-03 8.476e-04 -2.944 -3.072 -0.128
NaHCO3 1.137e-04 1.192e-04 -3.944 -3.924 0.021
NaCO3- 5.572e-06 4.151e-06 -5.254 -5.382 -0.128
NaOH 1.503e-08 1.577e-08 -7.823 -7.802 0.021
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -63.570 -63.549 0.021
S(-2) 4.890e-22
HS- 3.876e-22 2.728e-22 -21.412 -21.564 -0.153
H2S 1.014e-22 1.064e-22 -21.994 -21.973 0.021
S-2 2.513e-27 7.386e-28 -26.600 -27.132 -0.532
S(6) 8.777e-03
SO4-2 5.478e-03 1.579e-03 -2.261 -2.802 -0.540
MgSO4 1.753e-03 1.839e-03 -2.756 -2.735 0.021
NaSO4- 1.138e-03 8.476e-04 -2.944 -3.072 -0.128
CaSO4 3.753e-04 3.938e-04 -3.426 -3.405 0.021
KSO4- 3.316e-05 2.470e-05 -4.479 -4.607 -0.128
HSO4- 9.193e-09 6.849e-09 -8.037 -8.164 -0.128
CaHSO4+ 1.381e-10 1.029e-10 -9.860 -9.988 -0.128
Si 2.215e-05
H4SiO4 2.204e-05 2.313e-05 -4.657 -4.636 0.021
H3SiO4- 1.026e-07 7.646e-08 -6.989 -7.117 -0.128
H2SiO4-2 3.784e-13 1.166e-13 -12.422 -12.933 -0.511
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -1.34 -5.70 -4.36 CaSO4
Aragonite -0.25 -8.58 -8.34 CaCO3
Calcite -0.10 -8.58 -8.48 CaCO3
CH4(g) -21.52 -24.38 -2.86 CH4
Chalcedony -1.08 -4.63 -3.55 SiO2
Chrysotile -4.28 27.92 32.20 Mg3Si2O5(OH)4
CO2(g) -2.23 -3.70 -1.47 CO2
Dolomite 0.52 -16.57 -17.09 CaMg(CO3)2
Gypsum -1.13 -5.71 -4.58 CaSO4:2H2O
H2(g) -11.27 -14.42 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -20.98 -21.97 -1.00 H2S
Halite -3.47 -1.89 1.58 NaCl
O2(g) -60.59 -63.55 -2.96 O2
Quartz -0.65 -4.63 -3.98 SiO2
Sepiolite -4.87 10.89 15.76 Mg2Si3O7.5OH:3H2O
Sepiolite(d) -7.77 10.89 18.66 Mg2Si3O7.5OH:3H2O
SiO2(a) -1.92 -4.63 -2.71 SiO2
Sulfur -15.59 -10.71 4.88 S
Talc -2.74 18.66 21.40 Mg3Si4O10(OH)2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 4.
------------------------------------
TITLE Example 3, part D.--Equilibrate mixture with calcite and dolomite.
EQUILIBRIUM_PHASES 1
Calcite 0.0
Dolomite 0.0
USE solution 3
END
-----
TITLE
-----
Example 3, part D.--Equilibrate mixture with calcite and dolomite.
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using solution 3. Solution after simulation 3.
Using pure phase assemblage 1.
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
Calcite 0.00 -8.48 -8.48 1.000e+01 9.984e+00 -1.571e-02
Dolomite 0.00 -17.09 -17.09 1.000e+01 1.001e+01 7.935e-03
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 3.029e-03 3.029e-03
Ca 1.213e-02 1.212e-02
Cl 1.697e-01 1.697e-01
K 3.173e-03 3.173e-03
Mg 8.585e-03 8.585e-03
Na 1.456e-01 1.456e-01
S 8.777e-03 8.777e-03
Si 2.215e-05 2.215e-05
----------------------------Description of solution----------------------------
pH = 7.056 Charge balance
pe = -1.421 Adjusted to redox equilibrium
Activity of water = 0.994
Ionic strength = 2.087e-01
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 2.704e-03
Total CO2 (mol/kg) = 3.029e-03
Temperature (deg C) = 25.000
Electrical balance (eq) = 2.390e-04
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.06
Iterations = 5
Total H = 1.110131e+02
Total O = 5.554912e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.609e-07 1.132e-07 -6.793 -6.946 -0.153
H+ 1.104e-07 8.788e-08 -6.957 -7.056 -0.099
H2O 5.551e+01 9.941e-01 1.744 -0.003 0.000
C(-4) 6.977e-25
CH4 6.977e-25 7.320e-25 -24.156 -24.135 0.021
C(4) 3.029e-03
HCO3- 2.397e-03 1.783e-03 -2.620 -2.749 -0.129
CO2 3.377e-04 3.543e-04 -3.471 -3.451 0.021
CaHCO3+ 1.065e-04 7.920e-05 -3.973 -4.101 -0.129
NaHCO3 1.023e-04 1.073e-04 -3.990 -3.969 0.021
MgHCO3+ 7.221e-05 5.380e-05 -4.141 -4.269 -0.128
CaCO3 5.304e-06 5.565e-06 -5.275 -5.255 0.021
CO3-2 3.109e-06 9.513e-07 -5.507 -6.022 -0.514
NaCO3- 2.546e-06 1.897e-06 -5.594 -5.722 -0.128
MgCO3 2.232e-06 2.341e-06 -5.651 -5.631 0.021
Ca 1.213e-02
Ca+2 1.095e-02 3.482e-03 -1.961 -2.458 -0.497
CaSO4 1.067e-03 1.119e-03 -2.972 -2.951 0.021
CaHCO3+ 1.065e-04 7.920e-05 -3.973 -4.101 -0.129
CaCO3 5.304e-06 5.565e-06 -5.275 -5.255 0.021
CaOH+ 8.774e-09 6.537e-09 -8.057 -8.185 -0.128
CaHSO4+ 7.734e-10 5.762e-10 -9.112 -9.239 -0.128
Cl 1.697e-01
Cl- 1.697e-01 1.203e-01 -0.770 -0.920 -0.149
H(0) 7.246e-15
H2 3.623e-15 3.801e-15 -14.441 -14.420 0.021
K 3.173e-03
K+ 3.140e-03 2.225e-03 -2.503 -2.653 -0.149
KSO4- 3.381e-05 2.519e-05 -4.471 -4.599 -0.128
KOH 8.319e-11 8.729e-11 -10.080 -10.059 0.021
Mg 8.585e-03
Mg+2 7.582e-03 2.579e-03 -2.120 -2.588 -0.468
MgSO4 9.283e-04 9.740e-04 -3.032 -3.011 0.021
MgHCO3+ 7.221e-05 5.380e-05 -4.141 -4.269 -0.128
MgCO3 2.232e-06 2.341e-06 -5.651 -5.631 0.021
MgOH+ 1.422e-07 1.059e-07 -6.847 -6.975 -0.128
Na 1.456e-01
Na+ 1.444e-01 1.071e-01 -0.841 -0.970 -0.130
NaSO4- 1.160e-03 8.644e-04 -2.935 -3.063 -0.128
NaHCO3 1.023e-04 1.073e-04 -3.990 -3.969 0.021
NaCO3- 2.546e-06 1.897e-06 -5.594 -5.722 -0.128
NaOH 7.627e-09 8.002e-09 -8.118 -8.097 0.021
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -63.566 -63.545 0.021
S(-2) 1.159e-21
HS- 7.648e-22 5.382e-22 -21.116 -21.269 -0.153
H2S 3.941e-22 4.136e-22 -21.404 -21.383 0.021
S-2 2.517e-27 7.397e-28 -26.599 -27.131 -0.532
S(6) 8.777e-03
SO4-2 5.588e-03 1.611e-03 -2.253 -2.793 -0.540
NaSO4- 1.160e-03 8.644e-04 -2.935 -3.063 -0.128
CaSO4 1.067e-03 1.119e-03 -2.972 -2.951 0.021
MgSO4 9.283e-04 9.740e-04 -3.032 -3.011 0.021
KSO4- 3.381e-05 2.519e-05 -4.471 -4.599 -0.128
HSO4- 1.847e-08 1.376e-08 -7.733 -7.861 -0.128
CaHSO4+ 7.734e-10 5.762e-10 -9.112 -9.239 -0.128
Si 2.215e-05
H4SiO4 2.210e-05 2.318e-05 -4.656 -4.635 0.021
H3SiO4- 5.221e-08 3.890e-08 -7.282 -7.410 -0.128
H2SiO4-2 9.772e-14 3.011e-14 -13.010 -13.521 -0.511
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -0.89 -5.25 -4.36 CaSO4
Aragonite -0.14 -8.48 -8.34 CaCO3
Calcite 0.00 -8.48 -8.48 CaCO3
CH4(g) -21.28 -24.14 -2.86 CH4
Chalcedony -1.08 -4.63 -3.55 SiO2
Chrysotile -6.90 25.30 32.20 Mg3Si2O5(OH)4
CO2(g) -1.98 -3.45 -1.47 CO2
Dolomite 0.00 -17.09 -17.09 CaMg(CO3)2
Gypsum -0.68 -5.26 -4.58 CaSO4:2H2O
H2(g) -11.27 -14.42 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -20.39 -21.38 -1.00 H2S
Halite -3.47 -1.89 1.58 NaCl
O2(g) -60.58 -63.54 -2.96 O2
Quartz -0.65 -4.63 -3.98 SiO2
Sepiolite -6.62 9.14 15.76 Mg2Si3O7.5OH:3H2O
Sepiolite(d) -9.52 9.14 18.66 Mg2Si3O7.5OH:3H2O
SiO2(a) -1.92 -4.63 -2.71 SiO2
Sulfur -15.00 -10.11 4.88 S
Talc -5.36 16.04 21.40 Mg3Si4O10(OH)2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 5.
------------------------------------
TITLE Example 3, part E.--Equilibrate mixture with calcite only.
EQUILIBRIUM_PHASES 2
Calcite 0.0
USE solution 3
END
-----
TITLE
-----
Example 3, part E.--Equilibrate mixture with calcite only.
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using solution 3. Solution after simulation 3.
Using pure phase assemblage 2.
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
Calcite 0.00 -8.48 -8.48 1.000e+01 1.000e+01 -3.992e-05
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 3.229e-03 3.229e-03
Ca 4.390e-03 4.390e-03
Cl 1.697e-01 1.697e-01
K 3.173e-03 3.173e-03
Mg 1.652e-02 1.652e-02
Na 1.456e-01 1.456e-01
S 8.777e-03 8.777e-03
Si 2.215e-05 2.215e-05
----------------------------Description of solution----------------------------
pH = 7.442 Charge balance
pe = -1.861 Adjusted to redox equilibrium
Activity of water = 0.994
Ionic strength = 2.088e-01
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 3.106e-03
Total CO2 (mol/kg) = 3.229e-03
Temperature (deg C) = 25.000
Electrical balance (eq) = 2.390e-04
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.06
Iterations = 6
Total H = 1.110131e+02
Total O = 5.554972e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 3.915e-07 2.755e-07 -6.407 -6.560 -0.153
H+ 4.537e-08 3.612e-08 -7.343 -7.442 -0.099
H2O 5.551e+01 9.941e-01 1.744 -0.003 0.000
C(-4) 8.842e-25
CH4 8.842e-25 9.278e-25 -24.053 -24.033 0.021
C(4) 3.229e-03
HCO3- 2.721e-03 2.024e-03 -2.565 -2.694 -0.129
MgHCO3+ 1.579e-04 1.176e-04 -3.802 -3.930 -0.128
CO2 1.576e-04 1.653e-04 -3.803 -3.782 0.021
NaHCO3 1.161e-04 1.219e-04 -3.935 -3.914 0.021
CaHCO3+ 4.376e-05 3.255e-05 -4.359 -4.487 -0.129
MgCO3 1.187e-05 1.245e-05 -4.926 -4.905 0.021
CO3-2 8.587e-06 2.628e-06 -5.066 -5.580 -0.514
NaCO3- 7.033e-06 5.240e-06 -5.153 -5.281 -0.128
CaCO3 5.304e-06 5.565e-06 -5.275 -5.255 0.021
Ca 4.390e-03
Ca+2 3.963e-03 1.261e-03 -2.402 -2.899 -0.497
CaSO4 3.784e-04 3.971e-04 -3.422 -3.401 0.021
CaHCO3+ 4.376e-05 3.255e-05 -4.359 -4.487 -0.129
CaCO3 5.304e-06 5.565e-06 -5.275 -5.255 0.021
CaOH+ 7.728e-09 5.758e-09 -8.112 -8.240 -0.128
CaHSO4+ 1.128e-10 8.402e-11 -9.948 -10.076 -0.128
Cl 1.697e-01
Cl- 1.697e-01 1.203e-01 -0.770 -0.920 -0.149
H(0) 9.302e-15
H2 4.651e-15 4.880e-15 -14.332 -14.312 0.021
K 3.173e-03
K+ 3.140e-03 2.226e-03 -2.503 -2.652 -0.149
KSO4- 3.314e-05 2.469e-05 -4.480 -4.607 -0.128
KOH 2.025e-10 2.124e-10 -9.694 -9.673 0.021
Mg 1.652e-02
Mg+2 1.460e-02 4.966e-03 -1.836 -2.304 -0.468
MgSO4 1.752e-03 1.838e-03 -2.757 -2.736 0.021
MgHCO3+ 1.579e-04 1.176e-04 -3.802 -3.930 -0.128
MgCO3 1.187e-05 1.245e-05 -4.926 -4.905 0.021
MgOH+ 6.661e-07 4.963e-07 -6.176 -6.304 -0.128
Na 1.456e-01
Na+ 1.444e-01 1.071e-01 -0.841 -0.970 -0.130
NaSO4- 1.137e-03 8.472e-04 -2.944 -3.072 -0.128
NaHCO3 1.161e-04 1.219e-04 -3.935 -3.914 0.021
NaCO3- 7.033e-06 5.240e-06 -5.153 -5.281 -0.128
NaOH 1.856e-08 1.947e-08 -7.731 -7.711 0.021
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -63.783 -63.762 0.021
S(-2) 1.014e-21
HS- 8.367e-22 5.888e-22 -21.077 -21.230 -0.153
H2S 1.772e-22 1.860e-22 -21.751 -21.731 0.021
S-2 6.701e-27 1.969e-27 -26.174 -26.706 -0.532
S(6) 8.777e-03
SO4-2 5.477e-03 1.579e-03 -2.261 -2.802 -0.540
MgSO4 1.752e-03 1.838e-03 -2.757 -2.736 0.021
NaSO4- 1.137e-03 8.472e-04 -2.944 -3.072 -0.128
CaSO4 3.784e-04 3.971e-04 -3.422 -3.401 0.021
KSO4- 3.314e-05 2.469e-05 -4.480 -4.607 -0.128
HSO4- 7.441e-09 5.544e-09 -8.128 -8.256 -0.128
CaHSO4+ 1.128e-10 8.402e-11 -9.948 -10.076 -0.128
Si 2.215e-05
H4SiO4 2.202e-05 2.311e-05 -4.657 -4.636 0.021
H3SiO4- 1.266e-07 9.432e-08 -6.898 -7.025 -0.128
H2SiO4-2 5.766e-13 1.776e-13 -12.239 -12.750 -0.511
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -1.34 -5.70 -4.36 CaSO4
Aragonite -0.14 -8.48 -8.34 CaCO3
Calcite 0.00 -8.48 -8.48 CaCO3
CH4(g) -21.17 -24.03 -2.86 CH4
Chalcedony -1.08 -4.63 -3.55 SiO2
Chrysotile -3.73 28.47 32.20 Mg3Si2O5(OH)4
CO2(g) -2.31 -3.78 -1.47 CO2
Dolomite 0.73 -16.36 -17.09 CaMg(CO3)2
Gypsum -1.13 -5.71 -4.58 CaSO4:2H2O
H2(g) -11.16 -14.31 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -20.73 -21.73 -1.00 H2S
Halite -3.47 -1.89 1.58 NaCl
O2(g) -60.80 -63.76 -2.96 O2
Quartz -0.65 -4.63 -3.98 SiO2
Sepiolite -4.51 11.25 15.76 Mg2Si3O7.5OH:3H2O
Sepiolite(d) -7.41 11.25 18.66 Mg2Si3O7.5OH:3H2O
SiO2(a) -1.92 -4.63 -2.71 SiO2
Sulfur -15.45 -10.57 4.88 S
Talc -2.19 19.21 21.40 Mg3Si4O10(OH)2
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 6.
------------------------------------
-----------
End of run.
-----------
No memory leaks

0
Sun/examples/ex4.log Normal file
View File

478
Sun/examples/ex4.out Normal file
View File

@ -0,0 +1,478 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex4
Output file: ex4.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 4a.--Rain water evaporation
SOLUTION 1 Precipitation from Central Oklahoma
units mg/L
pH 4.5 # estimated
temp 25.0
Ca .384
Mg .043
Na .141
K .036
Cl .236
C(4) .1 CO2(g) -3.5
S(6) 1.3
N(-3) .208
N(5) .237
REACTION 1
H2O -1.0
52.73 moles
SAVE solution 2
END
-----
TITLE
-----
Example 4a.--Rain water evaporation
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1. Precipitation from Central Oklahoma
-----------------------------Solution composition------------------------------
Elements Molality Moles
C(4) 1.092e-05 1.092e-05 Equilibrium with CO2(g)
Ca 9.581e-06 9.581e-06
Cl 6.657e-06 6.657e-06
K 9.207e-07 9.207e-07
Mg 1.769e-06 1.769e-06
N(-3) 1.485e-05 1.485e-05
N(5) 1.692e-05 1.692e-05
Na 6.133e-06 6.133e-06
S(6) 1.353e-05 1.353e-05
----------------------------Description of solution----------------------------
pH = 4.500
pe = 4.000
Activity of water = 1.000
Ionic strength = 8.838e-05
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = -3.185e-05
Total CO2 (mol/kg) = 1.092e-05
Temperature (deg C) = 25.000
Electrical balance (eq) = 2.581e-05
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 20.29
Iterations = 3
Total H = 1.110125e+02
Total O = 5.550634e+01
---------------------------------Redox couples---------------------------------
Redox couple pe Eh (volts)
N(-3)/N(5) 9.2667 0.5482
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
H+ 3.196e-05 3.162e-05 -4.495 -4.500 -0.005
OH- 3.200e-10 3.166e-10 -9.495 -9.500 -0.005
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
C(4) 1.092e-05
CO2 1.077e-05 1.077e-05 -4.968 -4.968 0.000
HCO3- 1.531e-07 1.514e-07 -6.815 -6.820 -0.005
CaHCO3+ 1.787e-11 1.768e-11 -10.748 -10.753 -0.005
MgHCO3+ 3.025e-12 2.992e-12 -11.519 -11.524 -0.005
NaHCO3 5.166e-13 5.166e-13 -12.287 -12.287 0.000
CO3-2 2.345e-13 2.246e-13 -12.630 -12.649 -0.019
CaCO3 3.452e-15 3.452e-15 -14.462 -14.462 0.000
MgCO3 3.619e-16 3.619e-16 -15.441 -15.441 0.000
NaCO3- 2.565e-17 2.537e-17 -16.591 -16.596 -0.005
Ca 9.581e-06
Ca+2 9.557e-06 9.151e-06 -5.020 -5.039 -0.019
CaSO4 2.353e-08 2.353e-08 -7.628 -7.628 0.000
CaHCO3+ 1.787e-11 1.768e-11 -10.748 -10.753 -0.005
CaHSO4+ 4.408e-12 4.360e-12 -11.356 -11.361 -0.005
CaOH+ 4.855e-14 4.803e-14 -13.314 -13.319 -0.005
CaCO3 3.452e-15 3.452e-15 -14.462 -14.462 0.000
Cl 6.657e-06
Cl- 6.657e-06 6.585e-06 -5.177 -5.181 -0.005
H(0) 1.416e-20
H2 7.079e-21 7.079e-21 -20.150 -20.150 0.000
K 9.207e-07
K+ 9.206e-07 9.106e-07 -6.036 -6.041 -0.005
KSO4- 8.337e-11 8.247e-11 -10.079 -10.084 -0.005
KOH 9.984e-17 9.985e-17 -16.001 -16.001 0.000
Mg 1.769e-06
Mg+2 1.764e-06 1.689e-06 -5.754 -5.772 -0.019
MgSO4 5.103e-09 5.103e-09 -8.292 -8.292 0.000
MgHCO3+ 3.025e-12 2.992e-12 -11.519 -11.524 -0.005
MgOH+ 1.960e-13 1.939e-13 -12.708 -12.712 -0.005
MgCO3 3.619e-16 3.619e-16 -15.441 -15.441 0.000
N(-3) 1.485e-05
NH4+ 1.485e-05 1.469e-05 -4.828 -4.833 -0.005
NH4SO4- 2.465e-09 2.438e-09 -8.608 -8.613 -0.005
NH3 2.646e-10 2.647e-10 -9.577 -9.577 0.000
N(5) 1.692e-05
NO3- 1.692e-05 1.674e-05 -4.772 -4.776 -0.005
Na 6.133e-06
Na+ 6.133e-06 6.066e-06 -5.212 -5.217 -0.005
NaSO4- 3.962e-10 3.919e-10 -9.402 -9.407 -0.005
NaHCO3 5.166e-13 5.166e-13 -12.287 -12.287 0.000
NaOH 1.267e-15 1.267e-15 -14.897 -14.897 0.000
NaCO3- 2.565e-17 2.537e-17 -16.591 -16.596 -0.005
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -52.080 -52.080 0.000
S(6) 1.353e-05
SO4-2 1.346e-05 1.289e-05 -4.871 -4.890 -0.019
HSO4- 4.006e-08 3.963e-08 -7.397 -7.402 -0.005
CaSO4 2.353e-08 2.353e-08 -7.628 -7.628 0.000
MgSO4 5.103e-09 5.103e-09 -8.292 -8.292 0.000
NH4SO4- 2.465e-09 2.438e-09 -8.608 -8.613 -0.005
NaSO4- 3.962e-10 3.919e-10 -9.402 -9.407 -0.005
KSO4- 8.337e-11 8.247e-11 -10.079 -10.084 -0.005
CaHSO4+ 4.408e-12 4.360e-12 -11.356 -11.361 -0.005
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -5.57 -9.93 -4.36 CaSO4
Aragonite -9.35 -17.69 -8.34 CaCO3
Calcite -9.21 -17.69 -8.48 CaCO3
CO2(g) -3.50 -4.97 -1.47 CO2
Dolomite -19.02 -36.11 -17.09 CaMg(CO3)2
Gypsum -5.35 -9.93 -4.58 CaSO4:2H2O
H2(g) -17.00 -20.15 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
Halite -11.98 -10.40 1.58 NaCl
NH3(g) -11.35 -9.58 1.77 NH3
O2(g) -49.12 -52.08 -2.96 O2
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using solution 1. Precipitation from Central Oklahoma
Using reaction 1.
Reaction 1. Irreversible reaction defined in simulation 1.
5.273e+01 moles of the following reaction have been added:
Relative
Reactant moles
H2O -1.00
Relative
Element moles
H -2.00
O -1.00
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 2.183e-04 1.092e-05
Ca 1.916e-04 9.581e-06
Cl 1.331e-04 6.657e-06
K 1.841e-05 9.207e-07
Mg 3.536e-05 1.769e-06
N 6.352e-04 3.177e-05
Na 1.226e-04 6.133e-06
S 2.706e-04 1.353e-05
----------------------------Description of solution----------------------------
pH = 3.148 Charge balance
pe = 16.530 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 1.528e-03
Mass of water (kg) = 5.002e-02
Total alkalinity (eq/kg) = -7.555e-04
Total CO2 (mol/kg) = 2.183e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = 2.581e-05
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 24.31
Iterations = 20
Total H = 5.552525e+00
Total O = 2.776344e+00
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
H+ 7.406e-04 7.108e-04 -3.130 -3.148 -0.018
OH- 1.472e-11 1.408e-11 -10.832 -10.851 -0.019
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
C(-4) 0.000e+00
CH4 0.000e+00 0.000e+00 -136.693 -136.693 0.000
C(4) 2.183e-04
CO2 2.182e-04 2.182e-04 -3.661 -3.661 0.000
HCO3- 1.425e-07 1.366e-07 -6.846 -6.865 -0.019
CaHCO3+ 2.834e-10 2.715e-10 -9.548 -9.566 -0.019
MgHCO3+ 4.780e-11 4.576e-11 -10.321 -10.340 -0.019
NaHCO3 9.005e-12 9.008e-12 -11.046 -11.045 0.000
CO3-2 1.070e-14 9.010e-15 -13.971 -14.045 -0.074
CaCO3 2.358e-15 2.359e-15 -14.627 -14.627 0.000
MgCO3 2.461e-16 2.462e-16 -15.609 -15.609 0.000
NaCO3- 2.056e-17 1.968e-17 -16.687 -16.706 -0.019
Ca 1.916e-04
Ca+2 1.851e-04 1.559e-04 -3.733 -3.807 -0.075
CaSO4 6.474e-06 6.477e-06 -5.189 -5.189 0.000
CaHSO4+ 2.817e-08 2.697e-08 -7.550 -7.569 -0.019
CaHCO3+ 2.834e-10 2.715e-10 -9.548 -9.566 -0.019
CaOH+ 3.801e-14 3.639e-14 -13.420 -13.439 -0.019
CaCO3 2.358e-15 2.359e-15 -14.627 -14.627 0.000
Cl 1.331e-04
Cl- 1.331e-04 1.274e-04 -3.876 -3.895 -0.019
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -42.506 -42.506 0.000
K 1.841e-05
K+ 1.838e-05 1.759e-05 -4.736 -4.755 -0.019
KSO4- 2.689e-08 2.575e-08 -7.570 -7.589 -0.019
KOH 8.579e-17 8.582e-17 -16.067 -16.066 0.000
Mg 3.536e-05
Mg+2 3.396e-05 2.864e-05 -4.469 -4.543 -0.074
MgSO4 1.398e-06 1.398e-06 -5.855 -5.854 0.000
MgHCO3+ 4.780e-11 4.576e-11 -10.321 -10.340 -0.019
MgOH+ 1.528e-13 1.463e-13 -12.816 -12.835 -0.019
MgCO3 2.461e-16 2.462e-16 -15.609 -15.609 0.000
N(-3) 0.000e+00
NH4+ 0.000e+00 0.000e+00 -48.438 -48.457 -0.019
NH4SO4- 0.000e+00 0.000e+00 -51.009 -51.028 -0.019
NH3 0.000e+00 0.000e+00 -54.553 -54.553 0.000
N(0) 4.751e-04
N2 2.375e-04 2.376e-04 -3.624 -3.624 0.000
N(3) 2.623e-15
NO2- 2.623e-15 2.510e-15 -14.581 -14.600 -0.019
N(5) 1.601e-04
NO3- 1.601e-04 1.532e-04 -3.796 -3.815 -0.019
Na 1.226e-04
Na+ 1.225e-04 1.173e-04 -3.912 -3.931 -0.019
NaSO4- 1.279e-07 1.224e-07 -6.893 -6.912 -0.019
NaHCO3 9.005e-12 9.008e-12 -11.046 -11.045 0.000
NaOH 1.090e-15 1.090e-15 -14.963 -14.962 0.000
NaCO3- 2.056e-17 1.968e-17 -16.687 -16.706 -0.019
O(0) 8.553e-08
O2 4.277e-08 4.278e-08 -7.369 -7.369 0.000
S(-2) 0.000e+00
H2S 0.000e+00 0.000e+00 -126.809 -126.809 0.000
HS- 0.000e+00 0.000e+00 -130.583 -130.602 -0.019
S-2 0.000e+00 0.000e+00 -140.297 -140.372 -0.075
S(6) 2.706e-04
SO4-2 2.475e-04 2.083e-04 -3.606 -3.681 -0.075
HSO4- 1.503e-05 1.439e-05 -4.823 -4.842 -0.019
CaSO4 6.474e-06 6.477e-06 -5.189 -5.189 0.000
MgSO4 1.398e-06 1.398e-06 -5.855 -5.854 0.000
NaSO4- 1.279e-07 1.224e-07 -6.893 -6.912 -0.019
CaHSO4+ 2.817e-08 2.697e-08 -7.550 -7.569 -0.019
KSO4- 2.689e-08 2.575e-08 -7.570 -7.589 -0.019
NH4SO4- 0.000e+00 0.000e+00 -51.009 -51.028 -0.019
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -3.13 -7.49 -4.36 CaSO4
Aragonite -9.52 -17.85 -8.34 CaCO3
Calcite -9.37 -17.85 -8.48 CaCO3
CH4(g) -133.83 -136.69 -2.86 CH4
CO2(g) -2.19 -3.66 -1.47 CO2
Dolomite -19.35 -36.44 -17.09 CaMg(CO3)2
Gypsum -2.91 -7.49 -4.58 CaSO4:2H2O
H2(g) -39.36 -42.51 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -125.81 -126.81 -1.00 H2S
Halite -9.41 -7.83 1.58 NaCl
N2(g) -0.36 -3.62 -3.26 N2
NH3(g) -56.32 -54.55 1.77 NH3
O2(g) -4.41 -7.37 -2.96 O2
Sulfur -92.34 -87.45 4.88 S
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
TITLE Example 4b.--Factor of 20 more solution
MIX
2 20.
SAVE solution 3
END
-----
TITLE
-----
Example 4b.--Factor of 20 more solution
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using mix 1.
Mixture 1.
2.000e+01 Solution 2 Solution after simulation 1.
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 2.183e-04 2.184e-04
Ca 1.916e-04 1.916e-04
Cl 1.331e-04 1.331e-04
K 1.841e-05 1.841e-05
Mg 3.536e-05 3.537e-05
N 6.352e-04 6.354e-04
Na 1.226e-04 1.227e-04
S 2.706e-04 2.707e-04
----------------------------Description of solution----------------------------
pH = 3.148 Charge balance
pe = 16.530 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 1.528e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = -7.555e-04
Total CO2 (mol/kg) = 2.183e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = 5.162e-04
Percent error, 100*(Cat-|An|)/(Cat+|An|) = 24.31
Iterations = 0
Total H = 1.110505e+02
Total O = 5.552687e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
H+ 7.406e-04 7.108e-04 -3.130 -3.148 -0.018
OH- 1.472e-11 1.408e-11 -10.832 -10.851 -0.019
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
C(-4) 0.000e+00
CH4 0.000e+00 0.000e+00 -136.693 -136.693 0.000
C(4) 2.183e-04
CO2 2.182e-04 2.182e-04 -3.661 -3.661 0.000
HCO3- 1.425e-07 1.366e-07 -6.846 -6.865 -0.019
CaHCO3+ 2.834e-10 2.715e-10 -9.548 -9.566 -0.019
MgHCO3+ 4.780e-11 4.576e-11 -10.321 -10.340 -0.019
NaHCO3 9.005e-12 9.008e-12 -11.046 -11.045 0.000
CO3-2 1.070e-14 9.010e-15 -13.971 -14.045 -0.074
CaCO3 2.358e-15 2.359e-15 -14.627 -14.627 0.000
MgCO3 2.461e-16 2.462e-16 -15.609 -15.609 0.000
NaCO3- 2.056e-17 1.968e-17 -16.687 -16.706 -0.019
Ca 1.916e-04
Ca+2 1.851e-04 1.559e-04 -3.733 -3.807 -0.075
CaSO4 6.474e-06 6.477e-06 -5.189 -5.189 0.000
CaHSO4+ 2.817e-08 2.697e-08 -7.550 -7.569 -0.019
CaHCO3+ 2.834e-10 2.715e-10 -9.548 -9.566 -0.019
CaOH+ 3.801e-14 3.639e-14 -13.420 -13.439 -0.019
CaCO3 2.358e-15 2.359e-15 -14.627 -14.627 0.000
Cl 1.331e-04
Cl- 1.331e-04 1.274e-04 -3.876 -3.895 -0.019
H(0) 0.000e+00
H2 0.000e+00 0.000e+00 -42.506 -42.506 0.000
K 1.841e-05
K+ 1.838e-05 1.759e-05 -4.736 -4.755 -0.019
KSO4- 2.689e-08 2.575e-08 -7.570 -7.589 -0.019
KOH 8.579e-17 8.582e-17 -16.067 -16.066 0.000
Mg 3.536e-05
Mg+2 3.396e-05 2.864e-05 -4.469 -4.543 -0.074
MgSO4 1.398e-06 1.398e-06 -5.855 -5.854 0.000
MgHCO3+ 4.780e-11 4.576e-11 -10.321 -10.340 -0.019
MgOH+ 1.528e-13 1.463e-13 -12.816 -12.835 -0.019
MgCO3 2.461e-16 2.462e-16 -15.609 -15.609 0.000
N(-3) 0.000e+00
NH4+ 0.000e+00 0.000e+00 -48.438 -48.457 -0.019
NH4SO4- 0.000e+00 0.000e+00 -51.009 -51.028 -0.019
NH3 0.000e+00 0.000e+00 -54.553 -54.553 0.000
N(0) 4.751e-04
N2 2.375e-04 2.376e-04 -3.624 -3.624 0.000
N(3) 2.623e-15
NO2- 2.623e-15 2.510e-15 -14.581 -14.600 -0.019
N(5) 1.601e-04
NO3- 1.601e-04 1.532e-04 -3.796 -3.815 -0.019
Na 1.226e-04
Na+ 1.225e-04 1.173e-04 -3.912 -3.931 -0.019
NaSO4- 1.279e-07 1.224e-07 -6.893 -6.912 -0.019
NaHCO3 9.005e-12 9.008e-12 -11.046 -11.045 0.000
NaOH 1.090e-15 1.090e-15 -14.963 -14.962 0.000
NaCO3- 2.056e-17 1.968e-17 -16.687 -16.706 -0.019
O(0) 8.553e-08
O2 4.277e-08 4.278e-08 -7.369 -7.369 0.000
S(-2) 0.000e+00
H2S 0.000e+00 0.000e+00 -126.809 -126.809 0.000
HS- 0.000e+00 0.000e+00 -130.583 -130.602 -0.019
S-2 0.000e+00 0.000e+00 -140.297 -140.372 -0.075
S(6) 2.706e-04
SO4-2 2.475e-04 2.083e-04 -3.606 -3.681 -0.075
HSO4- 1.503e-05 1.439e-05 -4.823 -4.842 -0.019
CaSO4 6.474e-06 6.477e-06 -5.189 -5.189 0.000
MgSO4 1.398e-06 1.398e-06 -5.855 -5.854 0.000
NaSO4- 1.279e-07 1.224e-07 -6.893 -6.912 -0.019
CaHSO4+ 2.817e-08 2.697e-08 -7.550 -7.569 -0.019
KSO4- 2.689e-08 2.575e-08 -7.570 -7.589 -0.019
NH4SO4- 0.000e+00 0.000e+00 -51.009 -51.028 -0.019
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -3.13 -7.49 -4.36 CaSO4
Aragonite -9.52 -17.85 -8.34 CaCO3
Calcite -9.37 -17.85 -8.48 CaCO3
CH4(g) -133.83 -136.69 -2.86 CH4
CO2(g) -2.19 -3.66 -1.47 CO2
Dolomite -19.35 -36.44 -17.09 CaMg(CO3)2
Gypsum -2.91 -7.49 -4.58 CaSO4:2H2O
H2(g) -39.36 -42.51 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -125.81 -126.81 -1.00 H2S
Halite -9.41 -7.83 1.58 NaCl
N2(g) -0.36 -3.62 -3.26 N2
NH3(g) -56.32 -54.55 1.77 NH3
O2(g) -4.41 -7.37 -2.96 O2
Sulfur -92.34 -87.45 4.88 S
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 3.
------------------------------------
-----------
End of run.
-----------
No memory leaks

0
Sun/examples/ex5.log Normal file
View File

942
Sun/examples/ex5.out Normal file
View File

@ -0,0 +1,942 @@
Input file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../examples/ex5
Output file: ex5.out
Database file: /z/parkplace/home/dlpark/../../home/dlpark/programs/phreeqc/src/../src/Sun/../../database/phreeqc.dat
------------------
Reading data base.
------------------
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
TITLE Example 5.--Add oxygen, equilibrate with pyrite, calcite, and goethite.
SOLUTION 1 PURE WATER
pH 7.0
temp 25.0
EQUILIBRIUM_PHASES 1
Pyrite 0.0
Goethite 0.0
Calcite 0.0
CO2(g) -3.5
Gypsum 0.0 0.0
REACTION 1
O2 1.0
NaCl 0.5
0.0 0.001 0.005 0.01 0.05
SELECTED_OUTPUT
file ex5.sel
totals Cl
si Gypsum
equilibrium_phases pyrite goethite calcite CO2(g) gypsum
END
-----
TITLE
-----
Example 5.--Add oxygen, equilibrate with pyrite, calcite, and goethite.
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------
Initial solution 1. PURE WATER
-----------------------------Solution composition------------------------------
Elements Molality Moles
Pure water
----------------------------Description of solution----------------------------
pH = 7.000
pe = 4.000
Activity of water = 1.000
Ionic strength = 1.001e-07
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 1.082e-10
Total carbon (mol/kg) = 0.000e+00
Total CO2 (mol/kg) = 0.000e+00
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.082e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.05
Iterations = 0
Total H = 1.110124e+02
Total O = 5.550622e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.002e-07 1.001e-07 -6.999 -6.999 -0.000
H+ 1.001e-07 1.000e-07 -7.000 -7.000 -0.000
H2O 5.551e+01 1.000e+00 1.744 0.000 0.000
H(0) 1.416e-25
H2 7.079e-26 7.079e-26 -25.150 -25.150 0.000
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -42.080 -42.080 0.000
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
H2(g) -22.00 -25.15 -3.15 H2
H2O(g) -1.51 0.00 1.51 H2O
O2(g) -39.12 -42.08 -2.96 O2
-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------
Reaction step 1.
Using solution 1. PURE WATER
Using pure phase assemblage 1.
Using reaction 1.
Reaction 1. Irreversible reaction defined in simulation 1.
0.000e+00 moles of the following reaction have been added:
Relative
Reactant moles
O2 1.00
NaCl 0.50
Relative
Element moles
Cl 0.50
Na 0.50
O 2.00
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
Calcite 0.00 -8.48 -8.48 1.000e+01 1.000e+01 -4.934e-04
CO2(g) -3.50 -21.65 -18.15 1.000e+01 1.000e+01 -4.870e-04
Goethite 0.00 12.02 12.02 1.000e+01 1.000e+01 1.105e-08
Gypsum -6.13 -10.71 -4.58 0.000e+00 0.000e+00
Pyrite 0.00 -85.78 -85.78 1.000e+01 1.000e+01 -3.154e-08
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 9.804e-04 9.804e-04
Ca 4.934e-04 4.934e-04
Fe 2.049e-08 2.049e-08
S 6.308e-08 6.308e-08
----------------------------Description of solution----------------------------
pH = 8.279 Charge balance
pe = -4.943 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 1.463e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 9.867e-04
Total CO2 (mol/kg) = 9.803e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.082e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 14
Total H = 1.110124e+02
Total O = 5.550867e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.987e-06 1.903e-06 -5.702 -5.720 -0.019
H+ 5.476e-09 5.260e-09 -8.262 -8.279 -0.018
H2O 5.551e+01 1.000e+00 1.744 -0.000 0.000
C(-4) 5.403e-08
CH4 5.403e-08 5.405e-08 -7.267 -7.267 0.000
C(4) 9.803e-04
HCO3- 9.494e-04 9.104e-04 -3.023 -3.041 -0.018
CO2 1.076e-05 1.077e-05 -4.968 -4.968 0.000
CO3-2 9.603e-06 8.117e-06 -5.018 -5.091 -0.073
CaCO3 5.563e-06 5.565e-06 -5.255 -5.255 0.000
CaHCO3+ 4.943e-06 4.740e-06 -5.306 -5.324 -0.018
FeCO3 2.600e-09 2.601e-09 -8.585 -8.585 0.000
FeHCO3+ 1.269e-09 1.216e-09 -8.896 -8.915 -0.019
Ca 4.934e-04
Ca+2 4.829e-04 4.081e-04 -3.316 -3.389 -0.073
CaCO3 5.563e-06 5.565e-06 -5.255 -5.255 0.000
CaHCO3+ 4.943e-06 4.740e-06 -5.306 -5.324 -0.018
CaOH+ 1.344e-08 1.288e-08 -7.872 -7.890 -0.019
CaSO4 3.896e-09 3.897e-09 -8.409 -8.409 0.000
CaHSO4+ 1.253e-16 1.201e-16 -15.902 -15.920 -0.019
Fe(2) 2.049e-08
Fe+2 1.578e-08 1.336e-08 -7.802 -7.874 -0.072
FeCO3 2.600e-09 2.601e-09 -8.585 -8.585 0.000
FeHCO3+ 1.269e-09 1.216e-09 -8.896 -8.915 -0.019
FeOH+ 8.381e-10 8.031e-10 -9.077 -9.095 -0.019
FeSO4 1.137e-13 1.137e-13 -12.944 -12.944 0.000
Fe(HS)2 6.287e-17 6.289e-17 -16.202 -16.201 0.000
FeHSO4+ 4.102e-21 3.931e-21 -20.387 -20.406 -0.019
Fe(HS)3- 1.643e-23 1.574e-23 -22.784 -22.803 -0.019
Fe(3) 3.369e-14
Fe(OH)3 2.753e-14 2.754e-14 -13.560 -13.560 0.000
Fe(OH)4- 4.984e-15 4.776e-15 -14.302 -14.321 -0.019
Fe(OH)2+ 1.174e-15 1.124e-15 -14.931 -14.949 -0.019
FeOH+2 2.119e-20 1.786e-20 -19.674 -19.748 -0.074
Fe+3 2.091e-26 1.455e-26 -25.680 -25.837 -0.158
FeSO4+ 7.970e-30 7.637e-30 -29.099 -29.117 -0.019
Fe(SO4)2- 8.346e-36 7.997e-36 -35.079 -35.097 -0.019
FeHSO4+2 1.276e-37 1.076e-37 -36.894 -36.968 -0.074
Fe2(OH)2+4 1.700e-38 8.587e-39 -37.769 -38.066 -0.297
Fe3(OH)4+5 0.000e+00 0.000e+00 -50.232 -50.695 -0.464
H(0) 3.009e-10
H2 1.505e-10 1.505e-10 -9.823 -9.822 0.000
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -72.735 -72.735 0.000
S(-2) 2.505e-09
HS- 2.399e-09 2.298e-09 -8.620 -8.639 -0.019
H2S 1.057e-10 1.057e-10 -9.976 -9.976 0.000
S-2 6.249e-14 5.278e-14 -13.204 -13.278 -0.073
Fe(HS)2 6.287e-17 6.289e-17 -16.202 -16.201 0.000
Fe(HS)3- 1.643e-23 1.574e-23 -22.784 -22.803 -0.019
S(6) 6.057e-08
SO4-2 5.668e-08 4.786e-08 -7.247 -7.320 -0.073
CaSO4 3.896e-09 3.897e-09 -8.409 -8.409 0.000
FeSO4 1.137e-13 1.137e-13 -12.944 -12.944 0.000
HSO4- 2.554e-14 2.448e-14 -13.593 -13.611 -0.019
CaHSO4+ 1.253e-16 1.201e-16 -15.902 -15.920 -0.019
FeHSO4+ 4.102e-21 3.931e-21 -20.387 -20.406 -0.019
FeSO4+ 7.970e-30 7.637e-30 -29.099 -29.117 -0.019
Fe(SO4)2- 8.346e-36 7.997e-36 -35.079 -35.097 -0.019
FeHSO4+2 1.276e-37 1.076e-37 -36.894 -36.968 -0.074
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -6.35 -10.71 -4.36 CaSO4
Aragonite -0.14 -8.48 -8.34 CaCO3
Calcite 0.00 -8.48 -8.48 CaCO3
CH4(g) -4.41 -7.27 -2.86 CH4
CO2(g) -3.50 -4.97 -1.47 CO2
Fe(OH)3(a) -5.89 -1.00 4.89 Fe(OH)3
FeS(ppt) -4.32 -8.23 -3.92 FeS
Goethite 0.00 -1.00 -1.00 FeOOH
Gypsum -6.13 -10.71 -4.58 CaSO4:2H2O
H2(g) -6.67 -9.82 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -8.98 -9.98 -1.00 H2S
Hematite 2.01 -2.00 -4.01 Fe2O3
Mackinawite -3.59 -8.23 -4.65 FeS
Melanterite -12.99 -15.19 -2.21 FeSO4:7H2O
O2(g) -69.78 -72.74 -2.96 O2
Pyrite 0.00 -18.48 -18.48 FeS2
Siderite -2.07 -12.96 -10.89 FeCO3
Sulfur -8.19 -3.30 4.88 S
Reaction step 2.
Using solution 1. PURE WATER
Using pure phase assemblage 1.
Using reaction 1.
Reaction 1. Irreversible reaction defined in simulation 1.
1.000e-03 moles of the following reaction have been added:
Relative
Reactant moles
O2 1.00
NaCl 0.50
Relative
Element moles
Cl 0.50
Na 0.50
O 2.00
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
Calcite 0.00 -8.48 -8.48 1.000e+01 9.999e+00 -9.277e-04
CO2(g) -3.50 -21.65 -18.15 1.000e+01 1.000e+01 1.418e-04
Goethite 0.00 12.02 12.02 1.000e+01 1.000e+01 2.667e-04
Gypsum -2.02 -6.60 -4.58 0.000e+00 0.000e+00
Pyrite 0.00 -85.78 -85.78 1.000e+01 1.000e+01 -2.667e-04
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 7.859e-04 7.859e-04
Ca 9.277e-04 9.277e-04
Cl 5.000e-04 5.000e-04
Fe 9.939e-09 9.939e-09
Na 5.000e-04 5.000e-04
S 5.333e-04 5.333e-04
----------------------------Description of solution----------------------------
pH = 8.171 Charge balance
pe = -4.287 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 3.591e-03
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 7.887e-04
Total CO2 (mol/kg) = 7.859e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.082e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 24
Total H = 1.110122e+02
Total O = 5.551018e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.585e-06 1.484e-06 -5.800 -5.829 -0.029
H+ 7.160e-09 6.745e-09 -8.145 -8.171 -0.026
H2O 5.551e+01 9.999e-01 1.744 -0.000 0.000
C(-4) 2.240e-12
CH4 2.240e-12 2.242e-12 -11.650 -11.649 0.000
C(4) 7.859e-04
HCO3- 7.565e-04 7.099e-04 -3.121 -3.149 -0.028
CO2 1.076e-05 1.077e-05 -4.968 -4.968 0.000
CaHCO3+ 6.477e-06 6.078e-06 -5.189 -5.216 -0.028
CO3-2 6.364e-06 4.936e-06 -5.196 -5.307 -0.110
CaCO3 5.560e-06 5.565e-06 -5.255 -5.255 0.000
NaHCO3 1.865e-07 1.867e-07 -6.729 -6.729 0.000
NaCO3- 4.587e-08 4.298e-08 -7.338 -7.367 -0.028
FeCO3 7.363e-10 7.369e-10 -9.133 -9.133 0.000
FeHCO3+ 4.715e-10 4.418e-10 -9.327 -9.355 -0.028
Ca 9.277e-04
Ca+2 8.657e-04 6.711e-04 -3.063 -3.173 -0.111
CaSO4 4.996e-05 5.000e-05 -4.301 -4.301 0.000
CaHCO3+ 6.477e-06 6.078e-06 -5.189 -5.216 -0.028
CaCO3 5.560e-06 5.565e-06 -5.255 -5.255 0.000
CaOH+ 1.762e-08 1.651e-08 -7.754 -7.782 -0.028
CaHSO4+ 2.108e-12 1.976e-12 -11.676 -11.704 -0.028
Cl 5.000e-04
Cl- 5.000e-04 4.682e-04 -3.301 -3.330 -0.029
FeCl+ 4.293e-12 4.023e-12 -11.367 -11.396 -0.028
FeCl+2 5.629e-28 4.339e-28 -27.250 -27.363 -0.113
FeCl2+ 9.686e-31 9.076e-31 -30.014 -30.042 -0.028
FeCl3 4.246e-35 4.250e-35 -34.372 -34.372 0.000
Fe(2) 9.939e-09
Fe+2 8.002e-09 6.223e-09 -8.097 -8.206 -0.109
FeCO3 7.363e-10 7.369e-10 -9.133 -9.133 0.000
FeHCO3+ 4.715e-10 4.418e-10 -9.327 -9.355 -0.028
FeSO4 4.129e-10 4.132e-10 -9.384 -9.384 0.000
FeOH+ 3.114e-10 2.918e-10 -9.507 -9.535 -0.028
FeCl+ 4.293e-12 4.023e-12 -11.367 -11.396 -0.028
FeHSO4+ 1.955e-17 1.832e-17 -16.709 -16.737 -0.028
Fe(HS)2 5.043e-18 5.047e-18 -17.297 -17.297 0.000
Fe(HS)3- 5.596e-25 5.243e-25 -24.252 -24.280 -0.028
Fe(3) 3.303e-14
Fe(OH)3 2.752e-14 2.754e-14 -13.560 -13.560 0.000
Fe(OH)4- 3.974e-15 3.724e-15 -14.401 -14.429 -0.028
Fe(OH)2+ 1.539e-15 1.442e-15 -14.813 -14.841 -0.028
FeOH+2 3.810e-20 2.937e-20 -19.419 -19.532 -0.113
FeSO4+ 1.341e-25 1.256e-25 -24.873 -24.901 -0.028
Fe+3 5.252e-26 3.069e-26 -25.280 -25.513 -0.233
Fe(SO4)2- 1.095e-27 1.026e-27 -26.960 -26.989 -0.028
FeCl+2 5.629e-28 4.339e-28 -27.250 -27.363 -0.113
FeCl2+ 9.686e-31 9.076e-31 -30.014 -30.042 -0.028
FeHSO4+2 2.943e-33 2.269e-33 -32.531 -32.644 -0.113
FeCl3 4.246e-35 4.250e-35 -34.372 -34.372 0.000
Fe2(OH)2+4 6.575e-38 2.322e-38 -37.182 -37.634 -0.452
Fe3(OH)4+5 0.000e+00 0.000e+00 -49.449 -50.155 -0.706
H(0) 2.414e-11
H2 1.207e-11 1.208e-11 -10.918 -10.918 0.000
Na 5.000e-04
Na+ 4.988e-04 4.677e-04 -3.302 -3.330 -0.028
NaSO4- 9.340e-07 8.752e-07 -6.030 -6.058 -0.028
NaHCO3 1.865e-07 1.867e-07 -6.729 -6.729 0.000
NaCO3- 4.587e-08 4.298e-08 -7.338 -7.367 -0.028
NaOH 4.577e-10 4.581e-10 -9.339 -9.339 0.000
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -70.545 -70.544 0.000
S(-2) 1.075e-09
HS- 1.019e-09 9.540e-10 -8.992 -9.020 -0.029
H2S 5.621e-11 5.626e-11 -10.250 -10.250 0.000
S-2 2.207e-14 1.708e-14 -13.656 -13.767 -0.111
Fe(HS)2 5.043e-18 5.047e-18 -17.297 -17.297 0.000
Fe(HS)3- 5.596e-25 5.243e-25 -24.252 -24.280 -0.028
S(6) 5.333e-04
SO4-2 4.824e-04 3.734e-04 -3.317 -3.428 -0.111
CaSO4 4.996e-05 5.000e-05 -4.301 -4.301 0.000
NaSO4- 9.340e-07 8.752e-07 -6.030 -6.058 -0.028
FeSO4 4.129e-10 4.132e-10 -9.384 -9.384 0.000
HSO4- 2.613e-10 2.449e-10 -9.583 -9.611 -0.028
CaHSO4+ 2.108e-12 1.976e-12 -11.676 -11.704 -0.028
FeHSO4+ 1.955e-17 1.832e-17 -16.709 -16.737 -0.028
FeSO4+ 1.341e-25 1.256e-25 -24.873 -24.901 -0.028
Fe(SO4)2- 1.095e-27 1.026e-27 -26.960 -26.989 -0.028
FeHSO4+2 2.943e-33 2.269e-33 -32.531 -32.644 -0.113
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -2.24 -6.60 -4.36 CaSO4
Aragonite -0.14 -8.48 -8.34 CaCO3
Calcite 0.00 -8.48 -8.48 CaCO3
CH4(g) -8.79 -11.65 -2.86 CH4
CO2(g) -3.50 -4.97 -1.47 CO2
Fe(OH)3(a) -5.89 -1.00 4.89 Fe(OH)3
FeS(ppt) -5.14 -9.06 -3.92 FeS
Goethite -0.00 -1.00 -1.00 FeOOH
Gypsum -2.02 -6.60 -4.58 CaSO4:2H2O
H2(g) -7.77 -10.92 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -9.25 -10.25 -1.00 H2S
Halite -8.24 -6.66 1.58 NaCl
Hematite 2.01 -2.00 -4.01 Fe2O3
Mackinawite -4.41 -9.06 -4.65 FeS
Melanterite -9.42 -11.63 -2.21 FeSO4:7H2O
O2(g) -67.58 -70.54 -2.96 O2
Pyrite -0.00 -18.48 -18.48 FeS2
Siderite -2.62 -13.51 -10.89 FeCO3
Sulfur -7.36 -2.48 4.88 S
Reaction step 3.
Using solution 1. PURE WATER
Using pure phase assemblage 1.
Using reaction 1.
Reaction 1. Irreversible reaction defined in simulation 1.
5.000e-03 moles of the following reaction have been added:
Relative
Reactant moles
O2 1.00
NaCl 0.50
Relative
Element moles
Cl 0.50
Na 0.50
O 2.00
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
Calcite 0.00 -8.48 -8.48 1.000e+01 9.997e+00 -2.937e-03
CO2(g) -3.50 -21.65 -18.15 1.000e+01 1.000e+01 2.395e-03
Goethite 0.00 12.02 12.02 1.000e+01 1.000e+01 1.333e-03
Gypsum -1.06 -5.64 -4.58 0.000e+00 0.000e+00
Pyrite 0.00 -85.78 -85.78 1.000e+01 9.999e+00 -1.333e-03
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 5.424e-04 5.424e-04
Ca 2.937e-03 2.937e-03
Cl 2.500e-03 2.500e-03
Fe 2.124e-08 2.124e-08
Na 2.500e-03 2.500e-03
S 2.667e-03 2.667e-03
----------------------------Description of solution----------------------------
pH = 7.982 Charge balance
pe = -3.970 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 1.210e-02
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 5.415e-04
Total CO2 (mol/kg) = 5.424e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.082e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 25
Total H = 1.110111e+02
Total O = 5.551757e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 1.077e-06 9.604e-07 -5.968 -6.018 -0.050
H+ 1.149e-08 1.042e-08 -7.940 -7.982 -0.042
H2O 5.551e+01 9.998e-01 1.744 -0.000 0.000
C(-4) 2.129e-13
CH4 2.129e-13 2.135e-13 -12.672 -12.671 0.001
C(4) 5.424e-04
HCO3- 5.118e-04 4.594e-04 -3.291 -3.338 -0.047
CO2 1.074e-05 1.077e-05 -4.969 -4.968 0.001
CaHCO3+ 1.046e-05 9.392e-06 -4.980 -5.027 -0.047
CaCO3 5.549e-06 5.565e-06 -5.256 -5.255 0.001
CO3-2 3.184e-06 2.067e-06 -5.497 -5.685 -0.188
NaHCO3 5.724e-07 5.740e-07 -6.242 -6.241 0.001
NaCO3- 9.566e-08 8.553e-08 -7.019 -7.068 -0.049
FeHCO3+ 5.691e-10 5.088e-10 -9.245 -9.293 -0.049
FeCO3 5.477e-10 5.493e-10 -9.261 -9.260 0.001
Ca 2.937e-03
Ca+2 2.469e-03 1.602e-03 -2.607 -2.795 -0.188
CaSO4 4.520e-04 4.532e-04 -3.345 -3.344 0.001
CaHCO3+ 1.046e-05 9.392e-06 -4.980 -5.027 -0.047
CaCO3 5.549e-06 5.565e-06 -5.256 -5.255 0.001
CaOH+ 2.854e-08 2.551e-08 -7.545 -7.593 -0.049
CaHSO4+ 3.095e-11 2.767e-11 -10.509 -10.558 -0.049
Cl 2.500e-03
Cl- 2.500e-03 2.230e-03 -2.602 -2.652 -0.050
FeCl+ 3.814e-11 3.410e-11 -10.419 -10.467 -0.049
FeCl+2 1.194e-26 7.627e-27 -25.923 -26.118 -0.194
FeCl2+ 8.499e-29 7.599e-29 -28.071 -28.119 -0.049
FeCl3 1.690e-32 1.695e-32 -31.772 -31.771 0.001
Fe(2) 2.124e-08
Fe+2 1.693e-08 1.108e-08 -7.771 -7.956 -0.184
FeSO4 2.784e-09 2.792e-09 -8.555 -8.554 0.001
FeHCO3+ 5.691e-10 5.088e-10 -9.245 -9.293 -0.049
FeCO3 5.477e-10 5.493e-10 -9.261 -9.260 0.001
FeOH+ 3.758e-10 3.360e-10 -9.425 -9.474 -0.049
FeCl+ 3.814e-11 3.410e-11 -10.419 -10.467 -0.049
FeHSO4+ 2.139e-16 1.913e-16 -15.670 -15.718 -0.049
Fe(HS)2 2.796e-18 2.804e-18 -17.553 -17.552 0.001
Fe(HS)3- 1.820e-25 1.627e-25 -24.740 -24.789 -0.049
Fe(3) 3.265e-14
Fe(OH)3 2.746e-14 2.754e-14 -13.561 -13.560 0.001
Fe(OH)4- 2.695e-15 2.409e-15 -14.569 -14.618 -0.049
Fe(OH)2+ 2.492e-15 2.228e-15 -14.603 -14.652 -0.049
FeOH+2 1.098e-19 7.014e-20 -18.960 -19.154 -0.194
FeSO4+ 1.968e-24 1.760e-24 -23.706 -23.755 -0.049
Fe+3 2.720e-25 1.132e-25 -24.566 -24.946 -0.381
Fe(SO4)2- 6.105e-26 5.458e-26 -25.214 -25.263 -0.049
FeCl+2 1.194e-26 7.627e-27 -25.923 -26.118 -0.194
FeCl2+ 8.499e-29 7.599e-29 -28.071 -28.119 -0.049
FeHSO4+2 7.686e-32 4.911e-32 -31.114 -31.309 -0.194
FeCl3 1.690e-32 1.695e-32 -31.772 -31.771 0.001
Fe2(OH)2+4 7.941e-37 1.324e-37 -36.100 -36.878 -0.778
Fe3(OH)4+5 0.000e+00 0.000e+00 -47.995 -49.210 -1.216
H(0) 1.338e-11
H2 6.691e-12 6.710e-12 -11.174 -11.173 0.001
Na 2.500e-03
Na+ 2.482e-03 2.222e-03 -2.605 -2.653 -0.048
NaSO4- 1.766e-05 1.579e-05 -4.753 -4.802 -0.049
NaHCO3 5.724e-07 5.740e-07 -6.242 -6.241 0.001
NaCO3- 9.566e-08 8.553e-08 -7.019 -7.068 -0.049
NaOH 1.404e-09 1.408e-09 -8.853 -8.851 0.001
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -70.035 -70.034 0.001
S(-2) 6.460e-10
HS- 5.976e-10 5.329e-10 -9.224 -9.273 -0.050
H2S 4.843e-11 4.856e-11 -10.315 -10.314 0.001
S-2 9.562e-15 6.176e-15 -14.019 -14.209 -0.190
Fe(HS)2 2.796e-18 2.804e-18 -17.553 -17.552 0.001
Fe(HS)3- 1.820e-25 1.627e-25 -24.740 -24.789 -0.049
S(6) 2.667e-03
SO4-2 2.197e-03 1.418e-03 -2.658 -2.848 -0.190
CaSO4 4.520e-04 4.532e-04 -3.345 -3.344 0.001
NaSO4- 1.766e-05 1.579e-05 -4.753 -4.802 -0.049
FeSO4 2.784e-09 2.792e-09 -8.555 -8.554 0.001
HSO4- 1.606e-09 1.436e-09 -8.794 -8.843 -0.049
CaHSO4+ 3.095e-11 2.767e-11 -10.509 -10.558 -0.049
FeHSO4+ 2.139e-16 1.913e-16 -15.670 -15.718 -0.049
FeSO4+ 1.968e-24 1.760e-24 -23.706 -23.755 -0.049
Fe(SO4)2- 6.105e-26 5.458e-26 -25.214 -25.263 -0.049
FeHSO4+2 7.686e-32 4.911e-32 -31.114 -31.309 -0.194
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -1.28 -5.64 -4.36 CaSO4
Aragonite -0.14 -8.48 -8.34 CaCO3
Calcite 0.00 -8.48 -8.48 CaCO3
CH4(g) -9.81 -12.67 -2.86 CH4
CO2(g) -3.50 -4.97 -1.47 CO2
Fe(OH)3(a) -5.89 -1.00 4.89 Fe(OH)3
FeS(ppt) -5.33 -9.25 -3.92 FeS
Goethite -0.00 -1.00 -1.00 FeOOH
Gypsum -1.06 -5.64 -4.58 CaSO4:2H2O
H2(g) -8.02 -11.17 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -9.32 -10.31 -1.00 H2S
Halite -6.89 -5.30 1.58 NaCl
Hematite 2.01 -2.00 -4.01 Fe2O3
Mackinawite -4.60 -9.25 -4.65 FeS
Melanterite -8.60 -10.80 -2.21 FeSO4:7H2O
O2(g) -67.07 -70.03 -2.96 O2
Pyrite -0.00 -18.48 -18.48 FeS2
Siderite -2.75 -13.64 -10.89 FeCO3
Sulfur -7.17 -2.29 4.88 S
Reaction step 4.
Using solution 1. PURE WATER
Using pure phase assemblage 1.
Using reaction 1.
Reaction 1. Irreversible reaction defined in simulation 1.
1.000e-02 moles of the following reaction have been added:
Relative
Reactant moles
O2 1.00
NaCl 0.50
Relative
Element moles
Cl 0.50
Na 0.50
O 2.00
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
Calcite 0.00 -8.48 -8.48 1.000e+01 9.994e+00 -5.559e-03
CO2(g) -3.50 -21.65 -18.15 1.000e+01 1.001e+01 5.105e-03
Goethite 0.00 12.02 12.02 1.000e+01 1.000e+01 2.667e-03
Gypsum -0.65 -5.23 -4.58 0.000e+00 0.000e+00
Pyrite -0.00 -85.78 -85.78 1.000e+01 9.997e+00 -2.667e-03
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 4.540e-04 4.540e-04
Ca 5.560e-03 5.559e-03
Cl 5.000e-03 5.000e-03
Fe 3.429e-08 3.429e-08
Na 5.000e-03 5.000e-03
S 5.333e-03 5.333e-03
----------------------------Description of solution----------------------------
pH = 7.884 Charge balance
pe = -3.817 Adjusted to redox equilibrium
Activity of water = 1.000
Ionic strength = 2.218e-02
Mass of water (kg) = 1.000e+00
Total alkalinity (eq/kg) = 4.522e-04
Total CO2 (mol/kg) = 4.540e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = -1.082e-10
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 25
Total H = 1.110098e+02
Total O = 5.552735e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 8.898e-07 7.665e-07 -6.051 -6.115 -0.065
H+ 1.474e-08 1.306e-08 -7.832 -7.884 -0.053
H2O 5.551e+01 9.997e-01 1.744 -0.000 0.000
C(-4) 7.696e-14
CH4 7.696e-14 7.735e-14 -13.114 -13.112 0.002
C(4) 4.540e-04
HCO3- 4.210e-04 3.666e-04 -3.376 -3.436 -0.060
CaHCO3+ 1.351e-05 1.177e-05 -4.869 -4.929 -0.060
CO2 1.071e-05 1.077e-05 -4.970 -4.968 0.002
CaCO3 5.536e-06 5.565e-06 -5.257 -5.255 0.002
CO3-2 2.289e-06 1.317e-06 -5.640 -5.880 -0.240
NaHCO3 8.791e-07 8.836e-07 -6.056 -6.054 0.002
NaCO3- 1.214e-07 1.051e-07 -6.916 -6.978 -0.063
FeHCO3+ 6.487e-10 5.616e-10 -9.188 -9.251 -0.063
FeCO3 4.814e-10 4.839e-10 -9.317 -9.315 0.002
Ca 5.560e-03
Ca+2 4.373e-03 2.515e-03 -2.359 -2.599 -0.240
CaSO4 1.168e-03 1.174e-03 -2.933 -2.930 0.002
CaHCO3+ 1.351e-05 1.177e-05 -4.869 -4.929 -0.060
CaCO3 5.536e-06 5.565e-06 -5.257 -5.255 0.002
CaOH+ 3.692e-08 3.196e-08 -7.433 -7.495 -0.063
CaHSO4+ 1.037e-10 8.977e-11 -9.984 -10.047 -0.063
Cl 5.000e-03
Cl- 5.000e-03 4.311e-03 -2.301 -2.365 -0.064
FeCl+ 1.053e-10 9.114e-11 -9.978 -10.040 -0.063
FeCl+2 5.162e-26 2.899e-26 -25.287 -25.538 -0.251
FeCl2+ 6.449e-28 5.583e-28 -27.191 -27.253 -0.063
FeCl3 2.394e-31 2.406e-31 -30.621 -30.619 0.002
Fe(2) 3.429e-08
Fe+2 2.629e-08 1.532e-08 -7.580 -7.815 -0.235
FeSO4 6.337e-09 6.369e-09 -8.198 -8.196 0.002
FeHCO3+ 6.487e-10 5.616e-10 -9.188 -9.251 -0.063
FeCO3 4.814e-10 4.839e-10 -9.317 -9.315 0.002
FeOH+ 4.284e-10 3.708e-10 -9.368 -9.431 -0.063
FeCl+ 1.053e-10 9.114e-11 -9.978 -10.040 -0.063
FeHSO4+ 6.314e-16 5.466e-16 -15.200 -15.262 -0.063
Fe(HS)2 2.164e-18 2.175e-18 -17.665 -17.663 0.002
Fe(HS)3- 1.092e-25 9.454e-26 -24.962 -25.024 -0.063
Fe(3) 3.284e-14
Fe(OH)3 2.739e-14 2.753e-14 -13.562 -13.560 0.002
Fe(OH)2+ 3.224e-15 2.791e-15 -14.492 -14.554 -0.063
Fe(OH)4- 2.221e-15 1.923e-15 -14.653 -14.716 -0.063
FeOH+2 1.960e-19 1.101e-19 -18.708 -18.958 -0.251
FeSO4+ 6.596e-24 5.710e-24 -23.181 -23.243 -0.063
Fe+3 6.635e-25 2.227e-25 -24.178 -24.652 -0.474
Fe(SO4)2- 3.374e-25 2.921e-25 -24.472 -24.534 -0.063
FeCl+2 5.162e-26 2.899e-26 -25.287 -25.538 -0.251
FeCl2+ 6.449e-28 5.583e-28 -27.191 -27.253 -0.063
FeHSO4+2 3.555e-31 1.996e-31 -30.449 -30.700 -0.251
FeCl3 2.394e-31 2.406e-31 -30.621 -30.619 0.002
Fe2(OH)2+4 3.279e-36 3.263e-37 -35.484 -36.486 -1.002
Fe3(OH)4+5 0.000e+00 0.000e+00 -47.155 -48.721 -1.566
H(0) 1.036e-11
H2 5.179e-12 5.205e-12 -11.286 -11.284 0.002
Na 5.000e-03
Na+ 4.941e-03 4.286e-03 -2.306 -2.368 -0.062
NaSO4- 5.802e-05 5.023e-05 -4.236 -4.299 -0.063
NaHCO3 8.791e-07 8.836e-07 -6.056 -6.054 0.002
NaCO3- 1.214e-07 1.051e-07 -6.916 -6.978 -0.063
NaOH 2.157e-09 2.168e-09 -8.666 -8.664 0.002
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -69.815 -69.813 0.002
S(-2) 5.087e-10
HS- 4.634e-10 3.992e-10 -9.334 -9.399 -0.065
H2S 4.533e-11 4.557e-11 -10.344 -10.341 0.002
S-2 6.474e-15 3.693e-15 -14.189 -14.433 -0.244
Fe(HS)2 2.164e-18 2.175e-18 -17.665 -17.663 0.002
Fe(HS)3- 1.092e-25 9.454e-26 -24.962 -25.024 -0.063
S(6) 5.333e-03
SO4-2 4.108e-03 2.338e-03 -2.386 -2.631 -0.245
CaSO4 1.168e-03 1.174e-03 -2.933 -2.930 0.002
NaSO4- 5.802e-05 5.023e-05 -4.236 -4.299 -0.063
FeSO4 6.337e-09 6.369e-09 -8.198 -8.196 0.002
HSO4- 3.429e-09 2.968e-09 -8.465 -8.527 -0.063
CaHSO4+ 1.037e-10 8.977e-11 -9.984 -10.047 -0.063
FeHSO4+ 6.314e-16 5.466e-16 -15.200 -15.262 -0.063
FeSO4+ 6.596e-24 5.710e-24 -23.181 -23.243 -0.063
Fe(SO4)2- 3.374e-25 2.921e-25 -24.472 -24.534 -0.063
FeHSO4+2 3.555e-31 1.996e-31 -30.449 -30.700 -0.251
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -0.87 -5.23 -4.36 CaSO4
Aragonite -0.14 -8.48 -8.34 CaCO3
Calcite 0.00 -8.48 -8.48 CaCO3
CH4(g) -10.25 -13.11 -2.86 CH4
CO2(g) -3.50 -4.97 -1.47 CO2
Fe(OH)3(a) -5.89 -1.00 4.89 Fe(OH)3
FeS(ppt) -5.41 -9.33 -3.92 FeS
Goethite -0.00 -1.00 -1.00 FeOOH
Gypsum -0.65 -5.23 -4.58 CaSO4:2H2O
H2(g) -8.13 -11.28 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -9.34 -10.34 -1.00 H2S
Halite -6.32 -4.73 1.58 NaCl
Hematite 2.01 -2.00 -4.01 Fe2O3
Mackinawite -4.68 -9.33 -4.65 FeS
Melanterite -8.24 -10.45 -2.21 FeSO4:7H2O
O2(g) -66.85 -69.81 -2.96 O2
Pyrite -0.00 -18.48 -18.48 FeS2
Siderite -2.81 -13.70 -10.89 FeCO3
Sulfur -7.09 -2.21 4.88 S
Reaction step 5.
Using solution 1. PURE WATER
Using pure phase assemblage 1.
Using reaction 1.
Reaction 1. Irreversible reaction defined in simulation 1.
5.000e-02 moles of the following reaction have been added:
Relative
Reactant moles
O2 1.00
NaCl 0.50
Relative
Element moles
Cl 0.50
Na 0.50
O 2.00
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
Calcite 0.00 -8.48 -8.48 1.000e+01 9.973e+00 -2.684e-02
CO2(g) -3.50 -21.65 -18.15 1.000e+01 1.003e+01 2.649e-02
Goethite 0.00 12.02 12.02 1.000e+01 1.001e+01 1.333e-02
Gypsum 0.00 -4.58 -4.58 0.000e+00 9.002e-03 9.002e-03
Pyrite -0.00 -85.78 -85.78 1.000e+01 9.987e+00 -1.333e-02
-----------------------------Solution composition------------------------------
Elements Molality Moles
C 3.526e-04 3.524e-04
Ca 1.785e-02 1.784e-02
Cl 2.501e-02 2.500e-02
Fe 8.735e-08 8.732e-08
Na 2.501e-02 2.500e-02
S 1.767e-02 1.766e-02
----------------------------Description of solution----------------------------
pH = 7.719 Charge balance
pe = -3.565 Adjusted to redox equilibrium
Activity of water = 0.999
Ionic strength = 7.432e-02
Mass of water (kg) = 9.996e-01
Total alkalinity (eq/kg) = 3.499e-04
Total CO2 (mol/kg) = 3.526e-04
Temperature (deg C) = 25.000
Electrical balance (eq) = -4.778e-11
Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00
Iterations = 25
Total H = 1.109631e+02
Total O = 5.555309e+01
----------------------------Distribution of species----------------------------
Log Log Log
Species Molality Activity Molality Activity Gamma
OH- 6.681e-07 5.237e-07 -6.175 -6.281 -0.106
H+ 2.279e-08 1.909e-08 -7.642 -7.719 -0.077
H2O 5.551e+01 9.986e-01 1.744 -0.001 0.000
C(-4) 1.534e-14
CH4 1.534e-14 1.561e-14 -13.814 -13.807 0.007
C(4) 3.526e-04
HCO3- 3.108e-04 2.505e-04 -3.508 -3.601 -0.094
CaHCO3+ 2.134e-05 1.720e-05 -4.671 -4.764 -0.094
CO2 1.058e-05 1.077e-05 -4.975 -4.968 0.007
CaCO3 5.470e-06 5.565e-06 -5.262 -5.255 0.007
NaHCO3 2.706e-06 2.752e-06 -5.568 -5.560 0.007
CO3-2 1.458e-06 6.155e-07 -5.836 -6.211 -0.374
NaCO3- 2.804e-07 2.239e-07 -6.552 -6.650 -0.098
FeHCO3+ 8.424e-10 6.727e-10 -9.074 -9.172 -0.098
FeCO3 3.897e-10 3.964e-10 -9.409 -9.402 0.007
Ca 1.785e-02
Ca+2 1.266e-02 5.382e-03 -1.898 -2.269 -0.371
CaSO4 5.162e-03 5.251e-03 -2.287 -2.280 0.007
CaHCO3+ 2.134e-05 1.720e-05 -4.671 -4.764 -0.094
CaCO3 5.470e-06 5.565e-06 -5.262 -5.255 0.007
CaOH+ 5.853e-08 4.673e-08 -7.233 -7.330 -0.098
CaHSO4+ 7.355e-10 5.872e-10 -9.133 -9.231 -0.098
Cl 2.501e-02
Cl- 2.501e-02 1.966e-02 -1.602 -1.706 -0.105
FeCl+ 9.125e-10 7.286e-10 -9.040 -9.138 -0.098
FeCl+2 1.019e-24 4.140e-25 -23.992 -24.383 -0.391
FeCl2+ 4.553e-26 3.635e-26 -25.342 -25.439 -0.098
FeCl3 7.025e-29 7.146e-29 -28.153 -28.146 0.007
Fe(2) 8.735e-08
Fe+2 6.170e-08 2.685e-08 -7.210 -7.571 -0.361
FeSO4 2.295e-08 2.335e-08 -7.639 -7.632 0.007
FeCl+ 9.125e-10 7.286e-10 -9.040 -9.138 -0.098
FeHCO3+ 8.424e-10 6.727e-10 -9.074 -9.172 -0.098
FeOH+ 5.563e-10 4.442e-10 -9.255 -9.352 -0.098
FeCO3 3.897e-10 3.964e-10 -9.409 -9.402 0.007
FeHSO4+ 3.669e-15 2.930e-15 -14.435 -14.533 -0.098
Fe(HS)2 1.432e-18 1.457e-18 -17.844 -17.837 0.007
Fe(HS)3- 4.903e-26 3.915e-26 -25.310 -25.407 -0.098
Fe(3) 3.379e-14
Fe(OH)3 2.704e-14 2.750e-14 -13.568 -13.561 0.007
Fe(OH)2+ 5.111e-15 4.081e-15 -14.291 -14.389 -0.098
Fe(OH)4- 1.644e-15 1.312e-15 -14.784 -14.882 -0.098
FeOH+2 5.796e-19 2.356e-19 -18.237 -18.628 -0.391
FeSO4+ 4.683e-23 3.739e-23 -22.329 -22.427 -0.098
Fe(SO4)2- 5.010e-24 4.000e-24 -23.300 -23.398 -0.098
Fe+3 3.432e-24 6.974e-25 -23.464 -24.156 -0.692
FeCl+2 1.019e-24 4.140e-25 -23.992 -24.383 -0.391
FeCl2+ 4.553e-26 3.635e-26 -25.342 -25.439 -0.098
FeCl3 7.025e-29 7.146e-29 -28.153 -28.146 0.007
FeHSO4+2 4.703e-30 1.911e-30 -29.328 -29.719 -0.391
Fe2(OH)2+4 5.473e-35 1.494e-36 -34.262 -35.826 -1.564
Fe3(OH)4+5 0.000e+00 0.000e+00 -45.451 -47.895 -2.444
H(0) 6.856e-12
H2 3.428e-12 3.487e-12 -11.465 -11.458 0.007
Na 2.501e-02
Na+ 2.441e-02 1.954e-02 -1.612 -1.709 -0.097
NaSO4- 5.997e-04 4.788e-04 -3.222 -3.320 -0.098
NaHCO3 2.706e-06 2.752e-06 -5.568 -5.560 0.007
NaCO3- 2.804e-07 2.239e-07 -6.552 -6.650 -0.098
NaOH 6.639e-09 6.753e-09 -8.178 -8.170 0.007
O(0) 0.000e+00
O2 0.000e+00 0.000e+00 -69.474 -69.466 0.007
S(-2) 3.552e-10
HS- 3.148e-10 2.467e-10 -9.502 -9.608 -0.106
H2S 4.048e-11 4.118e-11 -10.393 -10.385 0.007
S-2 3.777e-15 1.561e-15 -14.423 -14.807 -0.384
Fe(HS)2 1.432e-18 1.457e-18 -17.844 -17.837 0.007
Fe(HS)3- 4.903e-26 3.915e-26 -25.310 -25.407 -0.098
S(6) 1.767e-02
SO4-2 1.191e-02 4.890e-03 -1.924 -2.311 -0.387
CaSO4 5.162e-03 5.251e-03 -2.287 -2.280 0.007
NaSO4- 5.997e-04 4.788e-04 -3.222 -3.320 -0.098
FeSO4 2.295e-08 2.335e-08 -7.639 -7.632 0.007
HSO4- 1.137e-08 9.075e-09 -7.944 -8.042 -0.098
CaHSO4+ 7.355e-10 5.872e-10 -9.133 -9.231 -0.098
FeHSO4+ 3.669e-15 2.930e-15 -14.435 -14.533 -0.098
FeSO4+ 4.683e-23 3.739e-23 -22.329 -22.427 -0.098
Fe(SO4)2- 5.010e-24 4.000e-24 -23.300 -23.398 -0.098
FeHSO4+2 4.703e-30 1.911e-30 -29.328 -29.719 -0.391
------------------------------Saturation indices-------------------------------
Phase SI log IAP log KT
Anhydrite -0.22 -4.58 -4.36 CaSO4
Aragonite -0.14 -8.48 -8.34 CaCO3
Calcite 0.00 -8.48 -8.48 CaCO3
CH4(g) -10.95 -13.81 -2.86 CH4
CO2(g) -3.50 -4.97 -1.47 CO2
Fe(OH)3(a) -5.89 -1.00 4.89 Fe(OH)3
FeS(ppt) -5.54 -9.46 -3.92 FeS
Goethite 0.00 -1.00 -1.00 FeOOH
Gypsum 0.00 -4.58 -4.58 CaSO4:2H2O
H2(g) -8.31 -11.46 -3.15 H2
H2O(g) -1.51 -0.00 1.51 H2O
H2S(g) -9.39 -10.39 -1.00 H2S
Halite -5.00 -3.42 1.58 NaCl
Hematite 2.01 -2.00 -4.01 Fe2O3
Mackinawite -4.81 -9.46 -4.65 FeS
Melanterite -7.68 -9.89 -2.21 FeSO4:7H2O
O2(g) -66.51 -69.47 -2.96 O2
Pyrite -0.00 -18.48 -18.48 FeS2
Siderite -2.89 -13.78 -10.89 FeCO3
Sulfur -6.96 -2.08 4.88 S
------------------
End of simulation.
------------------
------------------------------------
Reading input data for simulation 2.
------------------------------------
-----------
End of run.
-----------
No memory leaks

7
Sun/examples/ex5.sel Normal file
View File

@ -0,0 +1,7 @@
sim state soln dist_x time step pH pe Cl pyrite d_pyrite goethite d_goethite calcite d_calcite CO2(g) d_CO2(g) gypsum d_gypsum si_Gypsum
1 i_soln 1 -99 -99 -99 7 4 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -999.9990
1 react 1 -99 0 1 8.27904 -4.94284 0.0000e+00 1.0000e+01 -3.1538e-08 1.0000e+01 1.1047e-08 9.9995e+00 -4.9340e-04 9.9995e+00 -4.8697e-04 0.0000e+00 0.0000e+00 -6.1283
1 react 1 -99 0 2 8.17103 -4.28707 5.0000e-04 9.9997e+00 -2.6667e-04 1.0000e+01 2.6666e-04 9.9991e+00 -9.2766e-04 1.0000e+01 1.4180e-04 0.0000e+00 0.0000e+00 -2.0202
1 react 1 -99 0 3 7.98207 -3.97043 2.5000e-03 9.9987e+00 -1.3333e-03 1.0001e+01 1.3333e-03 9.9971e+00 -2.9374e-03 1.0002e+01 2.3951e-03 0.0000e+00 0.0000e+00 -1.0629
1 react 1 -99 0 4 7.88418 -3.81741 5.0001e-03 9.9973e+00 -2.6667e-03 1.0003e+01 2.6666e-03 9.9944e+00 -5.5594e-03 1.0005e+01 5.1054e-03 0.0000e+00 0.0000e+00 -0.6499
1 react 1 -99 0 5 7.71922 -3.56545 2.5011e-02 9.9867e+00 -1.3333e-02 1.0013e+01 1.3333e-02 9.9732e+00 -2.6841e-02 1.0026e+01 2.6489e-02 9.0018e-03 9.0018e-03 0.0000

0
Sun/examples/ex6.log Normal file
View File

3053
Sun/examples/ex6.out Normal file

File diff suppressed because it is too large Load Diff

22
Sun/examples/ex6A-B.sel Normal file
View File

@ -0,0 +1,22 @@
sim state soln dist_x time step pH pe la_K+ la_H+ la_H4SiO4 Gibbsite d_Gibbsite Kaolinite d_Kaolinite K-mica d_K-mica K-feldspar d_K-feldspar si_Gibbsite si_Kaolinite si_K-mica si_K-feldspar
1 i_soln 1 -99 -99 -99 6.99977 4 -1.0000e+03 -6.9998e+00 -1.0000e+03 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -999.9990 -999.9990 -999.9990 -999.9990
2 react 1 -99 0 1 7.00609 11.4683 -7.5735e+00 -7.0061e+00 -7.0969e+00 1.0000e+01 -2.6709e-08 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000 -3.8037 -10.6810 -14.6840
3 react 1 -99 0 1 8.2125 9.89391 -5.6625e+00 -8.2125e+00 -5.1950e+00 1.7820e-06 1.7820e-06 1.0000e+01 -2.1788e-06 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -0.0000 -0.0000 -1.8580 -5.8610
4 react 1 -99 0 1 9.10891 9.06313 -4.7009e+00 -9.1089e+00 -4.4670e+00 0.0000e+00 0.0000e+00 9.7149e-06 9.7149e-06 1.0000e+01 -2.0015e-05 0.0000e+00 0.0000e+00 -0.7280 0.0000 -0.0000 -2.5471
5 react 1 -99 0 1 9.3893 8.71926 -3.9009e+00 -9.3893e+00 -3.5536e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 6.3607e-05 6.3607e-05 9.9998e+00 -1.9088e-04 -2.0015 -0.7202 -0.0000 -0.0000
6 react 1 -99 0 1 8.35402 9.7856 -5.5204e+00 -8.3540e+00 -5.1950e+00 1.0000e+01 -3.0232e-06 1.0000e+00 1.2370e-06 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000 -0.0000 -1.5744 -5.5774
7 react 1 -99 0 1 9.06998 8.8364 -4.6620e+00 -9.0700e+00 -4.2522e+00 0.0000e+00 0.0000e+00 1.0000e+01 -3.2683e-05 1.0000e+00 1.0785e-05 0.0000e+00 0.0000e+00 -0.9428 0.0000 0.0000 -2.1175
8 react 1 -99 0 1 7.03143 11.4569 -7.3981e+00 -7.0314e+00 -6.9215e+00 1.1865e-08 1.1865e-08 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -0.0000 -3.4530 -9.9542 -13.9572
8 react 1 -99 0 2 7.10578 11.2881 -7.0971e+00 -7.1058e+00 -6.6206e+00 4.7135e-08 4.7135e-08 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -0.0000 -2.8512 -8.6762 -12.6792
8 react 1 -99 0 3 7.24112 11.2405 -6.7961e+00 -7.2411e+00 -6.3199e+00 1.1602e-07 1.1602e-07 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000 -2.2497 -7.3376 -11.3406
8 react 1 -99 0 4 7.45138 11.1879 -6.4952e+00 -7.4514e+00 -6.0195e+00 2.4993e-07 2.4993e-07 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -0.0000 -1.6491 -5.9254 -9.9284
8 react 1 -99 0 5 7.71458 10.9939 -6.1942e+00 -7.7146e+00 -5.7200e+00 5.1299e-07 5.1299e-07 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000 -1.0500 -4.4627 -8.4657
8 react 1 -99 0 6 7.89551 10.7897 -6.0005e+00 -7.8955e+00 -5.5279e+00 8.0811e-07 8.0811e-07 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000 -0.6658 -3.5117 -7.5147
8 react 1 -99 0 7 8.17803 10.4976 -5.6997e+00 -8.1780e+00 -5.2314e+00 1.6334e-06 1.6334e-06 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000 -0.0728 -2.0389 -6.0419
8 react 1 -99 0 8 8.48402 9.39003 -5.3990e+00 -8.4840e+00 -5.0858e+00 0.0000e+00 0.0000e+00 1.7119e-06 1.7119e-06 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -0.1092 -0.0000 -1.3229 -5.1076
8 react 1 -99 0 9 8.77878 9.50556 -5.0983e+00 -8.7788e+00 -4.8166e+00 0.0000e+00 0.0000e+00 3.6945e-06 3.6945e-06 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -0.3784 -0.0000 -0.7276 -3.9737
8 react 1 -99 0 10 9.0347 8.80148 -4.7979e+00 -9.0347e+00 -4.5514e+00 0.0000e+00 0.0000e+00 7.7006e-06 7.7006e-06 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 -0.6436 0.0000 -0.1712 -2.8871
8 react 1 -99 0 11 9.07198 8.97748 -4.6640e+00 -9.0720e+00 -4.2616e+00 0.0000e+00 0.0000e+00 5.2701e-07 5.2701e-07 1.0204e-05 1.0204e-05 0.0000e+00 0.0000e+00 -0.9334 0.0000 -0.0000 -2.1362
8 react 1 -99 0 12 9.2252 8.68998 -4.3726e+00 -9.2252e+00 -3.9889e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 2.1273e-05 2.1273e-05 0.0000e+00 0.0000e+00 -1.3543 -0.2964 0.0000 -1.2945
8 react 1 -99 0 13 9.30457 8.57016 -4.1800e+00 -9.3046e+00 -3.8127e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 3.3294e-05 3.3294e-05 0.0000e+00 0.0000e+00 -1.6212 -0.4777 0.0000 -0.7607
8 react 1 -99 0 14 9.3893 8.9467 -3.9009e+00 -9.3893e+00 -3.5536e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 6.3607e-05 6.3607e-05 9.1200e-06 9.1200e-06 -2.0015 -0.7202 -0.0000 0.0000

9
Sun/examples/ex6C.sel Normal file
View File

@ -0,0 +1,9 @@
pH+log[K] log[H4SiO4]
-6.0002e+00 -1.2524e+01
-1.8975e+00 -8.4212e+00
-8.5316e-01 -7.3798e+00
3.5755e-01 -6.3763e+00
2.1823e+00 -5.3818e+00
4.1360e+00 -4.6005e+00
5.2614e+00 -3.7187e+00
5.4884e+00 -3.5536e+00

0
Sun/examples/ex7.log Normal file
View File

2819
Sun/examples/ex7.out Normal file

File diff suppressed because it is too large Load Diff

27
Sun/examples/ex7.sel Normal file
View File

@ -0,0 +1,27 @@
sim state reaction si_CO2(g) si_CH4(g) si_N2(g) si_NH3(g) pressure total mol volume g_CO2(g) g_CH4(g) g_N2(g) g_NH3(g)
1 i_soln -99 -999.9990 -999.9990 -999.9990 -999.9990 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
1 react -99 -1.5000 -26.2591 -999.9990 -999.9990 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
2 react 1.0000e-03 -1.3544 -0.4402 -3.8961 -8.3809 1.1000e+00 1.0000e-25 2.2242e-24 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
2 react 2.0000e-03 -1.2453 -0.1392 -3.6436 -8.1826 1.1000e+00 1.0000e-25 2.2242e-24 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
2 react 3.0000e-03 -1.1592 0.0130 -3.5015 -8.0869 1.1000e+00 8.5793e-05 1.9082e-03 5.4061e-06 8.0362e-05 2.4578e-08 6.3856e-13
2 react 4.0000e-03 -1.0929 0.0081 -3.3212 -8.0234 1.1000e+00 6.4416e-04 1.4327e-02 4.7279e-05 5.9660e-04 2.7953e-07 5.5492e-12
2 react 8.0000e-03 -0.9101 -0.0107 -2.9007 -7.8887 1.1000e+00 2.9972e-03 6.6664e-02 3.3511e-04 2.6587e-03 3.4247e-06 3.5204e-11
2 react 1.6000e-02 -0.7156 -0.0438 -2.4738 -7.7606 1.1000e+00 8.2421e-03 1.8332e-01 1.4423e-03 6.7746e-03 2.5169e-05 1.3002e-10
2 react 3.2000e-02 -0.5438 -0.0941 -2.0462 -7.6302 1.1000e+00 2.0521e-02 4.5644e-01 5.3332e-03 1.5021e-02 1.6775e-04 4.3718e-10
2 react 6.4000e-02 -0.4248 -0.1517 -1.7252 -7.5359 1.1000e+00 4.9404e-02 1.0988e+00 1.6888e-02 3.1671e-02 8.4558e-04 1.3075e-09
2 react 1.2500e-01 -0.3613 -0.1954 -1.5662 -7.4966 1.1000e+00 1.0982e-01 2.4427e+00 4.3447e-02 6.3666e-02 2.7111e-03 3.1820e-09
2 react 2.5000e-01 -0.3288 -0.2227 -1.4927 -7.4823 1.1000e+00 2.3770e-01 5.2868e+00 1.0135e-01 1.2940e-01 6.9491e-03 7.1171e-09
2 react 5.0000e-01 -0.3131 -0.2373 -1.4597 -7.4772 1.1000e+00 4.9570e-01 1.1025e+01 2.1912e-01 2.6094e-01 1.5635e-02 1.5019e-08
2 react 1.0000e+00 -0.3055 -0.2448 -1.4443 -7.4751 1.1000e+00 1.0128e+00 2.2527e+01 4.5565e-01 5.2406e-01 3.3103e-02 3.0832e-08
3 react 1.0000e-03 -2.7554 -3.2432 -4.4230 -9.1701 2.3652e-03 2.1751e-03 2.2500e+01 1.6151e-03 5.2527e-04 3.4720e-05 6.2162e-10
3 react 2.0000e-03 -2.6525 -2.9422 -4.1221 -8.9453 3.4435e-03 3.1668e-03 2.2500e+01 2.0468e-03 1.0505e-03 6.9421e-05 1.0430e-09
3 react 3.0000e-03 -2.5681 -2.7661 -3.9462 -8.8230 4.5301e-03 4.1661e-03 2.2500e+01 2.4862e-03 1.5758e-03 1.0409e-04 1.3823e-09
3 react 4.0000e-03 -2.4967 -2.6412 -3.8215 -8.7406 5.6217e-03 5.1699e-03 2.2500e+01 2.9303e-03 2.1010e-03 1.3872e-04 1.6713e-09
3 react 8.0000e-03 -2.2889 -2.3402 -3.5212 -8.5555 1.0011e-02 9.2068e-03 2.2500e+01 4.7283e-03 4.2016e-03 2.7697e-04 2.5595e-09
3 react 1.6000e-02 -2.0415 -2.0392 -3.2214 -8.3855 1.8825e-02 1.7312e-02 2.2500e+01 8.3576e-03 8.4019e-03 5.5233e-04 3.7856e-09
3 react 3.2000e-02 -1.7694 -1.7383 -2.9223 -8.2251 3.6471e-02 3.3540e-02 2.2500e+01 1.5640e-02 1.6800e-02 1.0998e-03 5.4762e-09
3 react 6.4000e-02 -1.4834 -1.4374 -2.6240 -8.0704 7.1755e-02 6.5989e-02 2.2500e+01 3.0213e-02 3.3590e-02 2.1859e-03 7.8205e-09
3 react 1.2500e-01 -1.2004 -1.1468 -2.3367 -7.9240 1.3896e-01 1.2779e-01 2.2500e+01 5.7976e-02 6.5580e-02 4.2353e-03 1.0956e-08
3 react 2.5000e-01 -0.9036 -0.8460 -2.0399 -7.7740 2.7653e-01 2.5431e-01 2.2500e+01 1.1482e-01 1.3110e-01 8.3897e-03 1.5474e-08
3 react 5.0000e-01 -0.6049 -0.5452 -1.7426 -7.6246 5.5147e-01 5.0716e-01 2.2500e+01 2.2843e-01 2.6209e-01 1.6634e-02 2.1827e-08
3 react 1.0000e+00 -0.3050 -0.2442 -1.4438 -7.4749 1.1013e+00 1.0128e+00 2.2500e+01 4.5563e-01 5.2406e-01 3.3101e-02 3.0813e-08

0
Sun/examples/ex8.log Normal file
View File

3612
Sun/examples/ex8.out Normal file

File diff suppressed because it is too large Load Diff

27
Sun/examples/ex8.sel Normal file
View File

@ -0,0 +1,27 @@
sim state soln dist_x time step pH pe m_Zn+2 m_Hfo_wOZn+ m_Hfo_sOZn+
2 react 1 -99 0 1 5 15.0946 9.9667e-08 1.3194e-11 3.1498e-10
3 react 1 -99 0 1 5.25 14.8089 9.9093e-08 3.6118e-11 8.6216e-10
4 react 1 -99 0 1 5.5 14.5232 9.7567e-08 9.7221e-11 2.3200e-09
5 react 1 -99 0 1 5.75 14.2374 9.3657e-08 2.5418e-10 6.0611e-09
6 react 1 -99 0 1 6 13.9517 8.4476e-08 6.2406e-10 1.4855e-08
7 react 1 -99 0 1 6.25 13.666 6.6695e-08 1.3446e-09 3.1897e-08
8 react 1 -99 0 1 6.5 13.3803 4.2322e-08 2.3406e-09 5.5265e-08
9 react 1 -99 0 1 6.75 13.0946 2.1052e-08 3.2179e-09 7.5665e-08
10 react 1 -99 0 1 7 12.8089 8.7494e-09 3.7289e-09 8.7472e-08
11 react 1 -99 0 1 7.25 12.5232 3.3000e-09 3.9564e-09 9.2708e-08
12 react 1 -99 0 1 7.5 12.2374 1.1903e-09 4.0447e-09 9.4740e-08
13 react 1 -99 0 1 7.75 11.9517 4.2114e-10 4.0771e-09 9.5483e-08
14 react 1 -99 0 1 8 11.666 1.4799e-10 4.0887e-09 9.5749e-08
15 react 2 -99 0 1 5 15.0946 9.9686e-05 1.3187e-08 2.9620e-07
16 react 2 -99 0 1 5.25 14.8089 9.9220e-05 3.6081e-08 7.3494e-07
17 react 2 -99 0 1 5.5 14.5231 9.8300e-05 9.7297e-08 1.5866e-06
18 react 2 -99 0 1 5.75 14.2374 9.6947e-05 2.5891e-07 2.7658e-06
19 react 2 -99 0 1 6 13.9517 9.5437e-05 6.8302e-07 3.8297e-06
20 react 2 -99 0 1 6.25 13.666 9.3651e-05 1.7815e-06 4.4782e-06
21 react 2 -99 0 1 6.5 13.3803 9.0584e-05 4.4798e-06 4.7815e-06
22 react 2 -99 0 1 6.75 13.0946 8.4566e-05 1.0266e-05 4.9051e-06
23 react 2 -99 0 1 7 12.8088 7.4581e-05 2.0039e-05 4.9534e-06
24 react 2 -99 0 1 7.25 12.5229 6.1786e-05 3.2572e-05 4.9732e-06
25 react 2 -99 0 1 7.5 12.2374 4.8388e-05 4.5601e-05 4.9823e-06
26 react 2 -99 0 1 7.75 11.9517 3.5918e-05 5.7508e-05 4.9871e-06
27 react 2 -99 0 1 8 11.666 2.5127e-05 6.7404e-05 4.9897e-06

0
Sun/examples/ex9.log Normal file
View File

Some files were not shown because too many files have changed in this diff Show More