(******************************************************************* This file was generated automatically by the Mathematica front end. It contains Initialization cells from a Notebook file, which typically will have the same name as this file except ending in ".nb" instead of ".m". This file is intended to be loaded into the Mathematica kernel using the package loading commands Get or Needs. Doing so is equivalent to using the Evaluate Initialization Cells menu command in the front end. DO NOT EDIT THIS FILE. This entire file is regenerated automatically each time the parent Notebook file is saved in the Mathematica front end. Any changes you make to this file will be overwritten. ***********************************************************************) BeginPackage["PhaseSeparations`",{"NumericalMath`NLimit`"}]; PhaseSeparations::usage= "PhaseSeparations is a package that computes the compositions of \ coexisting phases in multicomponent mixtures."; BinaryPhaseSeparations::usage= "BinaryPhaseSeparations[f, x] calculates the composition intervals for \ phase separation in a binary mixture with free energy function f[x] over the \ composition range x = 0 to 1. BinaryPhases[f, {x, xmin, xmax}] restricts the \ composition range to {xmin, xmax}."; DrawPhaseDiagram::usage= "DrawPhaseDiagram[{{int1, p1}, {int2, p2}, ...}] draws a phase diagram by \ interpolating between the given intervals of phase coexistence inti at the \ values of the potential pi."; BinaryPhaseDiagram::usage= "BinaryPhaseDiagram[f, x, {p, pmin, pmax}] calculates the phase diagram \ for a binary mixture with a free energy function f[x, p] over the composition \ range x = 0 to 1 and p = pmin to pmax, where p is a potential such as \ temperature. BinaryPhaseDiagram[f, {x, xmin, xmax}, {p, pmin, pmax}] \ restricts the composition range to {xmin, xmax}."; SepPoints::usage= "SepPoints is an option for BinaryPhaseSeparations that specifies how \ many sample points to use."; SepDivision::usage= "SepDivision is an option for BinaryPhaseSeparations which specifies the \ maximum amount of subdivision to be used in attempting to approximate the \ free energy curve."; VerticalPoints::usage= "VerticalPoints is an option for BinaryPhaseDiagram that specifies how \ many values to use on the y axis."; VerticalDivision::usage= "VerticalDivision is an option for BinaryPhaseDiagram which specifies the \ maximum amount of subdivision to be used on the y axis."; BinaryPhaseSeparations::noref= "The separation interval `1` could not be refined."; Begin["PhaseSeparations`Private`"]; Needs["Utilities`FilterOptions`"] skew[pts_,x0_]:=Module[{pmin,lpts,rpts,slope}, pmin=Reverse[First[Sort[Reverse/@pts]]]; If[pmin\[LeftDoubleBracket]1\[RightDoubleBracket]x2)&]]} ] Attributes[refineSeparation]={HoldFirst}; refineSeparation[f_,x_Symbol,Interval[{x1o_,x2o_}],opts___]:=Module[{x0,fm}, x0=(x1o+x2o)/2; fm=FindMinimum[ If[!(0"*"]] EndPackage[]