CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

error: no match for ‘operator-'

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

LinkBack Thread Tools Display Modes
Old   April 25, 2012, 13:58
Default error: no match for ‘operator-'
New Member
Join Date: Mar 2011
Posts: 12
Rep Power: 6
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: Pennsylvania, United States
Posts: 101
Rep Power: 7
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: 6
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
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANSYS Meshing] Match Control, is this weird or am I stupid? Moufle ANSYS Meshing & Geometry 1 May 21, 2012 08:49
area does not match neighbour by ... % -- possible face ordering problem St.Pacholak OpenFOAM 9 November 22, 2011 11: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 23:50
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15

All times are GMT -4. The time now is 05:30.