PhreeqcUsers Discussion Forum

Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Diffusion coefficient correction for temperature and viscosity
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Diffusion coefficient correction for temperature and viscosity  (Read 6785 times)

ahockin

  • Contributor
  • Posts: 5
Diffusion coefficient correction for temperature and viscosity
« on: 21/10/21 16:27 »
Hi!

I am trying to understand how PHREEQC corrects the diffusion coefficient for temperature for each solute in multi-component diffusion.

Using the formula from the help manual:

Dw' = Dw_298 × (T/298) ×(n_298/n_T), 

where Dw' is the (temperature corrected) tracer diffusion coefficient; Dw_298 is the tracer diffusion coefficient at 25 C, T is the temperature in K and n is the viscosity.

I define the tracer diffusion coefficient using SOLUTION_SPECIES and tried to manually calculate the resulting diffusion coefficient corrected for temperature and viscosity. However I did not get the same result as output from PHREEQC. What is odd is that if I use the new viscosity, but not the temperature [Dw' = Dw_298 ×(n_298/n_T)], I get the same value as PHREEQC gives. See attached code.

Any help on why this is would be really helpful, thanks in advance!
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4262
Re: Diffusion coefficient correction for temperature and viscosity
« Reply #1 on: 21/10/21 22:13 »
First, part of the problem may be that the documentation for the function DIFF_C is incorrect. The function returns the diffusion coefficient at the current temperature, not at 25 C.

The diffusion coefficient at temperature for a species depends on two definitions in SOLUTION_SPECIES--Dw and Dw_t. It also depends on the viscosity of pure water at 25 C and the viscosity of water at the working temperature. (Unfortunately, no correction of the viscosity for solutes is made at this time.) Note only phreeqc.dat, Amm.dat, and pitzer.dat have the necessary SOLUTION_SPECIES definitions.

The attached script calculates the diffusion coefficient of Na+ as a function of temperature with USER_PRINT. The key equation is

Code: [Select]
dw_temp = dw * EXP(dw_t/TK - dw_t/298.15) * viscos_0_25 / VISCOS

Code: [Select]
SOLUTION
-temp 25
Na 1
Cl 1
REACTION_TEMPERATURE
10 20 30 40 50
USER_PRINT
10 REM Calculation of temperature dependence of Na+ diffusion coefficient
20 dw = 1.33e-9  # SOLUTION_SPECIES
30 dw_t = 122    # SOLUTION_SPECIES
40 viscos_0_25 = 0.8900239182946
50 dw_temp = dw * EXP(dw_t/TK - dw_t/298.15) * viscos_0_25 / VISCOS
60 PRINT "DIFF_C(Na+): ", DIFF_C("Na+")
70 PRINT "Dw(TK):      ", dw_temp
END
Logged

ahockin

  • Contributor
  • Posts: 5
Re: Diffusion coefficient correction for temperature and viscosity
« Reply #2 on: 22/10/21 10:41 »
Hi Mr. Parkhurst,

Thanks for replying so quickly.

One clarification, in the documentation for SOLUTION_SPECIES the formula for calculating the diffusion coefficient is given as:

Dw(TK) = D * exp(damp / TK - damp / 298.15) * TK * 0.89 / (298.15 * viscos)

But the formula you gave above does not include the bolded items, namely the working temperature (TK) and temperature of 25 deg (in Kelvin, 298.15).

I'm wondering why these are not included in your formula? This is where my initial confusion arose in trying to manually calculate the change in diffusion coefficient with temperature and match it to what PHREEQC outputs.

Thanks again!


Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4262
Re: Diffusion coefficient correction for temperature and viscosity
« Reply #3 on: 22/10/21 16:19 »
I'll have to ask Tony. I was copying from the code, but I'll check more carefully.
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4262
Re: Diffusion coefficient correction for temperature and viscosity
« Reply #4 on: 22/10/21 17:05 »
The function DIFF_C is returning the wrong value. The correct value would be multiplied by the bolded ratio. Also, the return value of SETDIFF_C needs to be multiplied by the bolded ratio.

The values used in TRANSPORT calculations are consistent with the formula in SOLUTION_SPECIES. The function DIFF_C and the return value from SETDIFF_C are not used directly in any calculations; they are only for user output.

I'll check with Tony, but make sure the next release fixes any bugs.
Logged

ahockin

  • Contributor
  • Posts: 5
Re: Diffusion coefficient correction for temperature and viscosity
« Reply #5 on: 27/10/21 12:11 »
Super, thank you for letting me know. That clears up my confusion!
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Diffusion coefficient correction for temperature and viscosity
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2