CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Periodic BC + FVM (https://www.cfd-online.com/Forums/main/8785-periodic-bc-fvm.html)

Kilda March 3, 2005 04:28

Periodic BC + FVM
 
Hi all,

I am trying to implement, Periodic BC to the Unsteady finite volume code, that I have, which solves the solution of equations by line by line TDMA.

So, no longer I can use this Line by line TDMA, for periodic BC, as I will be having some more enteries in the Matrix that I am solving, so I need to go into Cyclic Tridiagonal systems, where in, there are two additional enteries that are positoned at the end of the First row and at the begining of the last row.

I am not sure how these values at the end of the first row, and the begining of the last row are generated, as per my reading, the last entry in the first row is the East co-efficient of the last node (considering 1D) and the first entry in the last row, is West co-efficient of the first node in the grid, but these co-efficients are ZERO, which means that should I consider the co-efficeints at the 2nd and the (n-1) th node?????????

Any help is HIGHLY appreciated

kilda

andy March 4, 2005 08:44

Re: Periodic BC + FVM
 
Is you "cyclic tridiagonal system" a function/subroutine you have got from somewhere and do not understand the arguments or do you not understand how to solve a periodic tridiagonal system using code for a non-periodic system?

The coefficients in the corners are the coefficients linking your first point to the last point and the last point to the first point. If they are zero then you do not have a periodic problem.

Kilda March 4, 2005 20:17

Re: Periodic BC + FVM
 
Hi Andy,

Thanks for the reply, I am trying to figure out what the co-efficients will be at the end of first row, and the begining of the N th row, in the cyclic system?????

As per my understanding so far, (you have to correct me), the last entry (alpha) in the first row will be the west co-efficient of the Nth node(last node), and

the first entry in the last row(beta), will be the east co-efficient of the first Node (starting node).

The matrix will luk something like this

b1 c1 0 0 0 alpha

a2 b2 c2 0 0 0

0 a3 b3 c3 0 0

0 0 a4 b4 c4 0

0 0 0 a5 b5 c5

beta 0 0 0 a6 b6

thanks,

kilda


andy March 6, 2005 09:39

Re: Periodic BC + FVM
 
Assuming west is i-1 and east i+1 then alpha is the west coefficient of the first point and beta is the east coefficient of the last point. This seems an odd question and I suspect it may not be where your problem/misunderstanding lies.

Kilda March 9, 2005 05:02

Re: Periodic BC + FVM
 
Hi andy,

Thanks for the reply.

The fact that I am applying PBC, is that there will be no i-1 for the 1st point(boundary point,1st row in the matrix) and no i+1 to the Nth (last boundary point, last row in Matrix).

Where as for the interior nodes there will be no alpha and beta...(which u will know!!!)

Kilda.

Wen Long March 15, 2005 21:28

Re: Periodic BC + FVM
 
The point is, since you are imposing periodic bc, that means the first node value u(1) = the point west to the last node value u(N+1), so that (because derivatives at 1 and N are also periodic) u(2) = u(N+2), u(0) = u(N),,,

Hence the west point of your first node u(1) is u(0), and you should substitute u(0) by u(N);;

Also, the left point of your last node u(N) is u(N+1), and you should substitute it by u(1),

Then, you will have a cyclic equation.

sat your discretization for any point i=1,,,N is:

a*u(i-1) +b*u(i) + c*u(i+1), i=1,,,N

then you have(N=6):

c-----------

b c 0 0 0 a u(1)

a b c 0 0 0 u(2)

0 a b c 0 0 * u(3) = (R1,R2,...,RN)^T

0 0 a b c 0 u(4)

0 0 0 a b c ..

c 0 0 0 a b u(N) c-----------

Google Morison-Sherman formula for solving the upper equation.

Wen

Wen Long March 15, 2005 21:30

Re: Periodic BC + FVM
 
The point is, since you are imposing periodic bc, that means the first node value u(1) = the point east to the last node value u(N+1), so that (because derivatives at 1 and N are also periodic) u(2) = u(N+2), u(0) = u(N),,,

Hence the west point of your first node u(1) is u(0), and you should substitute u(0) by u(N);;

Also, the East point of your last node u(N) is u(N+1), and you should substitute it by u(1),

Then, you will have a cyclic equation.

say your discretization for any point i=1,,,N is:

a*u(i-1) +b*u(i) + c*u(i+1), i=1,,,N

then you have(N=6):

c-----------

b c 0 0 0 a u(1)

a b c 0 0 0 u(2)

0 a b c 0 0 * u(3) = (R1,R2,...,RN)^T

0 0 a b c 0 u(4)

0 0 0 a b c ..

c 0 0 0 a b u(N) c-----------

Google Morison-Sherman formula for solving the upper equation.

Wen


All times are GMT -4. The time now is 20:42.