CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

subtract volvectorfield and dimensionedvector

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   May 22, 2012, 06:37
Default subtract volvectorfield and dimensionedvector
New Member
deok-kyu choi
Join Date: Feb 2012
Location: Rep. of Korea
Posts: 12
Rep Power: 5
ggoggodak85 is on a distinguished road
Dear Foamers,

I got a problem with calculating volVectorField and dimensionedVector

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

dimensionedVector 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>:perator[] [with T = Foam::Vector<double>](((const Foam::labelList*)cellLabels)->Foam::List<int>::<anonymous>.Foam::UList<T>:per ator[] [with T = int](cellI)) - Origin’

I guess there is difference type for operation.

Have any idea for this problem?
ggoggodak85 is offline   Reply With Quote

Old   January 28, 2014, 15:54
Join Date: Oct 2012
Posts: 84
Rep Power: 5
mayank.dce2k7 is on a distinguished road
Hi deok-kyu choi,

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

mayank.dce2k7 is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 11:44.