Fitting to Nonpolynomial Equations


The least squares methodology we've discussed so far is applicable to polynomial equations. But what happens when you want to use another type of equation, such as an exponential, logarithmic , or power function? You can still use the least squares analysis process if you can recast the function you want to use into polynomial form.

The best way to explain this is by example. In Chapter 19 we developed a method to compute the viscosity of a real gas mixture. To perform this computation you need to calculate the collision integrals of every species pair in the gas mixture. A collision integral can be thought of as an orientationally and thermally averaged collision probability between two molecules. Collision integral data can be measured experimentally at low temperatures but more often is computed in tabular form by analytical techniques. To use this collision integral data in an analysis program, it is usually convenient to create a curve fit to the tabular data. One commonly used curve fit expression is shown in Eq. (24.10).

Equation 24.10

graphics/24equ10.gif


Clearly, Eq. (24.10) is not a polynomial equation but it can be converted into a polynomial form by taking the natural logarithm of the left and right-hand sides. When this operation is performed, Eq. (24.10) becomes the following third-order equation.

Equation 24.11

graphics/24equ11.gif


We can see from Eq. (24.11) that the original equation has been transformed into polynomial form. The independent variable is ln T and we are now trying to match values of ln( ( l,s )* ) instead of ( l , s )* , but the bottom line is that the least squares analysis can be applied to Eq. (24.11). As you might expect, the arrays A T A and A T y are somewhat different when using Eq. (24.11) than they are for a standard polynomial equation. The A T A array elements for Eq. (24.11) are shown in Eq. (24.12).

Equation 24.12

graphics/24equ12.gif


The A T y vector for Eq. (24.11) is shown in Eq. (24.13).

Equation 24.13

graphics/24equ13.gif




Technical Java. Applications for Science and Engineering
Technical Java: Applications for Science and Engineering
ISBN: 0131018159
EAN: 2147483647
Year: 2003
Pages: 281
Authors: Grant Palmer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net