sven |
August 14, 2009 12:06 |
Problem with skew and .T()
Hey FOAMers,
I try to implement a new turbulence model in OpenFOAM. For doing this I slightly want to change the reynolds-stress equation of the LaunderGibsonRSTM-turbulence model. More exactly, I want add a new term to the currently existing terms of the equation. This term is:
Code:
C*k*((R_/(2*k)-1.0/3.0*I)&skew(fvc::grad(U_)) + skew(fvc::grad(U_))&(R_/(2*k)-1.0/3.0*I))
If I add this term and compile the file, I get the following error message:
Code:
YounisWeigandVogler.C: In member function ‘virtual void Foam::incompressible::RASModels::YounisWeigandVogler::correct()’:
YounisWeigandVogler.C:544: error: no match for ‘operator==’ in ‘Foam::operator+(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = Foam::SymmTensor<double>](((const Foam::tmp<Foam::fvMatrix<Foam::SymmTensor<double> > >&)((const Foam::tmp<Foam::fvMatrix<Foam::SymmTensor<double> > >*)(& Foam::fvm::Sp(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SymmTensor<double>](((Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&)(&((Foam::incompressible::RASModels::YounisWeigandVogler*)this)->Foam::incompressible::RASModels::YounisWeigandVogler::R_))))))) == Foam::operator+(const Foam::tmp<Foam::GeometricField<TypeR, PatchField, GeoMesh> >&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Type1 = Foam::SymmTensor<double>, Type2 = Foam::Tensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::skew(const Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, PatchField, GeoMesh> >&) [with PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]()))))’
/home/sven/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/cellShape.H:158: note: candidates are: bool Foam::operator==(const Foam::cellShape&, const Foam::cellShape&)
/home/sven/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/cellModelI.H:124: note: bool Foam::operator==(const Foam::cellModel&, const Foam::cellModel&)
/home/sven/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/cell.H:134: note: bool Foam::operator==(const Foam::cell&, const Foam::cell&)
/home/sven/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/faceI.H:138: note: bool Foam::operator==(const Foam::face&, const Foam::face&)
/home/sven/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/objectHit.H:110: note: bool Foam::operator==(const Foam::objectHit&, const Foam::objectHit&)
/home/sven/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/edgeI.H:171: note: bool Foam::operator==(const Foam::edge&, const Foam::edge&)
/home/sven/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/instant.H:140: note: bool Foam::operator==(const Foam::instant&, const Foam::instant&)
I thought it is perhaps a problem with the "skew function", so I tried not to use this function, but implementing it by using the definition of this function, that means:
Code:
"skew(fvc::grad(U_))" = 0.5*(fvc::grad(U_)-fvc::grad(U_).T())
Unfortunately this creates the following error message:
Code:
YounisWeigandVogler.C: In member function ‘virtual void Foam::incompressible::RASModels::YounisWeigandVogler::correct()’:
YounisWeigandVogler.C:544: error: ‘class Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >’ has no member named ‘T’
Has anyone encountered similar problems or does anyone know how to solve these problems? Thanks a lot
|