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

Error about correctPhi during compilation

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

Like Tree4Likes
  • 4 Post By Genji

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2016, 02:11
Default Error about correctPhi during compilation
  #1
New Member
 
Federica
Join Date: Oct 2015
Posts: 13
Rep Power: 7
fkika is on a distinguished road
Hi everybody,

I'm trying to compile a new solver, but during the compilation I have this error:

correctPhi.H:2:1: error: expected constructor, destructor, or type conversion before ( token
(
^
In file included from correctPhi.H:11:0,
from myInterPhaseChangeFoam.C:41:
/opt/OpenFOAM/OpenFOAM-3.0.0/src/finiteVolume/lnInclude/continuityErrs.H:32:1: error: expected unqualified-id before { token
{
^

What is wrong with my solver?

The correctPhi.H file is this:

CorrectPhi
(
U,
phi,
p_rgh,
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1),
geometricZeroField(),
pimple
);

#include "continuityErrs.H"

I am using OpenFoam 3.0.0

Thank you!
fkika is offline   Reply With Quote

Old   January 26, 2017, 15:16
Default
  #2
Member
 
Linyan X
Join Date: Dec 2015
Posts: 42
Rep Power: 7
linyanx is on a distinguished road
Hi my friend,

Were you create your solver based on 'interFoam' solver? Is there anything updated for this system's complaint? I am also facing this problem.

Regards,
Linyan
linyanx is offline   Reply With Quote

Old   June 16, 2017, 07:27
Default
  #3
Senior Member
 
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 113
Rep Power: 8
ndtrong is on a distinguished road
Quote:
Originally Posted by fkika View Post
Hi everybody,

I'm trying to compile a new solver, but during the compilation I have this error:

correctPhi.H:2:1: error: expected constructor, destructor, or type conversion before ( token
(
^
In file included from correctPhi.H:11:0,
from myInterPhaseChangeFoam.C:41:
/opt/OpenFOAM/OpenFOAM-3.0.0/src/finiteVolume/lnInclude/continuityErrs.H:32:1: error: expected unqualified-id before { token
{
^

What is wrong with my solver?

The correctPhi.H file is this:

CorrectPhi
(
U,
phi,
p_rgh,
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1),
geometricZeroField(),
pimple
);

#include "continuityErrs.H"

I am using OpenFoam 3.0.0

Thank you!
Dear Federica

Have you solved your problem, could you please share with me the way to overcome it?

Thanks in advance
ndtrong is offline   Reply With Quote

Old   November 1, 2017, 19:55
Default
  #4
New Member
 
Join Date: Sep 2017
Posts: 7
Rep Power: 5
Genji is on a distinguished road
Hi
I faced the same error while trying to build a custom interFoam solver. What solved it was being more specific about the include CorrectPhi.H (Capital C) . So, at the includes before main I changed
#include "CorrectPhi.H" with
#include "cfdTools/general/CorrectPhi/CorrectPhi.H", and added

-I$(LIB_SRC)/finiteVolume \
to my options file.

We are not using the same version of OpenFOAM but I hope this helps.

Last edited by Genji; November 2, 2017 at 12:04.
Genji is offline   Reply With Quote

Old   November 27, 2017, 16:53
Default
  #5
Senior Member
 
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 113
Rep Power: 8
ndtrong is on a distinguished road
Quote:
Originally Posted by Genji View Post
Hi
I faced the same error while trying to build a custom interFoam solver. What solved it was being more specific about the include CorrectPhi.H (Capital C) . So, at the includes before main I changed
#include "CorrectPhi.H" with
#include "cfdTools/general/CorrectPhi/CorrectPhi.H", and added

-I$(LIB_SRC)/finiteVolume \
to my options file.

We are not using the same version of OpenFOAM but I hope this helps.
Hi Genji,

It works well.
Thank you very much for your suggestion.
ndtrong is offline   Reply With Quote

Old   December 2, 2020, 08:03
Default
  #6
New Member
 
Daniele
Join Date: Oct 2016
Posts: 2
Rep Power: 0
danielece04 is on a distinguished road
Quote:
Originally Posted by Genji View Post
Hi
I faced the same error while trying to build a custom interFoam solver. What solved it was being more specific about the include CorrectPhi.H (Capital C) . So, at the includes before main I changed
#include "CorrectPhi.H" with
#include "cfdTools/general/CorrectPhi/CorrectPhi.H", and added

-I$(LIB_SRC)/finiteVolume \
to my options file.

We are not using the same version of OpenFOAM but I hope this helps.
I faced the same error while trying to compile ihFoam on Mac (via Docker). Thanks to your suggestion, I solved modifying the main, in which I changed
#include "CorrectPhi.H" with
#include "path/where/CorrectPhi/is/effectively/located", (in my case /opt/OpenFOAM/OpenFOAM-v2006/src/finiteVolume/lnInclude/CorrectPhi.H)

Thank you very much!
danielece04 is offline   Reply With Quote

Reply

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
Compilation error for OpenFOAM-ext on Ubantu 10.04 32 bit Sargam05 OpenFOAM Installation 13 March 22, 2014 06:21
[swak4Foam] swak4Foam compilation for OF-2.0.0 camoesas OpenFOAM Community Contributions 19 December 10, 2012 14:24
Compilation Error (V 1.7.1; Icc 12.1.0, OpenMPI 1.4.3) floydfan OpenFOAM Installation 7 December 20, 2011 06:56
errors during compilation and installation of OpenFOAM-1.7.x on Ubuntu 10.04 ftec OpenFOAM Installation 7 February 23, 2011 07:07
Compilation Error.... Arnab Siemens 4 September 12, 2004 16:54


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