CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   subtract volvectorfield and dimensionedvector (http://www.cfd-online.com/Forums/openfoam-programming-development/102092-subtract-volvectorfield-dimensionedvector.html)

ggoggodak85 May 22, 2012 06:37

subtract volvectorfield and dimensionedvector
 
Dear Foamers,

I got a problem with calculating volVectorField and dimensionedVector

dimensionedVector Omega
(
"Omega",
dimensionSet(0, 0, -1, 0, 0, 0, 0),
//RPM 10 rad/s
vector(0, 10, 0)
);

dimensionedVector Origin
(
"Origin",
dimensionSet(0, 1, 0, 0, 0, 0, 0),
point(0.0, 0.0, 0.0)
);

volVectorField Fcoriolis = Omega ^ (mesh.C().internalField()[cellLabels[cellI]] - Origin);


Running wmake, there is error message for calculation.

myinit.C:136: error: no match for ‘operator-’ in ‘((const Foam::Field<Foam::Vector<double> >*)((const Foam::volVectorField*)mesh.Foam::fvMesh::C())->Foam::GeometricField<Type, PatchField, GeoMesh>::internalField [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]())->Foam::Field<Foam::Vector<double> >::<anonymous>.Foam::List<Foam::Vector<double> >::<anonymous>.Foam::UList<T>::operator[] [with T = Foam::Vector<double>](((const Foam::labelList*)cellLabels)->Foam::List<int>::<anonymous>.Foam::UList<T>::oper ator[] [with T = int](cellI)) - Origin’

I guess there is difference type for operation.

Have any idea for this problem?

mayank.dce2k7 January 28, 2014 14:54

Hi deok-kyu choi,

Did you find solution to your problem. I am facing the same error messages.

Regards,
Mayank.


All times are GMT -4. The time now is 02:18.