CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   definiton of volScalarField G(x, y); (

Burnhead July 15, 2011 09:10

definiton of volScalarField G(x, y);

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.

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 19:04.