204 Commits

Author SHA1 Message Date
David L Parkhurst
ab440058fb Working on IPhreeqc Basic callback. Compiles with ISO_C_BINDING, but may need some more debugging.
Need to merge this change with PhreeqcRM-trunk.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9424 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-03-27 22:03:36 +00:00
David L Parkhurst
a6d63e33b5 Commented dead code related to density of water in Pitzer.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9396 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-03-25 16:47:42 +00:00
David L Parkhurst
ffd459c6db Added SYS("equi", count, name$, type$, moles).
Equi option was never implemented.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9388 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-03-24 19:41:09 +00:00
David L Parkhurst
cfa5f98e1f Fixed bug in SURF(O/H,surf). H and O not counted correctly. Went back to old method before it was changed to account for redox master species (Fe(2)), for example. H(0) H(+1), O(-2) and O(0) probably do not work correctly, but I think everything else will.
Added test case surf_total.out

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9309 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-02-25 00:36:03 +00:00
David L Parkhurst
8e104d5463 Roughed in surface area calculation by DeClercq (sa_declercq for now).
Fixed bug where H+ was missing from list of aqueous species generated by SYS.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9230 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-02-03 15:58:09 +00:00
David L Parkhurst
8262d5f224 Added diff_c function to basic.
Added test case diff_c to mytest.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9072 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-11-18 18:29:27 +00:00
Scott R Charlton
a28ca9a300 changed all fortran string length parameters to be size_t
simplified fortran wrappers for windows


git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9015 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-10-29 01:59:37 +00:00
David L Parkhurst
e036c2c40c Added logic to run only one step in RunCells
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8951 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-09-12 22:11:27 +00:00
David L Parkhurst
e168691097 Another try to speed up rates.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8890 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-07-29 22:07:19 +00:00
David L Parkhurst
98741bbe32 finalizing compute_gfw
using map for rates

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8888 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-07-29 20:39:38 +00:00
David L Parkhurst
9f0ee02150 Trying to optimize compute_gfw.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8884 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-07-29 18:51:51 +00:00
David L Parkhurst
660042da0e Changed variable from max to max_cells.
Added variable all_cells to be able to initialize new cell_data.
moved old_cells, max_cells, all_cells to phreeqc class.

initialized old_cells, max_cells, all_cells in init of phreeqc class. 
Added to copy constructor.

changed logic for switching to numerical derivatives by adding && numerical_fixed_volume == false
if (iterations > 99 && numerical_fixed_volume == false)

Added 
			gammas_pz();
			jacobian_sums();
For restart in pitzer.cpp

Added 
			gammas_sit();
			jacobian_sums();
for restart in sit.cpp.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8835 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-07-11 20:05:09 +00:00
David L Parkhurst
caf7554690 Added solution number method.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8754 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-05-20 20:07:04 +00:00
David L Parkhurst
c43019c496 Roughing in mcd capability.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8536 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-02-28 21:29:53 +00:00
David L Parkhurst
b5e86c636e Do not dump negative entities.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8502 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-02-19 16:57:35 +00:00
David L Parkhurst
aee604b56e Changed read _modify to warning if entity not found.
Tony's bug in phrq_io. punch_ostream was deleted twice.

roughed in REACTION_TEMPERATURE_MODIFY and REACTION_PRESSURE_MODIFY. Think they work, and 
added to test case modify_ignore.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8453 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-02-06 18:28:24 +00:00
David L Parkhurst
9d9e86f875 Added next_user_number to Phreeqc.
Added a template function Rxn_next_user_number.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8397 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-01-24 00:34:03 +00:00
David L Parkhurst
9048a9be86 Bugs fixes noted by Marco De-Vroed
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8371 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-01-14 20:42:12 +00:00
David L Parkhurst
57014d0f5c Renamed Reaction_module to PhreeqcRM
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8309 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-12-11 18:16:37 +00:00
David L Parkhurst
4983afc68e Got a request for interacting sites, such as this surface complex.
Anat_uniOH(Anat_diO)Sn(OH)2-1

