CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Where is the grad computed in SIMPLE source code?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2019, 06:07
Default Where is the grad computed in SIMPLE source code?
New Member
zizhou huang
Join Date: Jul 2019
Posts: 13
Rep Power: 2
zizhou is on a distinguished road
I have been trying to figure out how SIMPLE algorithm is implemented, but here:
it never mentions how the gradient of scalars is computed on an irregular mesh, and I haven't found where it is computed in source code. Is there anyone could tell me where is the function of grad computation? Thank you so much!
zizhou is offline   Reply With Quote

Old   September 16, 2019, 12:19
New Member
Join Date: Dec 2015
Posts: 21
Rep Power: 6
metalfox is on a distinguished road
The explicit calculation of gradients in OpenFOAM usually involve invoking Gauss theorem:


where \mathbf{S}_{f} is the surface normal facing outwards, and \mathbf{S}_{f}\phi_{f} represents the outer product of \mathbf{S}_{f} with the tensor \phi_{f} (for example, a rank 0 tensor, i.e. an scalar).

This calculation is valid for arbitrary polyhedrons.

The relevant piece of code is in gaussGrad.C (
metalfox is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Custom Thermophysical Properties wsmith02 OpenFOAM 3 July 27, 2015 06:37
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51

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