CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   finite volume boundary conditions (http://www.cfd-online.com/Forums/main/130746-finite-volume-boundary-conditions.html)

mihaipruna March 3, 2014 22:58

finite volume boundary conditions
 
please give me examples of boundary conditions for solving differential equations using the finite volume method, and how they are applied to the governing equations.

RameshK March 5, 2014 10:19

There are different kinds of Boundary conditions and different ways of implementing it. It all depends on what you want to do. Can you be specific in your question so that we can help you.

What kind of FVM are you using Cell centred or Staggered grid?
What boundary conditions are you interested in ?

Regards

mihaipruna March 5, 2014 11:16

hi Ramesh
I'm using a cell centered approach for solving potential flow over a body.
By cell centered I mean the potentials are calculated at cell centers, and my grid is the cell edges.
I need to understand how to apply wall , inflow and outflow BCs .
For instance, I saw a technique called ghost cells where you add an extra layer of cells all around, I guess, to get the potentials on the domain edges.
Also, the fluxes play a role in this, since walls mean no flux normal to the wall.
But I can't find a good reference to explain the techniques to find the potential function values on the edges of the domain. Right now the computational domain is the same as the physical domain and the problem is 2D.

RameshK March 5, 2014 17:07

If you are using cell centred FVM, then you can observe that Ghost cell based method makes your coding easier in implementing the boundary conditions by assuming a layer of virtual cells or ghost cells on the boundary of interest and prescribe your variable values prescribed at the cell centres of the ghost cells. The difference between the Ghost cell and physical cell is that the ghost cell doesnt have any physical dimension but you can store your variables at the centroids so that when you use the interpolation at the cell interfaces what ever the interpolations you use in the interior can be directly used at the boundary.

In one way its just a programming convenience so that your implementation as code gets easier by utilizing ghost cells

Hope you got the Idea.

mihaipruna March 8, 2014 10:57

Well I used ghost cells and what I thought were good differential boundary conditions , but I still got increasing instability as I was solving the potential equation for a cell center potential as unknown, and surrounding cells to calculate fluxes using green's theorem.

Joachim March 11, 2014 17:25

Hi everyone!

if you have a structured grid, how do you compute the grid metrics in the ghost cells, since they don't have any physical dimensions? You just take the value of the boundary cell?

Thank you!

Joachim

mihaipruna March 12, 2014 19:48

there are no metrics because the coordinate system is not transformed.
I used Green's theorem to convert the surface integrals to line integrals (since it's a 2d code)

I created the ghost cells simply as center x,center y and potential value, in order to be able to sum the potentials around the boundary cells.

The reason I needed ghost cells is because I had to average values to get the potential/x and potential/y values on cell edges, and that included boundary edges.
Green's theorem was used to calculate the first derivatives from potential values around each edge, so I need to make up some values.
I used expected inflow, determined outflow, wall etc.

Joachim March 12, 2014 19:52

Sorry, but I meant in general, not for your particular problem :D
If you want high order derivatives, you will need to evaluate the grid metrics in the ghost cells...


All times are GMT -4. The time now is 03:34.