CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Adding volumetric Source Term (http://www.cfd-online.com/Forums/openfoam/64627-adding-volumetric-source-term.html)

mohanamuraly May 17, 2009 22:00

Adding volumetric Source Term
 
I am trying to add volumetric source terms to the momentum equation in OpenFOAM. I created a

// S is the source term
volVectorField S;

I have specific points in the domain where I want to add the sources. I basically use the function:

cell_label = mesh.findCell(point[i]);

I need to set the source value at this cell_label which I calculate based on the velocity value at the cell center.

My question is how do I obtain the velocity at the cell center (of cell_label) and how to add the source term at the cell_label location in S. It was tough search the forums and C++ programmer ref got nothing so far.

appreciate your help very much,


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