CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   acc (

nikesh March 7, 2013 00:22

Hi all,

It sometimes gets me confused whether I'm at the right place for my questions. However, here it goes....

I need to access the source code of SIMPLE algorithm in OpenFOAM. Where do I look?
Secondly, after going into the source code, I'll need to understand one of the functions used there. For eg, there's a piece of code that reads as::

eqnResidual = solve ( UEqn() == -fvc::grad(p) ).initialResidual();

Now, I need to find out how initialResidual is determined/calculated inopenFOAM (simpleFoam),how and where do I look for it ??

Is there any command that I can use in the terminal that'll direct me where that particular function is located?

Any heads up highly appreciated.


Bernhard March 7, 2013 03:33

You could either use the Doxygen files: this brings you to:

Or you could use grep and find from the src directory
grep initialResidual $(find -name \*.C -or -name \*.H)

All times are GMT -4. The time now is 22:01.