CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

error: no match for ‘operator-'

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

LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2012, 13:58
Default error: no match for ‘operator-'
New Member
Join Date: Mar 2011
Posts: 12
Rep Power: 13
udiitm is on a distinguished road
Hi All,

I am getting the following error message :

In file included from myInterFoam.C:94:0:
pEqn.H:27:28: error: no match for ‘operator-’ in ‘Foam:Operator*

this is while i am compiling using wmake for pEqn.H.

Here in pEqn.H, I am using the following codes:

phi = phiU +
- ghf*fvc::snGrad(rho)

The above bold line shows the error line.

Similar kind of error I am getting for UEqn.H also

Please suggest me what can be the error.

Thanking you all in advance.

Thanks & Regards,

Yudhast Kumar
udiitm is offline   Reply With Quote

Old   April 25, 2012, 16:27
Senior Member
Join Date: Sep 2010
Location: Maryland, United States
Posts: 184
Rep Power: 14
adhiraj is on a distinguished road
It could be that the problem is you are trying to pre multiply the result from fvc::snGrad(rho) with something.
Try creating a variable GradRho(volScalar(or volVector)Field with proper dimensions) to store fvc::snGrad(p).
Then in this step, use -ghf*GradRho.
adhiraj is offline   Reply With Quote

Old   April 26, 2012, 00:34
New Member
Join Date: Mar 2011
Posts: 12
Rep Power: 13
udiitm is on a distinguished road
Dear Adhiraj,
Thanks for your reply.
actually the syntax is the same for general interFoam. I have just changed interpolation to average.


Even the change you have suggested is giving same error.

udiitm is offline   Reply With Quote


error, no match, operator

Thread Tools Search this Thread
Search this Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANSYS Meshing] Match Control, is this weird or am I stupid? Moufle ANSYS Meshing & Geometry 2 November 18, 2015 16:00
area does not match neighbour by ... % -- possible face ordering problem St.Pacholak OpenFOAM 9 November 22, 2011 10:02
[ICEM] Forcing surface and curve to match sherifkadry ANSYS Meshing & Geometry 0 August 27, 2010 00:28
gmsh2ToFoam sarajags_89 OpenFOAM 0 November 24, 2009 22:50
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15

All times are GMT -4. The time now is 10:19.