CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Tridiagonal system (https://www.cfd-online.com/Forums/main/133583-tridiagonal-system.html)

celi April 17, 2014 03:29

Tridiagonal system
 
I need a method for solving a linear system (x1..xn) of type
A*x=B
where A is a tridiagonal matrix

x x
x x x
. x x x

with (generic) structure

first row
x1*(k11+k11a/(x1+x2+..xn) x2*k13

second row
x1*k21 x2*(k22+k22a/(x1+x2+..xn) x3*k23

third row
x2*k32 x3*(k33+k33a/(x1+x2+..xn) x4*k34

and so on, size N about 400 x 400 (sparse),
I am unable to find a solution which allow to use Thomas or similar efficient methods
cause diagonal elements contains K/(x1+x2+...+xn) which require separate processing,
what am I missing here ?
Is there any simple solution for these systems ?
Thanks for help.

agd April 17, 2014 12:55

Pardon me if this is a stupid question, but if I understand your notation it looks like you have a system of quadratic equations rather than linear equations. If you multiply through by the denominator of the diagonal terms don't you get a bunch of quadratic terms?

celi April 17, 2014 13:08

thanks for the comment,
it looks like there is a quadratic contribute,
my problem is to identify an efficient method for solving such kind of systems,
a iterative method could be Ok providing there is a way (which I do not know) to generate accurate estimates for vector [x1..xn]

agd April 17, 2014 13:16

If you want to use a linear solver, then try linearizing the system first. A Newton-Raphson procedure would probably be sufficient, at which point you could use a linear iterative solver to solve the resulting linear system.


All times are GMT -4. The time now is 23:57.