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

How to find the source code of fvc::div(phi) in rhoCentralFoam?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2021, 04:42
Default How to find the source code of fvc::div(phi) in rhoCentralFoam?
  #1
New Member
 
Solal Amouyal
Join Date: Sep 2019
Posts: 3
Rep Power: 7
samouyal is on a distinguished road
I'm working on an OpenFOAM solver and from time to time, I have a hard time figuring out what some of the functions actually do, and where they are defined.

For example, looking at rhoCentralFoam, I was able to find out what the interpolate function does but not "fvc::div(phi)" (and all other "fvc::div" operators). I know this function call is only a function pointer that points to a specific function depending on the run-time input parameters and function arguments.

In this case, I am using the Gauss midPoint scheme for divergence for which the documentation is here. However that does not tell me much.

Question:

What does the "fvc::div(phi)" function do in rhoCentralFoam when setting Gauss midPoint? I'm looking for the actual formula. Note that I've seen the divergence operator applied on vector fields defined at cell centers but in this case, phi is a flux defined at the face centers. I'm guessing it's some weighted average based on surface vectors/area and the fluxes.
samouyal is offline   Reply With Quote

Reply

Tags
divergence, numerical schemes, rhocentralfoam


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
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 12:32
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 10:17
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 07:32


All times are GMT -4. The time now is 11:44.