mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Squashed 'phreeqcpp/' changes from e317dd0..7c7fafd
7c7fafd Merge pull request #78 from dlparkhurst/mix_error eb0591c Merge pull request #74 from mwtoews/fix-typos 334df5e Tony's fix in heat transport bf897a2 Marked old error in mix. Updated test case. 58566a6 Fix ah2o in adding a solution. Fixed bad_graph database. 75effd0 Merge branch 'viscosity' into mix_error f4708df account for water mass in addition to mixing fractions 70954c6 mixing by water mass times mixing fraction 84b59ab Fix typos git-subtree-dir: phreeqcpp git-subtree-split: 7c7fafd686d7c41753132a978a1d55d4d25b601b
This commit is contained in:
parent
c155685f63
commit
b537589773
2
Form1.h
2
Form1.h
@ -673,7 +673,7 @@ namespace zdg_ui2 {
|
||||
// Respond to a Zoom Event
|
||||
void MyZoomEvent( ZedGraphControl ^control, ZoomState ^oldState, ZoomState ^newState )
|
||||
{
|
||||
// Here we get notification everytime the user zooms
|
||||
// Here we get notification every time the user zooms
|
||||
}
|
||||
void SetChartOptions( System::Object ^sender, System::EventArgs ^e )
|
||||
{
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
# Release
|
||||
# Debug
|
||||
#
|
||||
# Serial verisons: Release Debug
|
||||
# Serial versions: Release Debug
|
||||
#
|
||||
# Makefile sets CFG variable, cd's to appropriate directory, runs Makefile recursively
|
||||
# Recursive make sets appropriate compiler, objects, options, libraries, and compiles PHREEQC
|
||||
|
||||
@ -2441,8 +2441,8 @@ factor(struct LOC_exec * LINK)
|
||||
require(tokcomma, LINK);
|
||||
varrec* area_varrec = LINK->t->UU.vp;
|
||||
if (LINK->t->kind != tokvar || area_varrec->stringvar != 0)
|
||||
snerr(": Missing or wrong type area varaiable.");
|
||||
// varaiable for thickness
|
||||
snerr(": Missing or wrong type area variable.");
|
||||
// variable for thickness
|
||||
LINK->t = LINK->t->next;
|
||||
require(tokcomma, LINK);
|
||||
varrec* thickness_varrec = LINK->t->UU.vp;
|
||||
@ -5595,7 +5595,7 @@ cmdput(struct LOC_exec *LINK)
|
||||
/* get parentheses */
|
||||
require(toklp, LINK);
|
||||
|
||||
/* get first argumen */
|
||||
/* get first argument */
|
||||
double value = realexpr(LINK);
|
||||
|
||||
for (;;)
|
||||
@ -5628,7 +5628,7 @@ cmdput_(struct LOC_exec* LINK)
|
||||
/* get parentheses */
|
||||
require(toklp, LINK);
|
||||
|
||||
/* get first argumen */
|
||||
/* get first argument */
|
||||
char* str = strexpr(LINK);
|
||||
std::string s_value = str;
|
||||
PhreeqcPtr->PHRQ_free(str);
|
||||
|
||||
@ -1966,7 +1966,7 @@ Phreeqc::InternalCopy(const Phreeqc* pSrc)
|
||||
//count_tally_table_rows = 0;
|
||||
|
||||
/* transport.cpp ------------------------------- */
|
||||
/* storage is created and freed in tranport.cpp */
|
||||
/* storage is created and freed in transport.cpp */
|
||||
sol_D = NULL;
|
||||
sol_D_dbg = NULL;
|
||||
J_ij = NULL;
|
||||
|
||||
@ -1409,7 +1409,7 @@ cxxSolution::add(const cxxSolution & addee, LDBLE extensive)
|
||||
this->ph = f1 * this->ph + f2 * addee.ph;
|
||||
this->pe = f1 * this->pe + f2 * addee.pe;
|
||||
this->mu = f1 * this->mu + f2 * addee.mu;
|
||||
this->ah2o = f1 * this->mu + f2 * addee.ah2o;
|
||||
this->ah2o = f1 * this->ah2o + f2 * addee.ah2o;
|
||||
this->total_h += addee.total_h * extensive;
|
||||
this->total_o += addee.total_o * extensive;
|
||||
this->cb += addee.cb * extensive;
|
||||
|
||||
2
cl1.cpp
2
cl1.cpp
@ -460,7 +460,7 @@ cl1(int k, int l, int m, int n,
|
||||
#endif
|
||||
if (kk < 0)
|
||||
{
|
||||
/* no positive value found in L340 or bypass intermediate verticies */
|
||||
/* no positive value found in L340 or bypass intermediate vertices */
|
||||
*l_kode = 2;
|
||||
goto L590;
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ cl1mp(int k, int l, int m, int n,
|
||||
#endif
|
||||
if (kk < 0)
|
||||
{
|
||||
/* no positive value found in L340 or bypass intermediate verticies */
|
||||
/* no positive value found in L340 or bypass intermediate vertices */
|
||||
*kode = 2;
|
||||
goto L590;
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ class CParser: public PHRQ_base
|
||||
|
||||
Arguments:
|
||||
string Input, character string used in printing error message
|
||||
allow_empty Input, True or false, if a blank line is accepable
|
||||
allow_empty Input, True or false, if a blank line is acceptable
|
||||
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
|
||||
|
||||
@ -155,7 +155,7 @@ Utilities::convert_time(double t, std::string in, std::string out)
|
||||
{
|
||||
t = t * 3600. * 24. * 365.25;
|
||||
}
|
||||
// convert to ouput units
|
||||
// convert to output units
|
||||
if (out.substr(0,1) == "m")
|
||||
{
|
||||
t = t / 60.;
|
||||
|
||||
@ -1672,7 +1672,7 @@ CVEwtSet(CVodeMem cv_mem, N_Vector ycur)
|
||||
|
||||
/*********************** CVEwtSetSS *********************************
|
||||
|
||||
This routine sets ewt as decribed above in the case tol_type = SS.
|
||||
This routine sets ewt as described above in the case tol_type = SS.
|
||||
It tests for non-positive components before inverting. CVEwtSetSS
|
||||
returns TRUE if ewt is successfully set to a positive vector
|
||||
and FALSE otherwise. In the latter case, ewt is considered
|
||||
@ -1698,7 +1698,7 @@ CVEwtSetSS(CVodeMem cv_mem, N_Vector ycur)
|
||||
|
||||
/*********************** CVEwtSetSV *********************************
|
||||
|
||||
This routine sets ewt as decribed above in the case tol_type = SV.
|
||||
This routine sets ewt as described above in the case tol_type = SV.
|
||||
It tests for non-positive components before inverting. CVEwtSetSV
|
||||
returns TRUE if ewt is successfully set to a positive vector
|
||||
and FALSE otherwise. In the latter case, ewt is considered
|
||||
@ -3249,7 +3249,7 @@ static void
|
||||
CVSetEta(CVodeMem cv_mem)
|
||||
{
|
||||
|
||||
/* If eta below the threshhold THRESH, reject a change of step size */
|
||||
/* If eta below the threshold THRESH, reject a change of step size */
|
||||
if (eta < THRESH)
|
||||
{
|
||||
eta = ONE;
|
||||
@ -3320,7 +3320,7 @@ CVComputeEtaqp1(CVodeMem cv_mem)
|
||||
corresponding value of q. If there is a tie, the preference
|
||||
order is to (1) keep the same order, then (2) decrease the order,
|
||||
and finally (3) increase the order. If the maximum eta value
|
||||
is below the threshhold THRESH, the order is kept unchanged and
|
||||
is below the threshold THRESH, the order is kept unchanged and
|
||||
eta is set to 1.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
#define TRANSPORT 8
|
||||
#define PHAST 9
|
||||
|
||||
/* constaints in mass balance */
|
||||
/* constants in mass balance */
|
||||
#define EITHER 0
|
||||
#define DISSOLVE 1
|
||||
#define PRECIPITATE -1
|
||||
@ -981,7 +981,7 @@ public:
|
||||
alk = 0;
|
||||
// default gfw for species
|
||||
gfw = 1;
|
||||
// formula from which to calcuate gfw
|
||||
// formula from which to calculate gfw
|
||||
gfw_formula = NULL;
|
||||
// pointer to unknown structure
|
||||
unknown = NULL;
|
||||
|
||||
@ -55,7 +55,7 @@ check_line_impl(const char *string, int allow_empty, int allow_eof,
|
||||
*
|
||||
* Arguments:
|
||||
* string Input, character string used in printing error message
|
||||
* allow_empty Input, True or false, if a blank line is accepable
|
||||
* allow_empty Input, True or false, if a blank line is acceptable
|
||||
* 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
|
||||
|
||||
@ -74,7 +74,7 @@ inverse_models(void)
|
||||
fprintf(netpath_file, "2.14 # File format\n");
|
||||
}
|
||||
/*
|
||||
* Fill in stucture "use".
|
||||
* Fill in structure "use".
|
||||
*/
|
||||
use.Set_inverse_in(true);
|
||||
use.Set_inverse_ptr(&inverse[n]);
|
||||
|
||||
@ -931,7 +931,7 @@ saver(void)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
/*
|
||||
* Save results of calcuations (data in variables with _x,
|
||||
* Save results of calculations (data in variables with _x,
|
||||
* in unknown structure x, in master, or s) into structure
|
||||
* arrays. Structure "save" has info on whether to save
|
||||
* data for each entity (solution, ex, surf, pp, gas, or s_s).
|
||||
|
||||
@ -1964,7 +1964,7 @@ jacobian_sums(void)
|
||||
*sum_jacob2[k].target += *sum_jacob2[k].source * sum_jacob2[k].coef;
|
||||
}
|
||||
/*
|
||||
* Make final adustments to jacobian array
|
||||
* Make final adjustments to jacobian array
|
||||
*/
|
||||
/*
|
||||
* Ionic strength
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
*------------------------------------------------------------------------*
|
||||
* This is the implementation file for a serial implementation *
|
||||
* of the NVECTOR package. It contains the implementation of *
|
||||
* the serial machine environment intialization and free *
|
||||
* the serial machine environment initialization and free *
|
||||
* routines (and of the Fortran callable interfaces to them) *
|
||||
* and of the N_Vector kernels listed in nvector_serial.h. *
|
||||
* *
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
|
||||
/****************************************************************
|
||||
* PART I: *
|
||||
* Serial implementaion of M_Env and N_Vector *
|
||||
* Serial implementation of M_Env and N_Vector *
|
||||
****************************************************************/
|
||||
|
||||
/* The serial implementation of the machine environment has
|
||||
|
||||
@ -737,7 +737,7 @@ PTEMP(LDBLE TK)
|
||||
{
|
||||
/*
|
||||
C
|
||||
C SUBROUTINE TO CALUCLATE TEMPERATURE DEPENDENCE OF PITZER PARAMETER
|
||||
C SUBROUTINE TO CALCULATE TEMPERATURE DEPENDENCE OF PITZER PARAMETER
|
||||
C
|
||||
*/
|
||||
LDBLE TR = 298.15;
|
||||
|
||||
4
prep.cpp
4
prep.cpp
@ -674,7 +674,7 @@ build_ss_assemblage(void)
|
||||
/* include mole fraction */
|
||||
store_mb(&(x[i]->phase->log10_fraction_x), &(x[i]->f), 1.0);
|
||||
|
||||
/* include activity coeficient */
|
||||
/* include activity coefficient */
|
||||
store_mb(&(x[i]->phase->log10_lambda), &(x[i]->f), 1.0);
|
||||
/*
|
||||
* Put coefficients into mass action equations
|
||||
@ -4478,7 +4478,7 @@ setup_solution(void)
|
||||
(ph_unknown == charge_balance_unknown)
|
||||
&& (alkalinity_unknown != NULL))
|
||||
{
|
||||
error_msg("pH adustment cannot attain charge balance"
|
||||
error_msg("pH adjustment cannot attain charge balance"
|
||||
" when alkalinity is fixed.", CONTINUE);
|
||||
input_error++;
|
||||
}
|
||||
|
||||
4
read.cpp
4
read.cpp
@ -7477,7 +7477,7 @@ read_title(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Read additonal lines
|
||||
* Read additional lines
|
||||
*/
|
||||
for (;;)
|
||||
{
|
||||
@ -9161,7 +9161,7 @@ read_solid_solutions(void)
|
||||
if (j != 1)
|
||||
{
|
||||
error_string = sformatf(
|
||||
"Expected temperature (Celcius) for parameters, assemblage %d, solid solution %s, using 25 C",
|
||||
"Expected temperature (Celsius) for parameters, assemblage %d, solid solution %s, using 25 C",
|
||||
n_user,
|
||||
ss_ptr->Get_name().c_str());
|
||||
warning_msg(error_string);
|
||||
|
||||
2
sit.cpp
2
sit.cpp
@ -1586,7 +1586,7 @@ PTEMP_SIT(LDBLE TK)
|
||||
{
|
||||
/*
|
||||
C
|
||||
C SUBROUTINE TO CALUCLATE TEMPERATURE DEPENDENCE OF PITZER PARAMETER
|
||||
C SUBROUTINE TO CALCULATE TEMPERATURE DEPENDENCE OF PITZER PARAMETER
|
||||
C
|
||||
*/
|
||||
LDBLE TR = 298.15;
|
||||
|
||||
83
step.cpp
83
step.cpp
@ -620,10 +620,86 @@ add_mix(cxxMix *mix_ptr)
|
||||
* and other variables.
|
||||
*/
|
||||
LDBLE sum_fractions, intensive, extensive;
|
||||
LDBLE sum_fractions_water=0, sum_positive_water=0, intensive_water=0, extensive_water=0;
|
||||
cxxSolution *solution_ptr;
|
||||
int count_positive;
|
||||
LDBLE sum_positive;
|
||||
|
||||
if (mix_ptr == NULL)
|
||||
return (OK);
|
||||
if (mix_ptr->Get_mixComps().size() == 0)
|
||||
return (OK);
|
||||
sum_fractions = 0.0;
|
||||
sum_positive = 0.0;
|
||||
count_positive = 0;
|
||||
std::map<int, LDBLE>::const_iterator it;
|
||||
for (it = mix_ptr->Get_mixComps().begin(); it != mix_ptr->Get_mixComps().end(); it++)
|
||||
{
|
||||
solution_ptr = Utilities::Rxn_find(Rxn_solution_map, it->first);
|
||||
if (solution_ptr == NULL)
|
||||
{
|
||||
error_string = sformatf("Mix solution not found, %d.",
|
||||
it->first);
|
||||
error_msg(error_string, CONTINUE);
|
||||
input_error++;
|
||||
continue;
|
||||
}
|
||||
sum_fractions += it->second;
|
||||
sum_fractions_water += it->second * solution_ptr->Get_mass_water();
|
||||
if (it->second > 0)
|
||||
{
|
||||
sum_positive += it->second;
|
||||
sum_positive_water += it->second * solution_ptr->Get_mass_water();
|
||||
count_positive++;
|
||||
}
|
||||
}
|
||||
for (it = mix_ptr->Get_mixComps().begin(); it != mix_ptr->Get_mixComps().end(); it++)
|
||||
{
|
||||
solution_ptr = Utilities::Rxn_find(Rxn_solution_map, it->first);
|
||||
if (solution_ptr == NULL)
|
||||
{
|
||||
error_string = sformatf( "Mix solution not found, %d.",
|
||||
it->first);
|
||||
error_msg(error_string, CONTINUE);
|
||||
input_error++;
|
||||
continue;
|
||||
}
|
||||
extensive = it->second;
|
||||
extensive_water = it->second * solution_ptr->Get_mass_water();
|
||||
intensive = extensive / sum_fractions;
|
||||
intensive_water = extensive_water / sum_fractions_water;
|
||||
|
||||
if (count_positive < (int) mix_ptr->Get_mixComps().size())
|
||||
{
|
||||
if (it->second > 0)
|
||||
{
|
||||
intensive = extensive / sum_positive;
|
||||
intensive_water = extensive_water / sum_positive;
|
||||
}
|
||||
else
|
||||
{
|
||||
intensive = 0;
|
||||
}
|
||||
}
|
||||
add_solution(solution_ptr, extensive, intensive_water);
|
||||
}
|
||||
return (OK);
|
||||
}
|
||||
#ifdef SKIP_ERROR
|
||||
/* ---------------------------------------------------------------------- */
|
||||
int Phreeqc::
|
||||
add_mix(cxxMix* mix_ptr)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
/*
|
||||
* calls add_solution to accumulate all data in master->totals
|
||||
* and other variables.
|
||||
*/
|
||||
LDBLE sum_fractions, intensive, extensive;
|
||||
cxxSolution* solution_ptr;
|
||||
int count_positive;
|
||||
LDBLE sum_positive;
|
||||
|
||||
if (mix_ptr == NULL)
|
||||
return (OK);
|
||||
if (mix_ptr->Get_mixComps().size() == 0)
|
||||
@ -646,15 +722,15 @@ add_mix(cxxMix *mix_ptr)
|
||||
solution_ptr = Utilities::Rxn_find(Rxn_solution_map, it->first);
|
||||
if (solution_ptr == NULL)
|
||||
{
|
||||
error_string = sformatf( "Mix solution not found, %d.",
|
||||
it->first);
|
||||
error_string = sformatf("Mix solution not found, %d.",
|
||||
it->first);
|
||||
error_msg(error_string, CONTINUE);
|
||||
input_error++;
|
||||
continue;
|
||||
}
|
||||
extensive = it->second;
|
||||
intensive = extensive / sum_fractions;
|
||||
if (count_positive < (int) mix_ptr->Get_mixComps().size())
|
||||
if (count_positive < (int)mix_ptr->Get_mixComps().size())
|
||||
{
|
||||
if (it->second > 0)
|
||||
{
|
||||
@ -669,6 +745,7 @@ add_mix(cxxMix *mix_ptr)
|
||||
}
|
||||
return (OK);
|
||||
}
|
||||
#endif
|
||||
/* ---------------------------------------------------------------------- */
|
||||
int Phreeqc::
|
||||
add_pp_assemblage(cxxPPassemblage *pp_assemblage_ptr)
|
||||
|
||||
@ -2488,7 +2488,7 @@ unknown_delete(int i)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
/*
|
||||
* Delete unknow from list x
|
||||
* Delete unknown from list x
|
||||
*/
|
||||
unknown_free(x[i]);
|
||||
x.erase(x.begin() + (size_t)i);
|
||||
@ -2636,7 +2636,7 @@ logk_init(class logk *logk_ptr)
|
||||
*/
|
||||
logk_ptr->name = NULL;
|
||||
/*
|
||||
* set varibles = 0
|
||||
* set variables = 0
|
||||
*/
|
||||
logk_ptr->lk = 0.0;
|
||||
for (i = 0; i < MAX_LOG_K_INDICES; i++)
|
||||
|
||||
@ -31,7 +31,7 @@ get_tally_table_rows_columns(int *rows, int *columns)
|
||||
returns number of rows and columns in table
|
||||
get_tally_table_row_heading(int row, char *string)
|
||||
row is C row number
|
||||
returns row descripter for row
|
||||
returns row descriptor for row
|
||||
get_tally_table_column_heading(int column, int *type, char *string)
|
||||
column is C column number
|
||||
returns column heading for column
|
||||
@ -803,7 +803,7 @@ build_tally_table(void)
|
||||
char token[MAX_LENGTH];
|
||||
const char* cptr;
|
||||
/*
|
||||
* make list of all elements in all entitites
|
||||
* make list of all elements in all entities
|
||||
* defines the number of rows in the table
|
||||
*/
|
||||
get_all_components();
|
||||
@ -811,7 +811,7 @@ build_tally_table(void)
|
||||
save_print_use = pr.use;
|
||||
pr.use = FALSE;
|
||||
/*
|
||||
* find nuber of columns
|
||||
* find number of columns
|
||||
*/
|
||||
count_tally_table_columns = 0;
|
||||
/*
|
||||
|
||||
2
tidy.cpp
2
tidy.cpp
@ -4661,7 +4661,7 @@ ss_prep(LDBLE t, cxxSS *ss_ptr, int print)
|
||||
{
|
||||
if (print == TRUE)
|
||||
output_msg(sformatf(
|
||||
"\nLocal minimum in the solidus curve coresponding to a maximum\nin the minimum stoichiometric saturation curve.\n\n"));
|
||||
"\nLocal minimum in the solidus curve corresponding to a maximum\nin the minimum stoichiometric saturation curve.\n\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -28,7 +28,7 @@ struct CURRENT_CELLS
|
||||
LDBLE dif, ele, R; // diffusive and electric components, relative cell resistance
|
||||
} *current_cells;
|
||||
LDBLE sum_R, sum_Rd; // sum of R, sum of (current_cells[0].dif - current_cells[i].dif) * R
|
||||
struct V_M // For calculating Vinograd and McBain's zero-charge, diffusive tranfer of individual solutes
|
||||
struct V_M // For calculating Vinograd and McBain's zero-charge, diffusive transfer of individual solutes
|
||||
{
|
||||
LDBLE grad, D, z, c, zc, Dz, Dzc;
|
||||
LDBLE b_ij; // harmonic mean of cell properties, with EDL enrichment
|
||||
@ -1653,14 +1653,17 @@ init_heat_mix(int l_nmix)
|
||||
{
|
||||
if (implicit)
|
||||
{
|
||||
LDBLE viscos_f0;
|
||||
LDBLE viscos_f;
|
||||
l_heat_nmix = l_nmix;
|
||||
for (i = 1; i <= count_cells + 1; i++)
|
||||
{
|
||||
heat_mix_array[i - 1] = heat_mix_array[i] / l_heat_nmix; /* for implicit, m[i] has mixf with higher cell */
|
||||
viscos_f0 = sol_D[i - 1].viscos_f0 * exp(heat_diffc / sol_D[i - 1].tk_x - heat_diffc / 298.15);
|
||||
viscos_f0 += sol_D[i].viscos_f0 * exp(heat_diffc / sol_D[i].tk_x - heat_diffc / 298.15);
|
||||
heat_mix_array[i - 1] *= (viscos_f0 / 2);
|
||||
if (print_viscosity)
|
||||
{
|
||||
viscos_f = sol_D[i - 1].viscos_f * exp(heat_diffc / sol_D[i - 1].tk_x - heat_diffc / 298.15);
|
||||
viscos_f += sol_D[i].viscos_f * exp(heat_diffc / sol_D[i].tk_x - heat_diffc / 298.15);
|
||||
heat_mix_array[i - 1] *= (viscos_f / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3871,7 +3874,7 @@ find_J(int icell, int jcell, LDBLE mixf, LDBLE DDt, int stagnant)
|
||||
for IL: A * por_il / por.
|
||||
|
||||
por_il should be entered for the cell with the maximal cec.
|
||||
IL water is related to X-, thus the cec (eq/L IL water) is the same for all cells if X is difined.
|
||||
IL water is related to X-, thus the cec (eq/L IL water) is the same for all cells if X is defined.
|
||||
IL-water = (free + DL porewater) * por_il / por.
|
||||
for IL: A * aq_il / t_aq.
|
||||
*/
|
||||
@ -4352,9 +4355,9 @@ find_J(int icell, int jcell, LDBLE mixf, LDBLE DDt, int stagnant)
|
||||
b_j *= sol_D[icell].spec[i].Dwt;
|
||||
else
|
||||
{
|
||||
dum2 = sol_D[icell].spec[i].Dwt / sol_D[icell].viscos_f0;
|
||||
dum2 = sol_D[icell].spec[i].Dwt / sol_D[icell].viscos_f;
|
||||
dum2 *= exp(sol_D[icell].spec[i].dw_t / sol_D[jcell].tk_x - sol_D[icell].spec[i].dw_t / sol_D[icell].tk_x);
|
||||
dum2 *= sol_D[jcell].viscos_f0;
|
||||
dum2 *= sol_D[jcell].viscos_f;
|
||||
b_j *= dum2;
|
||||
}
|
||||
if (sol_D[icell].spec[i].dw_a_v_dif)
|
||||
@ -4463,9 +4466,9 @@ find_J(int icell, int jcell, LDBLE mixf, LDBLE DDt, int stagnant)
|
||||
b_i *= sol_D[jcell].spec[j].Dwt;
|
||||
else
|
||||
{
|
||||
dum2 = sol_D[jcell].spec[j].Dwt / sol_D[jcell].viscos_f0;
|
||||
dum2 = sol_D[jcell].spec[j].Dwt / sol_D[jcell].viscos_f;
|
||||
dum2 *= exp(sol_D[jcell].spec[j].dw_t / sol_D[icell].tk_x - sol_D[jcell].spec[j].dw_t / sol_D[jcell].tk_x);
|
||||
dum2 *= sol_D[icell].viscos_f0;
|
||||
dum2 *= sol_D[icell].viscos_f;
|
||||
b_i *= dum2;
|
||||
}
|
||||
if (sol_D[icell].spec[i].dw_a_v_dif)
|
||||
@ -5602,7 +5605,7 @@ diff_stag_surf(int mobile_cell)
|
||||
* Diffuse stagnant and mobile surfaces, following the steps of disp_surf.
|
||||
* First the mobile/stagnant surfaces are mixed, then the stagnant surfaces
|
||||
* when not already done.
|
||||
* If mixing factors among the cells are defined expicitly, it is assumed that
|
||||
* If mixing factors among the cells are defined explicitly, it is assumed that
|
||||
* mixing with a lower numbered cell was done when that cell was processed:
|
||||
* for any cell in MCD, need only include the mixing factors for higher numbered cells.
|
||||
*/
|
||||
|
||||
@ -483,7 +483,7 @@ get_token(const char** eqnaddr, std::string& string, LDBLE* l_z, int* l)
|
||||
cptr = *eqnaddr;
|
||||
i = 0;
|
||||
/*
|
||||
* Find end of token or begining of charge
|
||||
* Find end of token or beginning of charge
|
||||
*/
|
||||
while (((c = *cptr) != '+') && (c != '-') && (c != '=') && (c != '\0'))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user