Not sure how one would calculate an activity (equivalent fraction), so did not change, but
added add_elt_list_multi_surf for a start. Would also need to change gammas to 
change the way the activity coefficient for the mixed species was calculated.



git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8009 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-09-05 17:06:20 +00:00
Scott R Charlton
adf7d98498 Merged revision(s) 7863-7986 from phreeqc3/branches/multi_punch:
Branching at 7862 for multiple SELECTED_OUTPUT, USER_PUNCH
........
Have multiple SELECTED_OUTPUT working.

Need to have multiple USER_PUNCH.
........
Think multiple instances of both SELECTED_OUTPUT and USER_PUNCH are working.
........
Fixed up inverse.cpp a bit.
........
Fixed missing -pressure in solution dump_raw and read_raw.
........
Merging revisedfandg back into trunk. Makes Excel spreadsheet for carbon-14 dating.

OK by Niel. Has Revised_Fontes_ and_Garnier_ in_NetpathXL.docx to add for documentation.
........
Added Revised_Fontes_ and_Garnier_ in_NetpathXL.docx to installation
Fixed bug that wouldn't allow uninstall
........
updated ftp targets
........
NetpathXL 1.4
........
checkin from make
........
latest test with change in Pitzer pressure, -pressure in SOLUTION_RAW, runs modify_test, has error
........
bugs linux caught, something different about when to print headings
........
Working on multipunch
........
working on high_precision, using SELECTED_OUTPUT 1
........
dump precision
........
Added basic functions:
EQ_FRAC
KIN_TIME
SPECIES_FORMULA
STR_F
STR_E
Added //{{NEW BASIC HERE}} for updating BASIC routines

........
Making backward compatible.

Copying all but lists.

Revised tidy_punch logic.
........
Still working to make backward compatible.

Think there will be one diff, headings will not be rewritten (ddl_flux).
........
updated dump tests (new -pressure line)
........
multi_punch branch

........
Added a Fortran callback.

Will try to revise so that the same callback works for Fortran and C.
........
Revised name to BasicFortran

Added methods for C call SetBasicCallback.

Need to check C side and documentation.
........


git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7987 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-08-28 23:11:07 +00:00
Scott R Charlton
6eaca680af all tests passing for one selected_output file;
may still need additional tests for TestIPhreeqc case1 and case2

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/branches/multi_punch@7919 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-08-12 22:24:18 +00:00
Richard M Webb
b18d2ff0d2 Guard namespace.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7899 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-08-08 21:49:04 +00:00
David L Parkhurst
30164dc7fd functions are fcn
Added cookie to c callback.



git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7895 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-08-08 19:53:31 +00:00
David L Parkhurst
88742cdb36 Fixed post-build in project
Phreeqc.h was jacked up??? The has_infinite block did not end until the end of the file.

Made the arguments for the C callback double, double, const char *.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7888 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-08-07 17:01:30 +00:00
David L Parkhurst
305cd8631d Revised name to BasicFortran
Added methods for C call SetBasicCallback.

Need to check C side and documentation.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7884 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-08-05 20:53:54 +00:00
David L Parkhurst
346cf2239b Added a Fortran callback.
Will try to revise so that the same callback works for Fortran and C.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7883 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-08-05 18:56:31 +00:00
David L Parkhurst
ce4284a561 working on high_precision, using SELECTED_OUTPUT 1
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/branches/multi_punch@7876 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-08-01 22:48:14 +00:00
David L Parkhurst
3893414278 Think multiple instances of both SELECTED_OUTPUT and USER_PUNCH are working.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/branches/multi_punch@7865 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-07-31 23:07:07 +00:00
David L Parkhurst
276322a936 Have multiple SELECTED_OUTPUT working.
Need to have multiple USER_PUNCH.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/branches/multi_punch@7864 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-07-31 19:26:34 +00:00
David L Parkhurst
79698b010d Tony's fixes for Pitzer, High Pressure is still not right,
will require more fitting.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7854 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-07-23 14:51:26 +00:00
David L Parkhurst
7848242e28 Fixed error for malloc introduced in recent Basic function.
Fixed error with Pitzer paramenters that were not recalculated with
a change in pressure. Parameters depend on density of water I think.
Also changed SIT, although I am not sure the parameters have a pressure
dependence.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7837 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-07-17 21:15:01 +00:00
David L Parkhurst
a03d2ae87e Added f = EQ_FRAC("AlX3", eq, x$)
Also added synonyms PHASE_FORMULA$ and SPECIES_FORMULA$.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7829 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-07-16 19:25:14 +00:00
David L Parkhurst
ff764f3fe5 Added species_formula("CaOH+", count, elt$, coef)
returns
Ca 1
O  1
H  1
charge 1 
in elt$ and coef.
count is 4.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7827 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-07-16 16:37:19 +00:00
David L Parkhurst
145fcc00ba vcxproj has some change.
Tony's updates to initialize pr_in

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7741 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-05-29 19:56:14 +00:00
David L Parkhurst
c176fe3b2e Cleaning up code.
Removed PHREEQC2 ifdef.

