CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Order of Accuracy of BC's in Open FOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2016, 02:13
Default Order of Accuracy of BC's in Open FOAM
  #1
D.B
Member
 
DB
Join Date: Apr 2011
Posts: 87
Rep Power: 15
D.B is on a distinguished road
Hi All,
I am trying to understand the order of accuracy of various terms in OpenFOAM. I have one question the answer of which I haven't found in the threads already posted on this forum.

I want to understand about the order of accuracy of the boundary conditions in OpenFoam. On the first instance I am getting the impression that the BC's are always first order accurate irrespective of what numerical schemes are used.

The programmers guide of openfoam v3.0.0 states the usage of fixed value and fixed gradients BC's as follows :

BC_application.jpeg

It seems from this that the gradients are first order accurate when a fixedvalue BC is used and when fixedGradient BC is used, the value only affects the last cell centre value directly, which should make it first order accurate.

Can anyone please tell me if this is a correct conclusion to draw from this ?

Cheers,
__________________
-D.B
D.B is offline   Reply With Quote

Old   April 1, 2016, 01:54
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Boundary conditions are implemented consistently with the volumetric discretisation: second order accurate.

I think your problem starts from
(mis)understanding what bc information actually brings.

If you wish to test it, do a mesh refinement study and check the order of accuracy.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   April 1, 2016, 02:07
Default
  #3
D.B
Member
 
DB
Join Date: Apr 2011
Posts: 87
Rep Power: 15
D.B is on a distinguished road
Hi Hrvoje,
Thanks for the quick reply. Apologies for my (mis)understanding. I guess I have misunderstood the formulations given in eqns 2.38 and 2.40 where the face normal gradient is expressed as
Code:
 (∇φ)f  = φ b − φ P
             |d|
Which seemed like a first order approximation for the derivative, I am sure I have missed some other steps in my basics which would be making it second order accurate. If you have any inputs it would be helpful in improving my understanding.

Thanks,
__________________
-D.B
D.B is offline   Reply With Quote

Old   April 12, 2016, 00:46
Default
  #4
D.B
Member
 
DB
Join Date: Apr 2011
Posts: 87
Rep Power: 15
D.B is on a distinguished road
Hi,
Can anyone please clear my doubt ? Am I mistaken ? or the example given in the guide is just for representation purposes and the fixedvalue and fixedGradient are implemented differently depending on the schemes ?

Cheers,
__________________
-D.B
D.B is offline   Reply With Quote

Old   April 12, 2016, 13:33
Default
  #5
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
I think you are correct, the implementation is first order. however this does not affect the solution. Having a first order BC (as many other commercial software also have, specially when it comes to unstructured grid) does not reduce the order of accuracy of solutions.
anishtain4 is offline   Reply With Quote

Old   April 16, 2016, 22:29
Default
  #6
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Hi, discretize this equation

div(nu grad(T)) = Q

with nu and Q constants and zero Dirichlet BC's at both sides of 1D problem. It has exact solution which is a parabola. With a pure second order discretization this problem is solved exactly (you need to implement second order BC's using the first and second cells near the boundary). Using the theory given in Hrvoje thesis you won't have the exact solution due to the first order treatment of BC's.

Regards!
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd 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
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 02:41
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 18:38.