pytherm.activity.pitzer module

class pytherm.activity.pitzer.Pitzer(ph, db)[source]

Bases: object

Pitzer model for activity coefficients calculation

Methods

get_I(ph)

Calculate ionic strength

get_a_water(ph[, n_m])

Calculate water activity

get_gibbs(ph)

Calculate excess \(G^{ex}/(w_{w}RT)\)

get_harvie_j(x)

Calculate J using Chebyshev polynomial approximations

get_osmotic(ph[, dw, R, T])

Calculate osmotic coefficient

get_theta_e(s1, s2, I)

Calculate excess term \(^E\theta_{ij}\) for \(\Phi_{ij}\) using

get_A

get_B

get_C

get_Z

get_f

get_g

get_x_ij

get_y

grad

anions = []
cations = []
charge = {}
db: ParametersPitzer
get_A(T=298)[source]
get_B(s1, s2, I)[source]
get_C(s1, s2)[source]
get_I(ph)[source]

Calculate ionic strength

Parameters:

ph (_type_) – _description_

Returns:

ionic strength

Return type:

float

get_Z(ph)[source]
get_a_water(ph, n_m=55.50837)[source]

Calculate water activity

\[\ln{a_{H2O}} = -\frac{\phi\sum_{i} m_i}{55.50837}\]
Parameters:
  • ph

  • n_m

get_f(I, A, b=1.2)[source]
get_g(x)[source]
get_gibbs(ph)[source]

Calculate excess \(G^{ex}/(w_{w}RT)\)

\[\begin{split}G^{ex}/(w_{w}RT) = f(I) + 2 \sum_{c}\sum_{a}[B_{ca} + (\sum_{c}m_c z_c)C_{ca}] \\ + \sum_{c}\sum_{c'} m_c m_{c'} [2\Phi_{cc'} + \sum_a m_a \psi_{cc'a}] + \sum_{a}\sum_{a'} m_a m_{a'} [2\Phi_{aa'} + \sum_c m_c \psi_{caa'}] \\ + 2 \sum_n\sum_c m_n m_c \lambda_{nc} + 2 \sum_n\sum_a m_n m_a \lambda_{na} + 2 \sum_n\sum_{n'} m_n m_{n'} \lambda_{nn'} + ...\end{split}\]
Parameters:

ph (_type_) – _description_

get_harvie_j(x)[source]

Calculate J using Chebyshev polynomial approximations

Parameters:

x (_type_) – _description_

Returns:

_description_

Return type:

_type_

get_osmotic(ph, dw=0.0001, R=8.3145, T=298)[source]

Calculate osmotic coefficient

\[\phi = 1 - \frac{\frac{dG}{dw}}{R T \sum m_i}\]
Parameters:
  • ph

  • dw

  • R

  • T

get_theta_e(s1, s2, I)[source]

Calculate excess term \(^E\theta_{ij}\) for \(\Phi_{ij}\) using

\[\theta_{MN}=\frac{z_M z_N}{4I}[J(x_{MN})- 0.5 J(x_{MM} )- 0.5 J(x_{NN})]\]
Parameters:
  • s1 (_type_) – _description_

  • s2 (_type_) – _description_

  • I (_type_) – _description_

Returns:

_description_

Return type:

_type_

get_x_ij(z1, z2, I)[source]
get_y(ph)[source]
grad(ph, s, dm=1e-10)[source]
neutral = []
ph = []