CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

subtract volvectorfield and dimensionedvector

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2012, 06:37
Default subtract volvectorfield and dimensionedvector
  #1
New Member
 
deok-kyu choi
Join Date: Feb 2012
Location: Rep. of Korea
Posts: 12
Rep Power: 14
ggoggodak85 is on a distinguished road
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>: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, 14:54
Default
  #2
Member
 
India
Join Date: Oct 2012
Posts: 84
Rep Power: 13
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.

Regards,
Mayank.
mayank.dce2k7 is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 15:14.