From: Maxx Chatsko on
"Maxx Chatsko" <chatskom(a)chemimage.com>
From: Gavin on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i3c0d8$1o4$1(a)fred.mathworks.com>...
> "Maxx Chatsko" <chatskom(a)chemimage.com>

Maxx,
I emailed the code to you. Let me know what you think. Thanks.
From: Gavin on
> The first thing I'd do is to substitute N(i) = N~(i)^2
> for i=1,...,6 to avoid negative arguments within
> the logarithm.
>
> Best wishes
> Torsten.

Torsten,

Substituting N(i) = N~(i)^2 for i=1...6 does not solve my problem. I still receive warnings for ill conditioned matrix. It also increases the number of iterations needed to solve the system.

Gavin
From: Torsten Hennig on
> > The first thing I'd do is to substitute N(i) =
> N~(i)^2
> > for i=1,...,6 to avoid negative arguments within
> > the logarithm.
> >
> > Best wishes
> > Torsten.
>
> Torsten,
>
> Substituting N(i) = N~(i)^2 for i=1...6 does not
> solve my problem. I still receive warnings for ill
> conditioned matrix. It also increases the number of
> iterations needed to solve the system.
>
> Gavin

Did you adjust the Jacobian matrix according to the substitution ?

Best wishes
Torsten.
From: Darren Rowland on
Torsten makes a good point about the need for updating the Jacobian.
I would also recommend writing a simple routine which calculates the Jacobian numerically, then compare your analytical version with the numerical.

Another common approach when working with chemical equilibria is to work only with the logarithms of the concentrations, i.e. let M = log(N) then run the NR scheme on M. You will need to update your Jacobian for this but the changes are only minor.

Hth
Darren

@ Maxx,
Trying to access www.chemimage.com I got the following error

Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

This is using Firefox 3.6.8
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: OPC "trend" function
Next: variables in titles ??