(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 6104, 203]*) (*NotebookOutlinePosition[ 6770, 226]*) (* CellTagsIndexPosition[ 6726, 222]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Calculation of Binary Interaction Parameters for Wilson Model\n", StyleBox["Case of Methanol-Water binary system\n", FontSize->14], StyleBox["Author's Data", FontSize->14, FontWeight->"Bold"], StyleBox[": Housam BINOUS\nDepartment of Chemical Engineering\nNational \ Institute of Applied Sciences and Technology\nTunis, TUNISIA\nEmail: \ binoushousam@yahoo.com \n", FontSize->14] }], "Subtitle", TextAlignment->Center, Background->RGBColor[0.753918, 0.996109, 0.722667]], Cell[CellGroupData[{ Cell["Total Pressure and Gaz Constant", "Subsubtitle", Background->RGBColor[0.929702, 0.996109, 0.566415]], Cell[BoxData[ \(P = 760; R = 1.987;\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Vapor Pressure of Methanol Using Antoine Equation", "Subsubtitle", Background->RGBColor[0.921889, 0.996109, 0.621103]], Cell[BoxData[ \(Aa = 8.08097; Ba = 1582.271; Ca = 239.726;\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(Psat = \(\(10^\((Aa - Ba/\((T + Ca)\))\)\)\(\ \)\)\)], "Input"], Cell[BoxData[ \(10\^\(\(\(8.08097`\)\(\[InvisibleSpace]\)\) - 1582.271`\/\(\(\(239.726`\ \)\(\[InvisibleSpace]\)\) + T\)\)\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Equilibrium Equation: We would like to determine d1 and d2", \ "Subsubtitle", Background->RGBColor[0.929702, 0.996109, 0.566415]], Cell[BoxData[{ \(\(A12[T_] := 18.07/40.73\ Exp[\(-d1\)/\((R\ \((T + 273.15)\))\)];\)\), "\[IndentingNewLine]", \(\(A21[T_] := 40.73/18.07\ Exp[\(-d2\)/\((R\ \((T + 273.15)\))\)];\)\)}], "Input"], Cell[BoxData[ \(y[x_, T_] := x\ 10^\((Aa - Ba/\((T + Ca)\))\)\ Exp[\(-Log[ x + A12[T]\ \((1 - x)\)]\)\[IndentingNewLine] + \((1 - x)\)\ \((A12[T]/\((x + A12[T]\ \((1 - x)\))\) - A21[T]/\((A21[T]\ x + 1 - x)\))\)]/P\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Sum of Squares Function:", FontWeight->"Bold"], "\nInteraction parameters d1 and d2 are chosen in order to minimize this \ function. " }], "Subsubtitle", Background->RGBColor[0.929702, 0.996109, 0.566415]], Cell[BoxData[ \(sumOfSquares[data_] := Apply[Plus, Apply[Plus, Map[{\((y[#[\([1]\)], #[\([2]\)]]\ - \ #[\([3]\)])\)^2} &, \ data]]]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Experimental data {Methanol liquid mole fraction, Temperature, Methanol Vapor \ Mole fraction} from P. C. Wankat, Equilibruim Staged Separations, page 78, \ Prentice Hall 1988. \ \>", "Subsubtitle", Background->RGBColor[0.929702, 0.996109, 0.566415]], Cell[BoxData[ \(\(mydata = {{0, 100, 0}, {0.02, 96.4, 0.134}, {0.04, 93.5, 0.23}, \[IndentingNewLine]{0.06, 91.2, 0.304}, {0.08, 89.3, 0.365}, {0.1, 87.7, 0.418}, \[IndentingNewLine]{0.15, 84.4, 0.517}, {0.2, 81.7, 0.579}, {0.3, 78, 0.665}, {0.4, 75.3, 0.729}, {0.5, 73.1, 0.779}, \[IndentingNewLine]{0.6, 71.2, 0.825}, {0.7, 69.3, 0.87}, {0.8, 67.6, 0.915}, {0.9, 66, 0.958}, {0.95, 65, 0.979}, {1, 64.5, 1}};\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(param1 = FindMinimum[sumOfSquares[mydata], {d1, 0.1, 90}, {d2, .01, 1000}, MaxIterations \[Rule] 300]\)], "Input"], Cell[BoxData[ \({0.0003224542246905862`, {d1 \[Rule] 127.62425304109692`, d2 \[Rule] 484.17839190370023`}}\)], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Checking result by computing values of vapor composition for given liquid \ composition and temperature\ \>", "Subsubtitle", Background->RGBColor[0.929702, 0.996109, 0.566415]], Cell[BoxData[ \(\(T = 87.7;\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(y[0.1, 87.7] /. d1 \[Rule] 127.62425304109692\) /. d2 \[Rule] 484.17839190370023\)], "Input"], Cell[BoxData[ \(0.4191401214046912`\)], "Output"] }, Open ]], Cell[BoxData[ \(\(T = 69.3;\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(y[0.7, 69.3] /. d1 \[Rule] 127.62425304109692\) /. d2 \[Rule] 484.17839190370023\)], "Input"], Cell[BoxData[ \(0.8737266832297295`\)], "Output"] }, Open ]] }, Closed]] }, Open ]] }, FrontEndVersion->"5.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, CellGrouping->Manual, WindowSize->{1016, 668}, WindowMargins->{{0, Automatic}, {Automatic, 0}} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 515, 13, 193, "Subtitle"], Cell[CellGroupData[{ Cell[2316, 70, 108, 1, 46, "Subsubtitle"], Cell[2427, 73, 52, 1, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[2516, 79, 126, 1, 48, "Subsubtitle"], Cell[2645, 82, 75, 1, 30, "Input"], Cell[CellGroupData[{ Cell[2745, 87, 83, 1, 30, "Input"], Cell[2831, 90, 140, 2, 70, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[3020, 98, 137, 2, 48, "Subsubtitle"], Cell[3160, 102, 244, 5, 50, "Input"], Cell[3407, 109, 313, 6, 50, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[3757, 120, 241, 6, 69, "Subsubtitle"], Cell[4001, 128, 189, 5, 30, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[4227, 138, 262, 5, 68, "Subsubtitle"], Cell[4492, 145, 507, 7, 90, "Input"], Cell[CellGroupData[{ Cell[5024, 156, 151, 3, 30, "Input"], Cell[5178, 161, 133, 2, 29, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[5360, 169, 188, 4, 48, "Subsubtitle"], Cell[5551, 175, 46, 1, 30, "Input"], Cell[CellGroupData[{ Cell[5622, 180, 122, 2, 30, "Input"], Cell[5747, 184, 53, 1, 29, "Output"] }, Open ]], Cell[5815, 188, 46, 1, 30, "Input"], Cell[CellGroupData[{ Cell[5886, 193, 122, 2, 30, "Input"], Cell[6011, 197, 53, 1, 29, "Output"] }, Open ]] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)