CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Accessing data of geometricField (http://www.cfd-online.com/Forums/openfoam-solving/59475-accessing-data-geometricfield.html)

bird August 28, 2007 05:29

Hi all, i am a openfoam nov
 
Hi all,

i am a openfoam novice. I want to access gamma in the interFoam example. I want to do ray tracing of the fluid surface. But i have problems with all these templates. How can a transfer the data of volScalarField to my own source code? Is there a standard method to copy the internalField containing gamma to an array? I want to store the coordinates of the cells and the corresponding gamma values in two different arrays.


Waiting for an answer,
hk

mattijs August 28, 2007 18:21

Code snippet (untested): fo
 
Code snippet (untested):

forAll(gamma, cellI)
{
Pout<< "cellI:" << cellI << " cc:" << mesh.C()[cellI] << " gamma:" << gamma[cellI] << endl;
}


All times are GMT -4. The time now is 00:59.