pyPRISM.calculate.second_virial module

pyPRISM.calculate.second_virial.second_virial(PRISM, extrapolate=True)[source]

Calculate the second virial coefficient

Parameters:
  • PRISM (pyPRISM.core.PRISM) – A solved PRISM object.
  • extrapolate (bool, optional) – If True, extrapolate \(h_{\alpha,\beta}\) to \(k=0\) rather than reporting the value at the lowest-k. Defaults to True.
Returns:

B2 – Pairtable of B2 values

Return type:

pyPRISM.core.PairTable

Mathematical Definition

\[B_{2}^{\alpha,\beta} = -0.5 \hat{h}_{\alpha,\beta}(k=0)\]

Variable Definitions

  • \(B_{2}^{\alpha,\beta}\)
    Second virial coefficient between site types \(\alpha\) and \(\beta\)
  • \(\hat{h}_{\alpha,\beta}(k)\)
    Fourier-space total correlation function between site types \(\alpha\) and \(\beta\) at wavevector \(k\)

Description

The second virial coefficient (\(B_{2}^{\alpha,\beta}\)) is a thermodynamic descriptor related to the pairwise interactions between components in a system. In general, \(B_{2}^{\alpha,\beta}>0\) signifies repulsive interactions between site types \(\alpha\) and \(\beta\), and \(B_{2}^{\alpha,\beta}<0\) signifies attractive interactions. For example, in a polymer-solvent system, one definition of the theta condition is when \(B_{2}^{\alpha,\beta}=0\).

Warning

Passing an unsolved PRISM object to this function will still produce output based on the default values of the attributes of the PRISM object.

Example

import pyPRISM

sys = pyPRISM.System(['A','B'])

# ** populate system variables **

PRISM = sys.createPRISM()

PRISM.solve()

B2 = pyPRISM.calculate.second_virial(PRISM)

B2_BB = B2['B','B']