CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Periodicity boundary implementation (https://www.cfd-online.com/Forums/main/187482-periodicity-boundary-implementation.html)

Jbsl May 8, 2017 01:38

Periodicity boundary implementation
 
Hello friends,

I am working on software for solving Eulers equations in MATLAB, on structured grid, using Finite volume method with MacCormack Scheme and Jameson's artifical viscosity. I successfully ran program for GAMM channel test case. Now im trying to apply my software on different geometry, namely turbine cascade. For that i need to used periodicity boundary and i feel like I am implementing it wrong. So far structure of my program looks something like this:


-set inlet/outlet boundary
-set periodicity so that for grid enlarged by two ghost cells i have 1:ny+2 and i set W(:,1) = W(:,ny+1) and W(:,ny+2) = W(:,2) where W is vector of conservative values
-calculate flux
-calculate predictor
-set periodicity again for predicted values same way
-recalculate flux using values from predictor
-calculate corrector
-set ghost cells on inlet/outlet
-set periodicity for enlarged matrice with 4 ghost cells (for Jameson) same way as above.
-calculate Jameson
-repeat

I also apply wall boundary, but since it worked for me before i don't think there should be problem.
At this point program does about 2000 iterations, residual is decresing, then it drop to complex values.
My question is if my implementation of boundary is right. If yes, i would be glad for any advice on where can be mistake in my software, since i'm really stuck.

Thanks for all the help and i'm sorry for my English.

FMDenaro May 8, 2017 08:47

I suggest to search for similar posts already answered ;)

Jbsl May 8, 2017 14:09

Quote:

Originally Posted by FMDenaro (Post 648065)
I suggest to search for similar posts already answered ;)

Hello,
that's the point, i searched the forum and thought i understand how to implement the boundary. It even seems to be working, however i still get complex values. Thats why i posted here :) I don't get why residual is decresing and then suddenly i get complex values. All i wanted was to check, if my boundaries were implemented correctly.


All times are GMT -4. The time now is 14:36.