A Python module to compute the phase behaviour of Colloid+Polymer mixture
Project description
colloid_polymer_phase_diagram
Phase behaviour of Colloid+Polymer mixture according to generalized free volume theory see Gerard J Fleer and Remco Tuinier, Advances in Colloid and Interface Science 143, 1-47 (2008).
The code was originally written by Mathieu Leocmach in package colloids.
Install
The most convenient way would be: pip colloid_polymer_phase_diagram
How to Use It
from colloid_polymer_phase_diagram import phase
qR = 0.072
q = phase.qR2q(qR)
fc, pivc = phase.CarnahanStarling().critical_point(q)
print(f'At critical point colloid volume fraction is {phase.f2vf(fc):0.3f} and osmotic insertion work is {pivc:0.3f} kT')
import numpy as np
pivs = 1./np.linspace(1./pivc, 1./3500)
sp = phase.CarnahanStarling().spinodalGL(q, pivs)
plt.figure('reservoir')
plt.plot(phase.f2vf(sp[:,1]), sp[:,0])
plt.plot(phase.f2vf(sp[:,2]), sp[:,0])
plt.scatter(phase.f2vf(fc), pivc, c='k')
plt.xlabel(r'$\varphi$')
plt.ylabel(r'$\Pi v$')
plt.figure('experimental')
plt.plot(phase.f2vf(sp[:,1]), phase.piv2y(sp[:,0], qR) * phase.alpha(sp[:,1], q))
plt.plot(phase.f2vf(sp[:,2]), phase.piv2y(sp[:,0], qR) * phase.alpha(sp[:,2], q))
plt.scatter(phase.f2vf(fc), phase.piv2y(pivc, qR) * phase.alpha(fc, q), c='k')
plt.xlabel(r'$\varphi$')
plt.ylabel(r'$y$')
plt.ylim(0,1.4)
See (notebook/phase_diagram.ipynb) for more complete examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for colloid_polymer_phase_diagram-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9532d3f615429c5c46d674e1241d3355b07728503afcc4e72f003b850d889e47 |
|
MD5 | 794bf4318219a3579a61d736c802f38d |
|
BLAKE2b-256 | 2f4d067dcc0ec34fea98fa019316049d44248bf6d837f82ad53f7f9c11fc322f |
Close
Hashes for colloid_polymer_phase_diagram-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28a345a50a330d16015209ec86081199794fd0f4d988c7e569fd93d4587fbcd7 |
|
MD5 | aaad11f22e4ec15c1b958829922aeb73 |
|
BLAKE2b-256 | 64dd3c1d53ec9df0c4a465e8a89c9cf7422a7dba5d123334256021530a13b86f |