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

error: no match for ‘operator-'

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2012, 14:58
Default error: no match for ‘operator-'
  #1
New Member
 
yudhast
Join Date: Mar 2011
Posts: 12
Rep Power: 15
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 +
(
fvc::average((1-2*alpha1)*p_rgh)*fvc::snGrad(alpha1)
- ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf();


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, 17:27
Default
  #2
Senior Member
 
Adhiraj
Join Date: Sep 2010
Location: Karnataka, India
Posts: 187
Rep Power: 16
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, 01:34
Default
  #3
New Member
 
yudhast
Join Date: Mar 2011
Posts: 12
Rep Power: 15
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.
eg.
fvc::average((1-2*alpha1)*p_rgh)*fvc::snGrad(alpha1)


fvc::interpolation((1-2*alpha1)*p_rgh)*fvc::snGrad(alpha1)


Even the change you have suggested is giving same error.

Regards,
Yudhast
udiitm is offline   Reply With Quote

Reply

Tags
error, no match, operator


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
area does not match neighbour by ... % -- possible face ordering problem St.Pacholak OpenFOAM 11 September 4, 2024 05:28
[ANSYS Meshing] Match Control, is this weird or am I stupid? Moufle ANSYS Meshing & Geometry 2 November 18, 2015 17:00
[ICEM] Forcing surface and curve to match sherifkadry ANSYS Meshing & Geometry 0 August 27, 2010 01:28
gmsh2ToFoam sarajags_89 OpenFOAM 0 November 24, 2009 23:50
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


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