65 Commits

Author SHA1 Message Date
David Parkhurst
07a864d1a6 all jacobians are consistent. Looks pretty good. 2021-07-17 12:21:02 -06:00
David Parkhurst
56975a7e0c Saved surface for numerical derivatives 2021-07-17 08:49:17 -06:00
David Parkhurst
df0d68b9d5 Runs all the test cases. Numerical derivatives work, but still some changes in residuals before and after jacobian calculations. 2021-07-16 22:27:03 -06:00
David Parkhurst
6bd936e0d7 Fixed numerical derivative (non-pitzer) 2021-07-15 20:37:58 -06:00
David Parkhurst
0dde2b010f removed comments 2021-07-15 11:44:28 -06:00
David Parkhurst
aef51fa3e6 Finally have derivatives right, I think 2021-07-15 11:38:17 -06:00
David Parkhurst
20281a0e7a always reset gases 2021-07-14 13:53:28 -06:00
David Parkhurst
13ec2fcd3e best I could do for H2S while maintaining old tests. Used INCREMENTAL reactions 2021-07-13 14:24:00 -06:00
David Parkhurst
8be1ba8327 revised jacobian_pz with new logic. Works with fixed_pressure examples H2S, H2S_pz, H2S_pz_appt, H2S_NaCl_Na2SO4. 2021-07-10 16:37:37 -06:00
David Parkhurst
71cf2a97b7 still produces different residuals 2021-07-07 23:55:03 -06:00
David Parkhurst
9022ded877 Tony H2S. Amm.dat, phreeqc.dat, pitzer.dat, utf8, updated test cases 2021-07-06 21:52:06 -06:00
Scott R Charlton
63175ab743 [phreeqci] fixed header error with phast 2021-04-23 14:06:58 -06:00
Scott R Charlton
d0c821238d [phreeqci] added 'new' debugging 2021-04-19 17:17:02 -06:00
David Parkhurst
369733e9b5 converted to classes 2021-04-06 22:21:54 -06:00
David Parkhurst
5d76f82542 copy operator works well enough 2021-04-06 00:20:52 -06:00
David Parkhurst
7bd13ffafa new/delete theta params, pitz_param_copy 2021-04-04 08:31:58 -06:00
David Parkhurst
50e8903ea4 new/delete pitz_params 2021-04-04 07:51:32 -06:00
David Parkhurst
87d67929c0 reverting changes to sit_params and theta_params. Will consider using new and delet 2021-04-03 22:26:30 -06:00
David Parkhurst
ac3335ed16 theta_params 2021-04-03 18:36:45 -06:00
David Parkhurst
028e90899c moving to CReaction 2021-04-01 16:58:43 -06:00
David Parkhurst
9fd3f2a26a save_values rewritten with map 2021-03-30 23:48:37 -06:00
David Parkhurst
318e267cf7 (size_t) max and count 2021-03-29 21:15:00 -06:00
David Parkhurst
c748922b5e added const qualifier for all the parsing 2021-03-26 15:16:04 -06:00
David Parkhurst
6907bb06c4 base, sit arrays 2021-03-24 08:31:54 -06:00
David Parkhurst
90e8412074 starting on pitzer 2021-03-23 23:17:46 -06:00
David Parkhurst
2f380479b1 size_t for subscripts 2021-03-20 14:03:20 -06:00
David Parkhurst
0957a528df vector theta_params 2021-03-15 23:19:42 -06:00
David Parkhurst
b1af156bcb vector pitz_params 2021-03-15 23:00:38 -06:00
David Parkhurst
622d3618a5 vector s_x 2021-03-15 18:21:12 -06:00
David Parkhurst
de1ba62395 vector s 2021-03-15 13:21:14 -06:00
David Parkhurst
55ea163dd0 Implicit seems to be working with Tony's latest changes 2019-05-30 22:03:38 -06:00
David Parkhurst
2b14a9475c Tony's changes 20190117 2019-01-28 17:24:59 -07:00
David Parkhurst
53148278fc Tony's changes; diffuse layer with pitzer 2018-08-01 17:44:32 -06:00
David Parkhurst
86a55b5b5d Tony's changes from 20180305 2018-03-07 17:08:33 -07:00
David Parkhurst
8e12139000 Fixed bug from Shell. Segv because s_list.size differed from count_s_x.
Fixed compiler warnings from jenkins.
2018-02-22 14:45:39 -07:00
David L Parkhurst
b121ec3bfe Added tests for PR calculations with water ex7_T_P pr_h2o.
Added to Makefile
Tony's change to prep.cpp to keep phi(H2O) in a good range.
Changes to allow Jonathon Toner to define A(phi).

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@12464 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2017-02-28 21:52:19 +00:00
David L Parkhurst
c6e273379e shrink_array for pitzer in model.cpp
Mapped changes from sit to PITZER
   pitzer_revise_guesses
   model_pz
      change bases.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@11400 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2016-06-30 18:06:16 +00:00
David L Parkhurst
bef66de3c3 Fixed formula for pressure dependence of B1, B2, F1, F2. Previously had a limit of -10C, otherwise produced a floating point exception.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@10385 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-10-15 20:04:36 +00:00
David L Parkhurst
1b4a307609 Null pointer if K-Cl interaction parameters (b0, b1, c0) were not defined.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@10030 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-07-23 23:17:50 +00:00
David L Parkhurst
e5a9600447 Removed dead code from pitzer
Make lists only in prep.

Fixed bug, needed to use sit_count_cations, etc.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9809 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-06-09 16:16:20 +00:00
David L Parkhurst
b9b841411a Tweaking lists.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9808 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-06-09 15:58:10 +00:00
David L Parkhurst
7e2a34cc7d Make sure MacInnis pitzer parameters are calculated.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9806 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-06-09 15:32:12 +00:00
David L Parkhurst
6de09799c9 Trying Pitzer lists again.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9802 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-06-09 13:46:17 +00:00
David L Parkhurst
c319dc836e reverted Pitzer optimization.
Not sure what goes wrong.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9794 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-06-08 16:49:50 +00:00
David L Parkhurst
4e07ab28e7 Optimizations for pitzer.cpp
Change in PTEMP did not work for unknown reasons.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9793 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-06-08 15:43:42 +00:00
David L Parkhurst
51db3a1569 Shrink array for SIT
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9648 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-05-13 20:42:47 +00:00
Scott R Charlton
ba6f7f7bef fixed crash that occurred when pitzer.dat was loaded twice
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9509 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-04-13 23:31:45 +00:00
David L Parkhurst
793df0c22a error check for Pitzer parameter was wrong
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9421 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2015-03-27 14:33:23 +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
Scott R Charlton
25508288fb removed set but not used variables using gcc 4.8.2[-Wunused-but-set-variable]
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8821 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2014-07-09 01:46:43 +00:00