CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Do you really need image or ghost cells ? (https://www.cfd-online.com/Forums/main/156518-do-you-really-need-image-ghost-cells.html)

mczero57 July 8, 2015 14:53

Do you really need image or ghost cells ?
 
If you are coding up a 2D finite volume Euler solver on a structured grid, image or phantom or ghost or aux cells are often used to apply the boundary conditions. My question is - Is this absolutely necessary ? Why not just go to the boundary faces and set the value of the normal flux on that boundary there.

One reason I can think of is perhaps you want to compute the flux using a Riemann solver even on the boundary faces. If this is so, then you need some data on the other side and hence ghost cells. But, do you have to use a Riemann solver even on the boundary faces ? why ?

Any questions/comments ?
Thanks

M

FMDenaro July 8, 2015 16:15

Quote:

Originally Posted by mczero57 (Post 554524)
If you are coding up a 2D finite volume Euler solver on a structured grid, image or phantom or ghost or aux cells are often used to apply the boundary conditions. My question is - Is this absolutely necessary ? Why not just go to the boundary faces and set the value of the normal flux on that boundary there.

One reason I can think of is perhaps you want to compute the flux using a Riemann solver even on the boundary faces. If this is so, then you need some data on the other side and hence ghost cells. But, do you have to use a Riemann solver even on the boundary faces ? why ?

Any questions/comments ?
Thanks

M


indeed FV requires to prescribe the flux at the face of a boundary... however, ghost cell are nothing else than extrapolation formula therefore you get similar results with backward/forward formula at the boundary.

However, for Euler you have no derivative to specify at the boundary

wangmianzhi July 8, 2015 16:56

Hi,
I've been through the same debate in my mind when I was inplementing this (http://www.cfd-online.com/Forums/mai...uler-code.html)

It turned out that applying Riemann solver on boundary makes it very easy to apply BCs of all kinds.
The characteristics are just taken care of automatically by the Riemann solver.

What I did was following the BC strategies of Fluent (https://www.sharcnet.ca/Software/Flu...ug/node203.htm) and calculating the ghost cell state accordingly.
Then my Riemann solver would just work it out.

For data storage, in my case all BC related data and "ghost" state are on "facet", instead of in actual "ghost cells".
And the "facets" are included in the neighbour table, so that my Riemann solver can treat it just like a cell.
I'm not sure what is the simplest approach in your structured project, but either way should work.

Quote:

Originally Posted by mczero57 (Post 554524)
If you are coding up a 2D finite volume Euler solver on a structured grid, image or phantom or ghost or aux cells are often used to apply the boundary conditions. My question is - Is this absolutely necessary ? Why not just go to the boundary faces and set the value of the normal flux on that boundary there.

One reason I can think of is perhaps you want to compute the flux using a Riemann solver even on the boundary faces. If this is so, then you need some data on the other side and hence ghost cells. But, do you have to use a Riemann solver even on the boundary faces ? why ?

Any questions/comments ?
Thanks

M


sbaffini July 9, 2015 03:47

I don't know how much debate there is on this topic but, in my opinion, there are serious advantages in NOT using ghost cells:

1) Ghost cells require extrapolation. The state in the extrapolated cells might require some trick to keep the thermodynamics consistent (if using it).

2) Most b.c. do not require any Riemann problem to be solved (e.g., walls). You just know the fluxes on the faces.

3) Storage for ghost cells can explode more easily than you think, especially if your scheme requires 2 cells per side (for a given face). Imagine a wall resolved viscous simulation; having ghost cells means having two more cells in wall normal direction without any special advantage.

alma_mech July 10, 2015 16:24

hi all




I am a beginner at CFD
And I study on the 1 quasi of eular equation with shock (chapter of 12 of computational of fluid dynamics hoffmann)


Who has worked previously on this topic:confused:?
Please Help me:o
Thank you
.
.
.
and i
Apologize from starter of the thread that I asked my question here. Sorry.:o


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