diff --git a/doc/RELEASE.TXT b/doc/RELEASE.TXT index 90c99ad9..fe1208dc 100644 --- a/doc/RELEASE.TXT +++ b/doc/RELEASE.TXT @@ -3,8 +3,8 @@ Version @PHREEQC_VER@: @PHREEQC_DATE@ ----------------- October 8, 2024 ----------------- - PHREEQC: Improved algorithem for transport of heat in TRANSPORT, and included - additional viscosity effects in transport calculations. + PHREEQC: Revised the multicomponent diffusion calculation of heat and solutes, + accounting now for the heat also for the T-dependent viscosity of the solutions. ----------------- October 8, 2024 @@ -17,7 +17,10 @@ Version @PHREEQC_VER@: @PHREEQC_DATE@ October 8, 2024 ----------------- PHREEQC: Fixed bug in MIX that produced erroneous temperature and pressure - if the solutions being mixed did not have 1 kg of water. + if the solutions being mixed did not have 1 kg of water. (Note that PHREEQC does + not consider the heat content of the solutions when the temperature of the mixture + is calculated.) + Version 3.8.2: August 29, 2024 ----------------- diff --git a/mytest/ex13_impl.out b/mytest/ex13_impl.out index 0dbc383c..d672ac17 100644 --- a/mytest/ex13_impl.out +++ b/mytest/ex13_impl.out @@ -1,4 +1,3 @@ -WARNING: Database file from DATABASE keyword is used; command line argument ignored. Input file: ex13_impl Output file: ex13_impl.out Database file: ../database/wateq4f.dat @@ -262,6 +261,10 @@ Calculating transport: 10 (mobile) cells, 1 shifts, 338 mixruns... WARNING: No porosities were read; used the value 3.00e-01 from -multi_D. WARNING: -Calculating implicit transport: 10 (mobile) cells, 1 shifts, 15 mixruns, max. mixf = 10. +Calculating implicit transport: 10 (mobile) cells, 1 shifts, 16 mixruns, max. mixf = 10. +------------------------------- +End of Run after 1.322 Seconds. +------------------------------- + diff --git a/src/transport.cpp b/src/transport.cpp index 28b1790e..7bde99d4 100644 --- a/src/transport.cpp +++ b/src/transport.cpp @@ -52,6 +52,7 @@ struct MOLES_ADDED /* total moles added to balance negative conc's */ } *moles_added; int count_moles_added; +#if !defined(NPP) #if defined(_MSC_VER) && (_MSC_VER <= 1400) // VS2005 # define nullptr NULL #endif @@ -61,7 +62,7 @@ int count_moles_added; # define nullptr NULL # endif #endif - +#endif #if defined(PHREEQCI_GUI) #ifdef _DEBUG #define new DEBUG_NEW @@ -1842,7 +1843,7 @@ fill_spec(int l_cell_no, int ref_cell) class master *master_ptr; LDBLE dum, dum2, l_tk_x; LDBLE lm; - LDBLE por, por_il, viscos_f0, viscos_f, viscos_il_f0, viscos, viscos_0; + LDBLE por, por_il, viscos_f0, viscos_f, viscos_il_f0, viscos, viscos0; bool x_max_done = false; std::set loc_spec_names; @@ -1914,13 +1915,15 @@ fill_spec(int l_cell_no, int ref_cell) * correct diffusion coefficient for temperature Dw(TK) = Dw(298.15) * exp(dw_t / TK - dw_t / 298.15), SC data from Robinson and Stokes, 1959 * and viscosity, D_T = D_298 * viscos_0_298 / viscos_0_tk */ - sol_D[l_cell_no].viscos_0 = viscos_0 = Utilities::Rxn_find(Rxn_solution_map, l_cell_no)->Get_viscos_0(); sol_D[l_cell_no].viscos = viscos = Utilities::Rxn_find(Rxn_solution_map, l_cell_no)->Get_viscosity(); + sol_D[l_cell_no].viscos_0 = viscos0 = Utilities::Rxn_find(Rxn_solution_map, l_cell_no)->Get_viscos_0(); + if (!sol_D[l_cell_no].viscos_0) + sol_D[l_cell_no].viscos_0 = viscos0 = viscos; /* * put temperature factor in por_factor which corrects for porous medium... */ - dum = viscos_0_25 / viscos_0; - dum2 = viscos_0 / viscos; + dum = viscos_0_25 / viscos0; + dum2 = viscos0 / viscos; viscos_f0 *= dum; viscos_il_f0 *= dum; viscos_f *= dum2; @@ -2129,7 +2132,7 @@ fill_spec(int l_cell_no, int ref_cell) if (s_ptr->dw_a_v_dif) { sol_D[l_cell_no].spec[count_spec].dw_a_v_dif = s_ptr->dw_a_v_dif; - sol_D[l_cell_no].spec[count_spec].Dwt *= pow(viscos_0 / viscos, s_ptr->dw_a_v_dif); + sol_D[l_cell_no].spec[count_spec].Dwt *= pow(viscos0 / viscos, s_ptr->dw_a_v_dif); } else sol_D[l_cell_no].spec[count_spec].dw_a_v_dif = 0.0;