CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   definiton of volScalarField G(x, y); (http://www.cfd-online.com/Forums/openfoam/90606-definiton-volscalarfield-g-x-y.html)

Burnhead July 15, 2011 09:10

definiton of volScalarField G(x, y);
 
Hello,

im working on a adjustment of a turbulence model.
While doing that i wondered what volScalarField G(x, y); actually does in a mathematical sense. A Definiton like volScalarField S2 = magSqr(symm(fvc::grad(U_))); is clear to me, but i really can not imagine what the "," is doing. (and unfortunately i wasnt able to find any proper syntax description)
Thanks in advance!

marupio July 16, 2011 16:11

The way you've written it, it looks to me like a constructor.
Code:

volScalarField G(x, y);
The x and y would constructor parameters. Look under GeometricField.H for the constructor it's using. You have to know the classes of x and y to figure out which of the many constructors is being called. Note, the GeometricField class starts off with the definition of an embedded classe, GeometricBoundaryField... skip past that to the constructors for the GeometricField itself.


All times are GMT -4. The time now is 23:47.