CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   three coupled equations (https://www.cfd-online.com/Forums/main/166968-three-coupled-equations.html)

ptub February 20, 2016 13:32

three coupled equations
 
Hi,

I am trying to solve three coupled equations in 1D computational domain. For example, if I want to write my first equations, there are six unknowns a(i+1), a(i), a(i-1) ,c(i-1) c(i),c(i+1). and so for second and third equation. However, I couldn't get tri-diagonal matrix I didn't get how to set my unknowns into matrix. Can somebody help? Thanks.

FMDenaro February 20, 2016 13:59

But it is a problem for you if the matrix is not tri-diagonal?
your unknown vector x is something like this?

A.x=q

x=
[a(1),...a(N), b(1), ....b(N), c(1),....c(N)]^T

ptub February 20, 2016 14:04

Yeap. My first equation for a(1) includes unknowns C(1) and C(2). Also b(1) includes C(1) and C(2). C(1) includes A(1) and B(1). At the end, I didn't get tri-diagonal matrix. I had tri-diagonal matrix solver. I don't have sparse matrix solver. I am not sure how to proceed.

FMDenaro February 20, 2016 14:29

Quote:

Originally Posted by ptub (Post 586098)
Yeap. My first equation for a(1) includes unknowns C(1) and C(2). Also b(1) includes C(1) and C(2). C(1) includes A(1) and B(1). At the end, I didn't get tri-diagonal matrix. I had tri-diagonal matrix solver. I don't have sparse matrix solver. I am not sure how to proceed.

Have you tried to organize a block-matrix form?

ptub February 20, 2016 14:38

Quote:

Originally Posted by FMDenaro (Post 586097)
But it is a problem for you if the matrix is not tri-diagonal?
your unknown vector x is something like this?

A.x=q

x=
[a(1),...a(N), b(1), ....b(N), c(1),....c(N)]^T

I am not sure how to do that. If I do that, my unknown matrix won't be like this x.

FMDenaro February 21, 2016 12:33

Check for an interative splitting method so that you can work with iterated Thomas solver


All times are GMT -4. The time now is 00:41.