CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   using k-variable in solver (object-oriented) (https://www.cfd-online.com/Forums/openfoam-solving/69188-using-k-variable-solver-object-oriented.html)

sven82 October 14, 2009 13:09

using k-variable in solver (object-oriented)
 
Hi Foamers,
I will output the variable k on the screen, with a output command in the solver.C
solver.C:
something like this.....
#include "/......./kEpsilon.H"
.
.
.
scalar Temp2 = gSum( mesh.magSf().boundaryField()[1] * k ( ).boundaryField()[1] ) / area2;
Info<< "......." << Temp2 << endl;
kEpsilon.H:
.
.
.
virtual tmp<volScalarField> k() const
{
return k_;
}
Error: error: 'k' was not declared in this scope
But why, i linked the kEpsilon.H with a return Methode for k !
Hope anyone can help,
Thx a lot
Sven


All times are GMT -4. The time now is 21:29.