{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# Donnan equilibrium in a membrane\n", "\n", "A negatively charged membrane having a concentration of charge of 10 mol/L (ZX=1) is used to retain salt. The concentration in co-ions in the solution is 1 mol/L. \n", "\n", "**a) Calculate the partition coefficient for MgCl2, Na2SO4 and NaCl.**\n", "\n", ">

To calculate the concentration inside a membrane during Donnan exlusion, it is necessary to solve the equation :

\n", ">\n", ">$$\\frac{c_B^{m}}{c_B}=(\\frac{|z_B| c_B}{|z_B| c_B^{m}+|z_X| c_X^{m}})^{\\frac{|z_B|}{|z_A|}}$$\n", "\n" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "For Nacl , the concentration in co-ion inside the membrane should be : 0.099 mol/L\n", "For Mgcl2 , the concentration in co-ion inside the membrane should be : 0.311 mol/L\n", "For Na2SO4, the concentration in co-ion inside the membrane should be : 0.039 mol/L\n" ] } ], "source": [ "cb=1. #concentration of co-ion in mol/L\n", "zb=1. #valency of co-ion the membrane in mol/L\n", "za=2. #valency of counter-ion in the membrane in mol/L\n", "cxm=10. #concentration of charge in the membrane in mol/L\n", "zx=1. #valency of charge in the membrane in mol/L\n", "\n", "# Function that should be zero to satisfy the Donnan exclusion law\n", "def f(cbm):\n", " out=(cbm/cb)-((zb*cb/(zb*cbm+zx*cxm))**(zb/za))\n", " return out\n", "\n", "# Find cbm to satisfy Donnan exclusion \n", "from scipy.optimize import newton\n", "\n", "#For NaCl\n", "zb=1.\n", "za=1.\n", "x=newton(f, x0=cb)\n", "print ('For NaCl , the concentration in co-ion inside the membrane should be :', round(x,3), 'mol/L')\n", "#For MgCl2\n", "zb=1.\n", "za=2.\n", "x=newton(f, x0=cb)\n", "print ('For MgCl2 , the concentration in co-ion inside the membrane should be :', round(x,3), 'mol/L')\n", "#For Na2SO4\n", "zb=2.\n", "za=1.\n", "x=newton(f, x0=cb)\n", "print ('For Na2SO4, the concentration in co-ion inside the membrane should be :', round(x,3), 'mol/L')\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "**b) Sort these electrolytes from the more excluded to the less excluded by the membrane.**\n", "\n", "> The exclusion is higher :\n", "- If the valency of the co-ions is more important (for Na2SO4)\n", "- For a same co-ions valency, if the valency of the counter-ions is less important (NaCl > MgCl2)\n", ">\n", ">This sorting rule will be satisfied in NanoFiltration or Reverse Osmosis processes even if the operating conditions (permeate flux ...) are modifying the values." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.12" } }, "nbformat": 4, "nbformat_minor": 2 }