CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   surfaceVectorField (http://www.cfd-online.com/Forums/openfoam/91553-surfacevectorfield.html)

lulo August 15, 2011 08:17

surfaceVectorField
 
Hi everyone

I need to create a surfaceVectorField and what i do in my code is:


Code:

forAll(mesh_.boundary(),patchI)
{
      scalarField wallStress = mag(- (nut_.boundaryField()[patchI] + nu()) * mesh_.Sf().boundaryField()[patchI] ^
                  ((uGrad ^ mesh_.Sf().boundaryField()[patchI])
                    / mesh_.magSf().boundaryField()[patchI]) / mesh_.magSf().boundaryField()[patchI]); // tau (value)

      surfaceVectorField wallStress1 = - (nut_.boundaryField()[patchI] + nu()) * mesh_.Sf().boundaryField()[patchI] ^
                  (uGrad ^ mesh_.Sf().boundaryField()[patchI]); // tau (value)
}

wallStress works fine but when i add surfaceVectorField wallStress1, when i compile it i get this error:

Code:

kOmegaWilcox2006/wallOmegaWilcox2006I.H: In member function 'virtual void Foam::incompressible::RASModels::kOmegaWilcox2006::correct()':
kOmegaWilcox2006/wallOmegaWilcox2006I.H:15:51: error: conversion from 'Foam::tmp<Foam::Field<Foam::Vector<double> > >' to non-scalar type 'Foam::surfaceVectorField' requested
In file included from kOmegaWilcox2006/kOmegaWilcox2006.C:414:0:
kOmegaWilcox2006/wallOmegaWilcox2006I.H:15:51: error: conversion from 'Foam::tmp<Foam::Field<Foam::Vector<double> > >' to non-scalar type 'Foam::surfaceVectorField' requested
In file included from kOmegaWilcox2006/kOmegaWilcox2006.C:445:0:
kOmegaWilcox2006/wallOmegaWilcox2006I.H:15:51: error: conversion from 'Foam::tmp<Foam::Field<Foam::Vector<double> > >' to non-scalar type 'Foam::surfaceVectorField' requested
make: *** [Make/linux64GccDPOpt/kOmegaWilcox2006.o] Error 1

Does anyone know how to correct this????

thanks

Luca


All times are GMT -4. The time now is 17:41.