Thursday, December 12, 2024

Solving Simultaneous Algebraic Equations

To solve simultaneous algebraic equations, the IT Solver uses a multi-equation form of the Newton-Raphson method (slightly modified to optimize step sizes). To solve for a single equation of the form

f(x) = 0,

the Newton-Raphson method uses a first-order Taylor series approximation of f(x) about the point xi:

f(xi + 1) = f(xi) + (xi + 1 - x)f'(xi).

The series expansion is then solved for f(x)=0:

xi + 1 = xi - f(xi)/f'(xi).

As the subscripts i and i +1 imply, the procedure is iterative. After each new guess for x is calculated, the function, f, and its derivative, f ', are reevaluated, and a new guess for x is calculated. The multi-equation form of the Newton-Raphson method works similarly, except that the Taylor series expansion must be in terms of each independent variable. The assembled matrix of partial derivatives of each equation (in the form f(x) = 0), with respect to each independent variable, is called the Jacobian. If the vector of independent variables at the current and previous iterations are {xi + 1} and {xi}, the Jacobian matrix evaluated at {xi} is [Ji], and the vector of equations evaluated at {xi} is {fi}, the equation

[Ji]{xi + 1} = [Ji]{xi} - {fi}

can be solved for {xi + 1}. Again, the procedure iterates until the solution has converged. Convergence is measured by evaluating the norm (calculated as the root-mean square) of the residuals of the equations. At the exact solution, the residual will be zero. The section on convergence criteria further explains how the Solver determines whether a solution has converged and how to control convergence criteria.

The partial derivatives in the Jacobian are calculated numerically. Calculating the partial derivatives symbolically might aid in convergence of the solution, but there would be a substantial penalty in terms of computational effort to determine the derivatives, and the accuracy of the final solution would be nearly indistinguishable from the solution calculated using the numerical estimate of the Jacobian. In addition, calculating analytical derivatives of tabular data, such as property functions, is impossible.

Because the engine is an iterative solver, Initial Guesses for the variables are required. For simple problems, "1" can often be used for all of the initial guesses. For more complex problems, however, the user may have to provide more accurate estimates of the variable values.