output from a package
- To: mathgroup at smc.vnet.net
- Subject: [mg23168] output from a package
- From: steven.w.gaskey at Exxon.com
- Date: Thu, 20 Apr 2000 23:48:40 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
During a Mathematica session I developed a set of algebraic equations to solve a problem describing the vapor-liquid equilibrium in a reactor. The procedure I used was to define the equations, define a set of rules defining the parameters, define a set of initial conditions, then get the equations and initial conditions in a form that FindRoot likes and call the function. FindRoot returns the set of rules at the solution. Now I want to carry out the calculation a number of times so I used the package template from Maeder's book to turn my notebook into a package. The calculations work as expected, but the values returned from FindRoot are in the context of the package, e.g. {vlepackage`Private`wC2->.....} There are many variables, so I prefer to set up the definition to use the same names every time. What I would like is something like the `Statistics`LinearRegression package that always returns a rule with a name from the current context (or that what it looks like) That is I would like to be able to say things like wC2/.vlecalculation[p1,p2,p3] and the module would return a rule list that would work. Is there an straightforward way to do this? Thanks Steve Steven Gaskey Staff Engineer, Exxpol Reactor Technology Development ExxonMobil Chemical Company Baytown Polymer Center 5200 Bayway Dr Baytown, TX 77520 281 834 0356 Fax: 281 834 2434 Steven.W.Gaskey at Exxon.com