Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

p.s. // Re: Re: new to group - Chemical Equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100235] p.s. // Re: [mg100213] Re: [mg100175] new to group - Chemical Equation
  • From: "Scot T. Martin" <smartin at seas.harvard.edu>
  • Date: Thu, 28 May 2009 19:34:54 -0400 (EDT)
  • References: <6147782.1243412890107.JavaMail.root@n11> <200905280829.EAA14200@smc.vnet.net>

Jem, I will just add that the solution to chemical equilibrium equations 
involves a constrained matrix of log-linear combinations. Typically, the 
approach is a numerical solution, using on of the advanced minimization 
functions like a simplex algorithm (although I am not a mathematician so 
others on this site may have more developed opinions than mine of "forget 
analytical solutions and go for a numerical solution").

Simplex is available as the method "NelderMead" of the NMinimize[] 
function.

On Thu, 28 May 2009, Scot T. Martin wrote:

> Jem,
>
> I'm a chemist, and I have various thermodynamic and kinetic solvers. Here's 
> one that could do what you want. It's from April 1999, but it should still 
> work fine (though I haven't tested it):
>
> http://www.seas.harvard.edu/~smartin/surface complexation model.nb
>
> This program does more than you want, i.e., the equilibrium equations include 
> a term for adsorption to a surface. Nevertheless, maybe you'll find the 
> package helpful for your application.
>
> Best, Scot
>
>
>> From: Jem 
> [mailto:not.a.ninja25 at gmail.com] >
>> Hi,
>> 
>> Hi, I am a postgrad student and completely new to mathematica, I am just
>> starting to realise the possibilities.
>> 
>> I am trying to do a chemical speciation calculation.
>> I have a set of simultaneous equations which represents the equilibria, 
>> mass
>> balance, and charge balance in the system.
>> 
>> I want to eliminate some of the variables, and then be able to solve for 
>> the
>> remaining ones.
>> My system of equations looks like this:
>> a=b+c+d
>> e=f+g+c+2d
>> h=c/(bg)
>> i=d/(cg)
>> hi=d/(bg^2)
>> j=mg/f
>> k=lm
>> n+m+b+c=g+l
>> 
>> I will try to attach an image of what my formula looks like sofar.
>> Basically, I can solve for the variable I want, but I am having trouble
>> eliminating the ones I don't want (ie. I am getting an answer that is in
>> terms of the wrong variables)
>> 
>> I have been in the help files for ages, and don't really understand how to
>> do this.
>> I would really appreciate some pointers!!
>> Thanks
>> 
>> 
>> Solve[{a == b + c + d, e == f + g + c + 2 d, h == c/(b*g),
>>  i == d/(c*g), h*i == d/(b*g^2), j == m*g/f, k == l*m,
>>  n + m + b + c == g + l}, {g}]
>> 
>> 
>> 
>> 
>> 
>


  • Prev by Date: Re: NDSolve with Numeric Function
  • Next by Date: Re: How to handle Units of Measure
  • Previous by thread: Re: Re: new to group - Chemical Equation
  • Next by thread: Re: new to group - Chemical Equation