Some SKIP.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7717 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-05-14 20:15:31 +00:00
David L Parkhurst
47d0c62fc3 Added new Basic function kin_time, which is the time interval for the current kinetic integration.
kin_delta/kin_time is the average rate over the time interval.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7676 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-05-01 16:14:16 +00:00
David L Parkhurst
d71ea17a3e Added logic for rate limiter, but not used.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7666 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-04-30 16:41:40 +00:00
David L Parkhurst
f73a156b02 revised cvode is working I think.
Had to be careful when updating m_temp and use the saved solutions.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7650 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-04-26 14:08:29 +00:00
Scott R Charlton
0cb1337f19 added patch from tmishima@jcity.maeda.co.jp for multi-threaded IPhreeqc
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7649 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-04-26 01:06:27 +00:00
David L Parkhurst
4733f935ed Working on REVISED_CVODE ifdef.
Runs correctly, but does not produce correct deltas.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7617 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-04-04 19:41:26 +00:00
David L Parkhurst
7bb4d37189 cvode
MAX_ITERS 40
   hnew = hg
   predict_fail
   CVMEM cvode_error == TRUE || predict_fail after CVnls
   if (CVMEM cvode_error == TRUE) after CVNewtonIteration
   CVDoErrorTest exit(4);

model
Phreeqc.cpp
pitzer.cpp
sit.cpp
   new status ifdef'd with NPP
   250 ms delay
   new global variable std::string string_status

!!prep: switch_bases 10 to 100 orders of mag. Need to check

utilities.cpp: new status



git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7585 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-03-29 16:03:51 +00:00
David L Parkhurst
1342a5c580 Alternate method for sum_species
fixed memory leak when copying phreeqc instance with llnl.dat

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7473 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-02-19 19:40:11 +00:00
David L Parkhurst
27e3f75c4e Optimized sum_species.
Keeps lists of species in a map <std::string, std::vector<std::string> > sum_species_map.

resets map whenever s_x changes (tidy and prep)

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7470 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-02-15 18:06:29 +00:00
David L Parkhurst
deace44a7a make IPhreeqcPhast and Reaction_module a friend of Phreeqc.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7456 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-02-11 19:48:57 +00:00
David L Parkhurst
047414274f Working on Phreeqc copy
Running ion association model with equilibrium phases
Running Pitzer.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7449 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-02-07 22:07:33 +00:00
David L Parkhurst
a1d93167ae Tony's changes to the status timer.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7438 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-02-04 19:25:05 +00:00
David L Parkhurst
2109cc8f22 Added active_charts to ChartHandler.
Incremented when form starts, decremented when form ends.

Removed revisions and PHREEQCPP-RELEASE.txt

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7248 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-12-20 23:22:16 +00:00
David L Parkhurst
6f22118508 Changed Rxn_new from vector to set.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7223 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-12-18 19:23:46 +00:00
David L Parkhurst
b75ce1b704 Fixed bug with _modify. Did not get correct n_user!
Added asserts for n_user not found from Rxn_new.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7221 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-12-18 18:04:57 +00:00