CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Setting boundary conditions to faces, really simple question

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sbaffini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2012, 09:25
Question Setting boundary conditions to faces, really simple question
  #1
New Member
 
lazio
Join Date: Apr 2010
Posts: 22
Rep Power: 16
lrunber is on a distinguished road
Hi,
I am just wondering a very basic principle. If the linear system of equations is set up for each cell in the domain from the well known equation (where p is the cell center and n the neighbouring cell centres):

a_p \phi_p + \sum a_n \phi_n = r

Where are the boundary condition imposed, considering BC's are to be set at the appropriate faces and the values for \phi are at the cell centers?
lrunber is offline   Reply With Quote

Old   March 9, 2012, 14:59
Default
  #2
Senior Member
 
duri
Join Date: May 2010
Posts: 245
Rep Power: 17
duri is on a distinguished road
You can set up boundary conditions by two ways. In Ghost cell approach boundary values are stored in the ghost cells which is adjacent to boundary. Boundary fluxes are calculated from interior and ghost cell. Other way is to apply characteristics boundary condition where you can do it directly on face and estimate flux without additional cells.
duri is offline   Reply With Quote

Old   March 9, 2012, 15:12
Default
  #3
New Member
 
lazio
Join Date: Apr 2010
Posts: 22
Rep Power: 16
lrunber is on a distinguished road
Quote:
Originally Posted by duri View Post
You can set up boundary conditions by two ways. In Ghost cell approach boundary values are stored in the ghost cells which is adjacent to boundary. Boundary fluxes are calculated from interior and ghost cell. Other way is to apply characteristics boundary condition where you can do it directly on face and estimate flux without additional cells.
Thank you very much duri, that is very informative.

I take then that the setting of a fixed value boundary ( e.g., \phi_{boundary} = 1.0) is done implicitly through either of the methods you mentioned above and there is no explicit imposing of \phi_{boundary} within the algebraic system of equations?
lrunber is offline   Reply With Quote

Old   March 9, 2012, 16:43
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Besides the specific approach in use, in cell centered FV method you have variables stored in cell centers but you need their integrals on volume faces. When they are available they are used directly (velocity and/or mass flow inlets; wall normal derivative of the wall normal velocity component for incompressible flows; symmetry boundaries; outflows etc). In all the other cases, both on boundary and interior cells, some reconstruction/approximation is adopted by using known face or neighbor cell values.
sbaffini is offline   Reply With Quote

Old   March 10, 2012, 02:49
Default
  #5
New Member
 
lazio
Join Date: Apr 2010
Posts: 22
Rep Power: 16
lrunber is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
Besides the specific approach in use, in cell centered FV method you have variables stored in cell centers but you need their integrals on volume faces. When they are available they are used directly (velocity and/or mass flow inlets; wall normal derivative of the wall normal velocity component for incompressible flows; symmetry boundaries; outflows etc). In all the other cases, both on boundary and interior cells, some reconstruction/approximation is adopted by using known face or neighbor cell values.

Thank you for your explanation Paolo, if you don't mind I want to write in my understanding and if you or anyone could please comment/correct?

In the cell centered FV method the variables are stored at the cell centers but the face values are required for the discretized forms of the convection and diffusion terms. Generally this is obtained by interpolation such as the popular upwind differencing. At a fixed value (Dirichlet) boundary this is set directly to the specified value (no interpolation is used). This results in the correct value being obtained for the boundary without direct modification of the algebraic system of equations. Subsequently, the setting of a fixed value boundary condition is more complex than directly imposing \phi_{boundary} in [A] [\phi] = [Q], but is achieved through setting values at the faces where they are used in the discretized form of the equations which results in a modification of the coefficient matrix (A) and source vector (Q).
lrunber is offline   Reply With Quote

Old   March 10, 2012, 08:28
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Dear lrunber,

you are essentially correct, however i'd like to stress some aspects.

1) When you put your equations under the matrix form, you have to remember that this implies that your variables are the cell centerd ones (in cell centered FV). As a consequence, using a face variable directly (a la Dirichlet) actually implies a modification in the corresponding cell equation (i assume there is only one neighbor cell as it is a boundary condition) with respect to other interior cell equations. That is, the corresponding neighbor cell coefficient is missing from the relative equation in the system.

2) In a general transport equation, face values are required for the variables and their face normal gradient. As you can only have one boundary condition (dirichlet or neumann, respectively), one of the two values required still need an approximation involving other cell values. Say, you have a dirichlet condition: the boundary normal gradient has to be approximated by values inside the domain (one-sided, in contrast to the ghost-cell approach). If you have a neumann condition then the face values will need an approximation involving interior cells (however, face values in finite volumes are only required for the convective term and this case has very few applications, mostly outflows)

Hope this helps more
lrunber likes this.
sbaffini is offline   Reply With Quote

Old   March 10, 2012, 09:45
Smile
  #7
New Member
 
lazio
Join Date: Apr 2010
Posts: 22
Rep Power: 16
lrunber is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
Dear lrunber,

you are essentially correct, however i'd like to stress some aspects.

1) When you put your equations under the matrix form, you have to remember that this implies that your variables are the cell centerd ones (in cell centered FV). As a consequence, using a face variable directly (a la Dirichlet) actually implies a modification in the corresponding cell equation (i assume there is only one neighbor cell as it is a boundary condition) with respect to other interior cell equations. That is, the corresponding neighbor cell coefficient is missing from the relative equation in the system.

2) In a general transport equation, face values are required for the variables and their face normal gradient. As you can only have one boundary condition (dirichlet or neumann, respectively), one of the two values required still need an approximation involving other cell values. Say, you have a dirichlet condition: the boundary normal gradient has to be approximated by values inside the domain (one-sided, in contrast to the ghost-cell approach). If you have a neumann condition then the face values will need an approximation involving interior cells (however, face values in finite volumes are only required for the convective term and this case has very few applications, mostly outflows)

Hope this helps more
Thank you Paolo, this helps a lot. The implementation of BC's are a bit more complicated than I originally thought, but I now understand much better
lrunber is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 10:01
Reading field values and setting them as boundary conditions sega OpenFOAM Running, Solving & CFD 1 July 7, 2009 07:18
help setting up boundary conditions for combustor Tomas CFX 2 November 3, 2005 04:34


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