Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colloid_polymer_phase_diagram-0.3.1.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colloid_polymer_phase_diagram-0.3.1-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file colloid_polymer_phase_diagram-0.3.1.tar.gz.

File metadata

  • Download URL: colloid_polymer_phase_diagram-0.3.1.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.10

File hashes

Hashes for colloid_polymer_phase_diagram-0.3.1.tar.gz
Algorithm Hash digest
SHA256 7f39041300fb99f3770ad42ad46ef66ec208faa80a62e36cc0fc8338fb09b940
MD5 391d483d1633002d8bc036318efb1b47
BLAKE2b-256 cd0c225d902f80130aaca391eeee2c10db644edd368e138dfd64e3c51c95ee68

See more details on using hashes here.

File details

Details for the file colloid_polymer_phase_diagram-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: colloid_polymer_phase_diagram-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.10

File hashes

Hashes for colloid_polymer_phase_diagram-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 333e24fe00bd10473461f8d4cf5bf6f90c73944c311a2fe21957d11b5bc2ae37
MD5 e29f239d1d187bb8822e0ac1dfcb9275
BLAKE2b-256 940fad1a1b4652d85b43868869520f2664fac352d7e9023181c88a3b2ef1a221

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page