(************** Content-type: application/mathematica **************
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[ 204746, 5953]*)
(*NotebookOutlinePosition[ 251250, 7800]*)
(* CellTagsIndexPosition[ 251107, 7792]*)
(*WindowFrame->Normal*)
Notebook[{
Cell[GraphicsData["Bitmap", "\P020S/04P8j0S/2>P9K0QX2>`8j0S/2>P8k0SX2F`8J0S/2>P8k0Wd12`80
00030P0A0QT01@9L0>/000000>L0o`00P`00
000B00001DHa;F/0004?0SX0408I00D2>`3[000000360?l008<000003`0000T08@000016/00000
0`3[0000003600@00003BU9ooeJe0080000:E[E>L`00001Nmgoo?Nmg_Goo>Lh3
000023W>Oomoo`aS001g_Goo?Nl200000e:DOomNm`03000017NmOolicQcW1Goo00@006mkOolicP80
0004MkdaS0000002Ool012DYOomoob480`0000ENmgooIcT001S6009oo`069BT00000MkeoocW>0P00
00Lh00000;F]_N`03Ool01fmk;F/00000>Liooekg00<000086Lh00Woo00Ool00goo00Dmk`00OomoobDY
00<00003CW=oogoo00<00003?Nmg_Goo009oo`036Lh0000001000003249:DWoo
00=oo`03CW<8@P00008000036Liooekg0`0000<8@TicOol00goo00E>
L`Q2000005kg00Aoo`04E[DHaP00G_L4Ool01bDY001oogoo9BT005Je009oo`066L200001QS6Kg]oogooMkde[@@00003>Liooekg01<000003`0000d0
8@00000IZaJg17<=4aXG0PlYcFli9O8:>P0;0QT01@9L0>/000000>L0100001DYBWooOol8@P00Mkeo
ob48001JeWoo>LhmkgooMkdicSg_>LiW>GooIcT00P0000=JeWooBU800P0000LhmkcW>MkeoodHa0P00
0Woo00TaS000001NmgooCW<00124Mkd017oo00QNmb48OomoodHa>Lhmke:D0Woo00<8@P0000000P00
00=JeWooOol00goo00A[FPQ2001Nm`Aoo`058@P00000001S6002Ool01248000000001Goo00<00248
Ool00goo00=JePQ2HaP01Woo00IW>@Q2001JeWoo>Lh500000e[FOomoo`02Ool28@P2Ool01@00BU9o
ogoo600<000038@Qoogoo009oo`0;G_L005kgOolmkaS6MkeooeJe000mk`04Ool01CW>001o
ogoo8@P00P0000@mkgooOomoo`800003CW=oogoo00=oo`038@PicWoo00=oo`03?Nl0000000l00003
249S67oo00Eoo`05IcT8@P006Goo00Eoo`07HaP8
@P00G_MoofmkF]H00Woo00=g_@Q2G_L017oo00HQ2000Oomoob480000000300000`Q2
IcUoo`04Ool020008@QoogooIcU_NgooLi`2248017NmOom_NfAXe2M0540e>=[HbP0:0QT01@8k0>/000000L`00001600<000056Lh500001B48OomoogooDY@00`000Woo00DQ200000000248009oo`<00007>Lio
ogoo?Nl8@PaS>Lh00Woo00Dmk`00G_Moocg_00D00003G_Moocg_00<000049BUoogoo:DX2Ool00cg_
0000000300005QBUMkeoofLi5:D002DY>LhBDY000U:FLiOomg_@Q2>Liooekg0P0000UN
mgooOomoocg_001Nmgoo?Nl00`0000LiW>GooKg/8@P00>Liooekg00@0
009oo`039BT002DY00Aoo`0<000]JgooOom:DPaS000mkb48?Nmooekg2P0000Lh01`0000Li
cWooOolmk`Q236GooMkdQ200048A6OomNm`0200001cg_Oomo
ocW>36<8@Sg_009oo`07>Lh005kgOolicP00:DX00Woo00@U:EkgOolicP@0009oo`04=Jeg_GooDY@7
000010Q2IcUoodic0`00011>LgooG_L000Q2Mkeooc6<=JeoogNm248005kgOom>L`<00003>Liooekg
01<000003`0000l08@00000ekcKK?_`fn2JE>aa7?4000aS09oo`05=JdYBWooOole[@0200000cW>OomcW0020000
11S6Oomooc6<0R4800m>LgooMkd005JeOomW>CW>?NlHaP00JeYooc6@0500002124Oomood8@
8@Q[FWooBU8500000e[FOolicP0200002Cg_Oomooa24G_Mooekg>Lhmk`0300000dicOom_N`02Ool0
0a2400000002Ool01Dic>LhaS0008@P00Woo0`0000=_NgooG_L0100000EJeWooKg/005[F00=oo`0;
JeYF]A24001JeWooF]HmkcW>000Q2002Ool00gNmOomW>@060000136001JeWooF]HmkcW>000Q2002Ool01cg_
>LhQ2000G_MoogNm009oo`0::DX00000?Nmoofmk>Lhmka240002Ool01B486Lioof]J?NlicQ241P0000DicWooOomoocW>00H00003Kg]ooekg00@00004F]Io
ofmk48@2Ool00c6<0000000400000cg_OomNm`0200000fmkOomJeP0400004EkgOom_N`00G_Moodic
8@Q>LgooMkd8@UkgOomNmcW>?Nl00P000Woo00Ag_GooLi`@Q0P0000448Ag_GooCW<200000f`3[0000003600D0000;;F]oogNmDYAooekgOomg_FLi
Oolmk`02000016mkOom:DRDY0Woo00@HaP00000U:@9oo`032480000000Qoo`0336Lh005kg00Eoo`03:DX003W>00Aoo`099BT007ooOol]JfLiOomW>Be[009o
o`04001NmgooG_L500000cg_Oomoo`02Ool00b480000000400001EkgOomoogooG_L01P000Woo00Liooekg0080009oo`03?Nl000000080
0005>Lioogoo001Nm`04Ool016Li:DX005kg17oo0P001Goo00=g_A2400001`0000DHaWooOolmk`00
009oo`059BT00000>Lioo`02G_L01Goo?Nl000008@P00Woo0`0000Lh2000012e[Oomg_CW>0Woo0`0000@@Q7ooOolQ20800006Kg]ooe[F?NlicSg_
0Woo00/Q23F]OomoocW>?NlYBP006L009oo`0648AcW7ooMkeoob480P0000I600800009?Nmoogoo48ANmgooG_LicSg_00800009>Lioog>L000icWoo
Li`8@P00009oo`05CW000i
cP02Ool02124F]Iooe[F?NlicP008@P2Ool01@008@Qoogoo=Jd0100000@aS7ooOolQ20@000048@P005kgOolmk`Q2E[Eoofmk000mkgooKg/icSg_48@00002Ool01G>LOomg_AS68@P00Woo
00D004YBOomg_@Q200@00006>Lioofmk?NlicQ241P0000DicWooOomoocW>00H00003Kg]ooekg00@0
0004F]Ioof]J48@2Ool00cW>0000000400000cg_OomNm`0200000f]JOomJeP0400002UkgOom_N`00
G_MooekgBU9oof]J0P0000ENmgooG_LicSg_0080009oo`058@P@Q6mkOom:DP0900001dYBOomcW000
HaQooc6<00800006CW=oodHa@Q1oodYB0P0000`3[0000003600H00006BU9oogooOol8
@QBU0goo00Tmk`00000005kgOomg_GooG_L010000Woo00HicP00001NmgooE[D30002Ool01Cg_8@Qo
ogoo7>L0100000I_NgooOomW>@00=Jd3Ool02BDY000000Q2MkeoogNmOolmk`03000012DYOomooaS6
0P000Woo00Tmk`Q2MkeoofLi8@P00248=Jd00P0000Lh400001GNmOom6Lioogoo?Nl8@PaS>Lh00Woo00Lmk`00G_Moocg_000mk`02Ool011S6G_Moocg_0`0000DU:GooOol0
00aS009oo`03>Lh000000080000D36=g_GooIcTDY@009BTicPaSMkeoofLi9BT002DYIcUoogNm248i
cP=oo`0:IcT00000G_Moocg_001Nmgoo?Nl300000bDYOomoo`0400001EkgOolicP00@Q000Woo00@0
03W>OomNm`@000Aoo`03;F/002DY009oo`0<000U:GooOom:DPaS000mkb48?Nmooekg2P0000Lh01`0000LicWooOolmk`Q236OomNm`02
00001cg_OomoocW>36<8@Sg_009oo`06>Lh005kgOolicP000Woo00DHaP00G_MoocW>00@0009oo`05
9BT006LiOomNm`0500001FmkOolmk`00?Nl00Woo014004icOomNm`00249g_GooLiooekg01<000003`0001<08@004@UK_ahe1A/000000>L01P0000@YBWooOom[FP800004AS5oogoo>Lh300001B48Oomo
ogoo>Lh00P0000=NmgooOol00goo00@mkcW>OomJeP<00004F]IoocW>0005Ool00`Q2001600=oo`038@P0000000Ioo`078@QJeWoo>Lh001S6Mkd017oo
00EBU0000008@WNm009oo`03G_L0000000@00003F]Ioogoo00=oo`04Kg/@Q000G_L4Ool01B48=Jeo
ogoo48@00P0000A>LgooKg/000Eoo`04000Q27ooOol300000`Q2HaQoo`05Ool016Li248005[F1Goo
00=S6000F]H017oo0R480Woo00ENmgNmOomooaS600D00003=Jeoogoo00=oo`03?Nl003F]00Moo`03
=Jd003g_009oo`09JeX8@P00001JeWoo>Lh005[F00Aoo`8Q20Aoo`06G_L005kgOom_Nf@06Ool01fLOomBU0008@P00Woo00AW>F]JOomg_@88@P04MkeoofmkHaP2Ool01248
000005[F0Woo00=Nm`0000004@00000B00004Dic:U@9]PfAA]LMmTJmF_P`3[0000003600L00003Mkeoodic00800004249g_GooG_L4000015:DOomoobe[0P00
00=247ooOol00goo00ABU3F]Oomoo`<00005CW=ooekg001_N`04Ool00b48000HaP02Ool013F]0000
02480Woo00Hmk`00000000Q2Kg/2Ool010Q2000006Li1Goo00@icTicOomNm`80000348ANmgoo009o
o`05IcT00000000mk`02Ool00d8@0000000400001ekgOomoogooKg]240Q200800003G_Moogoo009o
o`049BUNmgooG_L300001248OomoobDY1Goo00@00248Oomoo`@00003249247oo00=oo`05AS48@P00
001Nm`03Ool01FmkCWBe[00001P0000Lh017oo00Dmk`00Oomoodic00<000039BUoogoo00<0
0003?Nmg_Goo009oo`036Lh0000001000003249247oo00=oo`03AS48@P000080
00036/000000>L0E00000<8@R48
8@P0=`000R488`0000@0000LhFLaKg9cXg6RD[16P64a6c?]a:W1TH6ILJn3:I4;H8V12H3EP6FP8I0U`0j`800003
0>L000000?l0084000004P0001M643G>6B/I[`;D1J`j5RhF13J3=TDf0DA
0QT2F`3[008000030bEh1=@F]cXEBU8]TdIEE[AJ]BXe05YDJ"], "GraphicHeader",
Evaluatable->False,
ImageSize->{430, 31},
ImageMargins->{{0, 0}, {0, 0}},
ImageRegion->{{0, 1}, {0, 1}}],
Cell[CellGroupData[{
Cell["\", "Title"],
Cell["\", "Subtitle"],
Cell[TextData[{
StyleBox["Brian G. Higgins\nUniversity of California, Davis\n", "Author"],
"bghiggins@ucdavis.edu"
}], "Author"]
}, Open ]],
Cell[CellGroupData[{
Cell["Abstract", "Section",
ShowGroupOpenCloseIcon->True],
Cell[TextData[{
"Computing vapor-liquid equilibria is a common occurrence in many chemical \
engineering operations. For ideal mixtures the calculations are fairly \
routine. Unfortunately, many vapor liquid systems of industrial interest form \
non-ideal mixtures and the calculations then require solving systems of \
nonlinear equations. In this presentation we show how webMathematica can be \
used to develop a online site that students can use to validate VLE models \
using their own experimental data. For the purpose of this talk, the vapor \
phase is taken to be an ideal gas mixture, but the liquid phase is non-ideal \
Thus at equilibrium the equality of fugacities for ",
Cell[BoxData[
\(n\)]],
" species yields the following equilibrium relations"
}], "Text",
FontWeight->"Plain"],
Cell[TextData[{
Cell[BoxData[
\(\(y\_i\)
P\_total = \(\[Gamma]\_i\) \(x\_i\) \(P\_i\%sat\) \((T)\)\)]],
",",
Cell[BoxData[
\(\(\(\ \)\(i = 1, 2, \ \[Ellipsis], n\)\)\)]]
}], "EquationNumbered",
FontWeight->"Bold"],
Cell[TextData[{
"where ",
Cell[BoxData[
\(y\_i\)]],
" is the mole fraction of species ",
Cell[BoxData[
\(i\)]],
" in the vapor phase; ",
Cell[BoxData[
\(x\_\(\(i\)\(\ \)\)\)]],
"is the mole fraction of species ",
Cell[BoxData[
\(i\)]],
" in the liquid phase; ",
Cell[BoxData[
\(\[Gamma]\_i\)]],
"is the activity coefficient for species ",
Cell[BoxData[
\(i\)]],
"; ",
Cell[BoxData[
\(\(\(P\_i\%sat\) \((T)\)\(\ \)\)\)]],
"is the saturation vapor pressure of species ",
Cell[BoxData[
\(i\)]],
" at temperature ",
Cell[BoxData[
\(T\)]],
"; and ",
Cell[BoxData[
\(P\_total\)]],
" is the total pressure of the system."
}], "Text",
FontWeight->"Plain"],
Cell[TextData[{
"Because the activity coefficients depend on composition, and the vapor \
pressures depend on T, virtually all calculations of vapor-liquid data for \
such a system involves solving nonlinear equations. In this presentation we \
illustrate how VLE calculations (for binary systems) can be done over the \
World Wide Web using web",
StyleBox["Mathematica",
FontSlant->"Italic"],
". "
}], "Text",
FontWeight->"Plain"],
Cell[TextData[{
"We make use of several open source applications to build our interactive \
site using webMathematica. We use the Tomcat servelet engine, Apache server, \
PHP scripting language, and MYSQL. The MYSQL database is used to store \
thermodynamic data on a wide variety of chemical compounds, and to hold user \
IDs/passwords for site authentication. We have developed a system, based on \
hidden frames and JavaScript that allows us to interface PHP and MSP so that \
thermodynamic data from database can be used in the online ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" calculations."
}], "Text",
FontWeight->"Plain"],
Cell[TextData[{
"The interactive site allows users to select Margules, van Laar or Wilson \
models for the activity coefficients and Antoine's correlation for the vapor \
pressure. The user can select to make bubble point and dew point \
calculations, construct ",
StyleBox["T-x-y",
FontWeight->"Bold"],
",",
StyleBox[" P-x-y",
FontWeight->"Bold"],
", and",
StyleBox[" x-y",
FontWeight->"Bold"],
" plots of the data, and also undertake best-fit calculations for activity \
parameters based on VLE data, which can be uploaded to the site. Azeotropes \
feature prominently in these calculations."
}], "Text",
FontWeight->"Plain"]
}, Closed]],
Cell[CellGroupData[{
Cell["Introduction", "Section",
ShowGroupOpenCloseIcon->True],
Cell[CellGroupData[{
Cell["Background", "Subsection",
ShowGroupOpenCloseIcon->True],
Cell["\", "Text"],
Cell["\", "Text"],
Cell["\", "Text"],
Cell["\", "Text"]
}, Closed]],
Cell[CellGroupData[{
Cell["Objectives", "Subsection",
ShowGroupOpenCloseIcon->True],
Cell[TextData[{
"\"",
StyleBox["Chemical engineering is the synthesis and design of chemical \
processes that result in the transformation of matter by chemical reaction \
resulting in new chemicals and/or product",
FontSlant->"Italic"],
"s.\" "
}], "Text"],
Cell[TextData[{
"Mathematical and computer assisted analysis is used throughout the \
chemical engineering prpgram at UC Davis. Sophomore students are required to \
take a course in Fortran or Matlab programming. We have also introduced the \
students (juniors/seniors) to ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" as an alternative platform for doing computations. We offer an \
introductory course twice a year on ",
StyleBox["Mathematica",
FontSlant->"Italic"],
". "
}], "Text"],
Cell["\", "Text"]
}, Closed]],
Cell[CellGroupData[{
Cell["A beta user's experiences with webMathematica", "Subsection",
ShowGroupOpenCloseIcon->True],
Cell[CellGroupData[{
Cell[TextData[{
"Setting up ",
StyleBox["web",
FontColor->RGBColor[1, 0, 0]],
StyleBox["Mathematica",
FontSlant->"Italic"],
" on Windows NT/2000"
}], "Subsubsection",
ShowGroupOpenCloseIcon->True],
Cell[TextData[{
"Overall I found the documentation helpful. Tricky part was setting all the \
PATHS and CLASSPATHS and init files for the various servers. First time it \
took about 2-3 hours, starting from scratch, to set up all the servers for my \
system (see below) and run a ",
StyleBox["web",
FontColor->RGBColor[1, 0, 0],
Background->None],
StyleBox["Mathematica",
FontSlant->"Italic"],
" example. New version of ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" with built-in Java SDK should simplify installation."
}], "Text"],
Cell[CellGroupData[{
Cell["Configuration ", "Subsubsubsection",
ShowGroupOpenCloseIcon->True],
Cell["\", "Text"],
Cell["\", "Text"]
}, Closed]]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell[TextData[{
"Designing interactive modules using ",
StyleBox["web",
FontColor->RGBColor[1, 0, 0]],
StyleBox["Mathematica",
FontSlant->"Italic"],
": User interface"
}], "Subsection",
ShowGroupOpenCloseIcon->True],
Cell[TextData[{
"Straightforward to design a user interface (using form elements) with a \
few inputs that result in a single outcome. Here is an example (",
ButtonBox["link",
ButtonData:>{
URL[ "http://169.237.64.144/webMathematica/MSP/Examples/plot1d"], None},
ButtonStyle->"Hyperlink"],
")"
}], "Text",
CellDingbat->"\[GrayCircle]"],
Cell[CellGroupData[{
Cell["plot1D.msp", "Subsubsubsection",
ShowGroupOpenCloseIcon->True],
Cell[TextData[{
"\n\t\n\t",
StyleBox["",
FontColor->RGBColor[1, 0, 0]],
"\n\t\t\n\t\n\t\t\n\t\t\
PlotInputData\n\t\n\n\t\n\t\t\

\n\t\t\t

Plot Your Function f(x):

\n\t\t

\n\t\t

\n\t\t\t

This site displays a graphical representation of \n\t\t\ta \
user-supplied function. You may select some built-in functions, or else\n\t\t\
\t specify your own function f(x). You may also select the range of\n\t\
\t\t the variable x to be displayed in the plot.\n\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\t\n\t\t\t

\n\t\t\t

f(x)=

\n\t\t\t\t\t

\n\t\t\t\t

\n\t\t\t\t\

\n\t\t\t\tor else specify your own function\n\t\t\t\t ( access \
this guide\n\t\t\t\t to get help on \
entering a function )\n\t\t\t\t

\n\t\t\t\t

\n\t\t\t\t

\n\t\t\t\t\t

f(x)=

\n\t\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t

\n\t\t\t

\n\t\
\t\n\t\t\tEnter the plot range for the variable x\n\t\t\t\n\
\t\t\t

Approximating the area under a non-negative \
function

\nIn this interactive session you will examine \
how refining the partition of a domain affects the computed area under the \
curve f(x)\nusing the method of approximating sums as discussed in \
Lesson 6.2\n

\n

\nSelect one of three functions to \
consider\n\t\t\t\n\t\t\t

\n\t\t\t

\n\t\t\t\t

\n\t\t\t\t\t

f(x)=

\n\t\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t

\n\
\t\t\t\t\nIn the form below enter the relevant parameters for your \
calculation.\n\nEnter the domain for your function (a>0):\n

\n\

a=\n

\n

b=

\n

\n

\n

\n\nEnter the number of \
interior points in your initial partition(0 &lt n &lt 6), and select\n \
the location ci for evaluating your function: left end \
point, interior point, or right end point:\n

\n\t\t\t\t\t\t

\n\t\t\t\t\
\t\t\t

n=

\n\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\

\n\t\t\t\t\t

\n\n

Select how you would like sample points \
chosen - randomly by the system or equally spaced.\nIf you choose them \
randomly, points can tend to \"bunch up\" and cause problems for the \
approximation,\n so you might watch for this and for the effects.\n

\n \

\n

\n\t\t\t\t\t\t\t

Sample Points \

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t

\n\t\t\t\t\t\t

\n\t\t\t\t\t

\n\n

Finally, select \
the number of refinements m (0&lt m &lt 10)\nyou would like of \
your partition. Keep in mind that each refinement effectively doubles the \
number of points, so you may wish to \nstep gradually through an increasing \
number of refinements. For more details on how the refinement is done, click \
RGBColor[1, 0, 0]],
"> here\n

\n

\n

\n\t\t\t\
\t\t\t\t

m=

\n\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

\n\t\t\t\t\t\

\nA plot of the function you selected will be shown in a new \
window.\n\t\t

\n\t\t\twhere the \
Antoine Eqn is given by \"<>MSPFormat[HoldForm[P=Exp[A - \
B/(T+C)]],StandardForm]<>\n\t\t\t\" and the units are P (kPa) and T \
(K)\",\"\"]%>\n\t\t\t A plot of \
Antoine's Equation for \"<>$$speciesList<>\"\n\t\t\t is shown \
below

\n\t\t\twhere the \
Antoine Eqn is given by \"<>MSPFormat[HoldForm[P=Exp[A - \
B/(T+C)]],StandardForm]<>\n\t\t\t\" and the units are P (kPa) and T (K)\" \
,\"\"]%>\n\t\t\t\n\t\t\t A plot of \
Antoine's Equation for \"<>$$speciesList<>\"\n\t\t\tis shown \
below