| 1 | \documentclass{article} |
|---|
| 2 | \usepackage{fullpage,lmodern,cxref,url} |
|---|
| 3 | \usepackage[T1]{fontenc} |
|---|
| 4 | \begin{document} |
|---|
| 5 | \title{{\tt Ternary}: Ternary Thermodynamics Visualization} |
|---|
| 6 | \author{Adam C. Powell, IV} |
|---|
| 7 | \date{Version @VERSION@ released @RELEASE_DATE@} |
|---|
| 8 | \maketitle |
|---|
| 9 | |
|---|
| 10 | \begin{abstract} |
|---|
| 11 | {\tt Ternary} is a little code written by Adam Powell back in 2003 to |
|---|
| 12 | visualize ternary free energy functions. Today it can also calculate the |
|---|
| 13 | two- and three-phase regions in the phase diagram. Soon it will do a lot |
|---|
| 14 | more. |
|---|
| 15 | \end{abstract} |
|---|
| 16 | |
|---|
| 17 | \section{Introduction} |
|---|
| 18 | |
|---|
| 19 | In 2003, Adam Powell wrote the core of this little program to visualize the |
|---|
| 20 | free energy function of a polymer-solvent-nonsolvent system as used by one of |
|---|
| 21 | his grad students. In 2008, he expanded it considerably: |
|---|
| 22 | \begin{itemize} |
|---|
| 23 | \item Removed it from the {\tt RheoPlast} package and made it a stand-alone |
|---|
| 24 | program, with considerably expanded documentation. |
|---|
| 25 | \item Craig Carter used a convex hull construct to find and illustrate the |
|---|
| 26 | lowest-energy manifold of a binary free energy function or set of |
|---|
| 27 | functions.\footnote{Though others have noted the relationship between the |
|---|
| 28 | convex hull and the minimum enengy surface before ({\em e.g.} |
|---|
| 29 | \cite{Var1990,Aic2001,Aic2003,Zho2004}), Carter's Mathematica scripts are |
|---|
| 30 | the inspiration for this work.} Based on that concept, ternary uses {\tt |
|---|
| 31 | qhull} \cite{BDH1997} to calculate that hull, and visualizes the edges of the resulting |
|---|
| 32 | triangles---which will clearly show the one- and two-phase regions, complete |
|---|
| 33 | with two-phase tie lines. |
|---|
| 34 | \item Added visualization and convex hull calculation for multiple phases with |
|---|
| 35 | separate free energy functions, {\em e.g.} solid and liquid. |
|---|
| 36 | \end{itemize} |
|---|
| 37 | |
|---|
| 38 | And {\tt Ternary} is not stopping there. In the near future, the following |
|---|
| 39 | features are planned: |
|---|
| 40 | \begin{itemize} |
|---|
| 41 | \item Refine the edges of the binodal region calculation using {\tt |
|---|
| 42 | qh\_addpoint}. |
|---|
| 43 | \item Show the edges of the spinodal region. |
|---|
| 44 | \item Based on these, build and neatly visualize how free energy functions |
|---|
| 45 | create a ternary phase diagram. |
|---|
| 46 | \item Performance enhancements: |
|---|
| 47 | \begin{itemize} |
|---|
| 48 | \item This should use geomview library function calls instead of a pipe to |
|---|
| 49 | the geomview binary. |
|---|
| 50 | \item It's probably faster to inline or vectorize the free energy function. |
|---|
| 51 | \end{itemize} |
|---|
| 52 | Then again, the slowest part of the calculation will likely be qhull, which |
|---|
| 53 | is already quite thoroughly optimized. |
|---|
| 54 | \end{itemize} |
|---|
| 55 | |
|---|
| 56 | \section{How it works} |
|---|
| 57 | |
|---|
| 58 | The file {\tt ternary.c} (documentation in appendix \ref{file_ternary.c}) |
|---|
| 59 | contains {\tt main()}, which calls functions in {\tt book.c} (appendix |
|---|
| 60 | \ref{file_book.c}) to create a triangular array of points and set of triangles |
|---|
| 61 | connecting them. It calls {\tt free\_energy()} in {\tt freenergy.c} (appendix |
|---|
| 62 | \ref{file_freenergy.c}) to calculate the free energy function on those |
|---|
| 63 | triangles. It then displays the free energy using the functions in {\tt |
|---|
| 64 | geomview.c} (appendix \ref{file_geomview.c}), which forks and controls a |
|---|
| 65 | Geomview process. |
|---|
| 66 | |
|---|
| 67 | Next it uses Qhull calls in {\tt qhull.c} (appendix \ref{file_qhull.c}) to |
|---|
| 68 | calculate the convex hull of the free energy function. It refines the |
|---|
| 69 | multi-phase triangles using Newton iteration to find the lowest-energy point |
|---|
| 70 | starting at each corner. And it optionally refines the one-phase triangles at |
|---|
| 71 | their centroids. |
|---|
| 72 | |
|---|
| 73 | It then strips out the triangles which are in the single-phase region, leaving |
|---|
| 74 | two- and three-phase regions with tie lines. It displays the remaining facets |
|---|
| 75 | using transparent triangles with black edges, which clearly show the tie lines |
|---|
| 76 | in the two-phase regions. |
|---|
| 77 | |
|---|
| 78 | For more than one free energy function, it creates a double-size array with two |
|---|
| 79 | sets of points, and two sets of triangle indices connecting them. The rest of |
|---|
| 80 | this procedure is pretty much the same. |
|---|
| 81 | |
|---|
| 82 | \section{Version History} |
|---|
| 83 | |
|---|
| 84 | This is a condensed summary of new user-visible features in {\tt Ternary}. A |
|---|
| 85 | more detailed description of new features in each release is in the {\tt |
|---|
| 86 | ChangeLog} file. |
|---|
| 87 | |
|---|
| 88 | \subsection{{\tt Ternary} 0.1.0} |
|---|
| 89 | |
|---|
| 90 | First standalone release of ternary (extracted from {\tt RheoPlast}), which |
|---|
| 91 | plots a ternary free energy function. New to this release is the use of the |
|---|
| 92 | Geomview {\tt COFF} format, which creates a much smoother pseudocolor plot. |
|---|
| 93 | |
|---|
| 94 | \subsection{{\tt Ternary} 0.2.0} |
|---|
| 95 | |
|---|
| 96 | This release links with the {\tt qhull} library to calculate the convex hull of |
|---|
| 97 | the energy function, and displays 2- and 3-phase regions in addition to the |
|---|
| 98 | free energy function. |
|---|
| 99 | |
|---|
| 100 | \subsection{{\tt Ternary} 0.3.0} |
|---|
| 101 | |
|---|
| 102 | This version introduced multiple free energy functions which intersect to |
|---|
| 103 | produce complex multi-phase regions on the convex hull. Internally, much of |
|---|
| 104 | the code in {\tt main()} moved out to a new file {\tt book.c}, which will make |
|---|
| 105 | it a lot easier to wrap these functions using SIDL or SWIG. |
|---|
| 106 | |
|---|
| 107 | \subsection{{\tt Ternary} 0.4.0} |
|---|
| 108 | |
|---|
| 109 | The new Newton refining code in {\tt qhull.c}, which uses new free energy |
|---|
| 110 | derivative functions in {\tt freenergy.c}, gives {\tt Ternary} the ability to |
|---|
| 111 | accurately predict binodal boundaries. Another new function in {\tt |
|---|
| 112 | freenergy.c} calculates the shape of the spinodal curve. |
|---|
| 113 | |
|---|
| 114 | \bibliographystyle{unsrturl} |
|---|
| 115 | \bibliography{ternary} |
|---|
| 116 | |
|---|
| 117 | \appendix |
|---|
| 118 | |
|---|
| 119 | % Begin-Of-Source-Files |
|---|
| 120 | |
|---|
| 121 | % End-Of-Source-Files |
|---|
| 122 | \end{document} |
|---|