|
[Sponsors] |
June 1, 2022, 07:06 |
pimpleFoam compilation error
|
#1 |
New Member
Marcin
Join Date: Jun 2022
Posts: 2
Rep Power: 0 |
Dear All,
I'm using OF2112 installed on WSL2 version of Ubuntu. I want to create a custom solver based on pimpleFoam, but I have a problem with compilation. To test it, I've copied pimpleFoam directory to my local dir ($WM_PROJECT_USER_DIR/applications/solvers/incompressible), changed everything relevant (names, Make/files), but I did not make any changes in the code. And when I'm trying to wmake the following errors appear: Code:
In file included from testPimpleFoam.C:82: CorrectPhi.H:2:1: error: expected constructor, destructor, or type conversion before ‘(’ token 2 | ( | ^ In file included from CorrectPhi.H:11, from testPimpleFoam.C:82: /usr/lib/openfoam/openfoam2112/src/finiteVolume/lnInclude/continuityErrs.H:34:1: error: expected unqualified-id before {’ token 34 | { | ^ In file included from testPimpleFoam.C:158: correctPhi.H: In function ‘int main(int, char**)’: correctPhi.H:1:1: error: ‘CorrectPhi’ was not declared in this scope; did you mean ‘correctPhi’? 1 | CorrectPhi | ^~~~~~~~~~ | correctPhi make: *** [/usr/lib/openfoam/openfoam2112/wmake/rules/General/transform:35: Make/linux64GccDPInt32Opt/testPimpleFoam.o] Error 1 From my investigation OF has a problem with similar names of two files: CorrectPhi.H (with capital "C", from $FOAM_SRC/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.H) and correctPhi.H (lowercase "c", from pimpleFoam local dir). Both files are included in pimpleFoam (in my version CorrectPhi.H in line 82 and correctPhi.H in line 158). I found two fixes of the issue:
But I want to know the reason of this error. It looks strange for me. |
|
September 1, 2022, 12:12 |
|
#2 |
New Member
Join Date: Sep 2020
Posts: 2
Rep Power: 0 |
I have the same issue with OpenFOAM v9 (Foundation) and by using docker on my MacBook. I use the same solution as you do and I still don't have an explanation... Hope someone will help to understand that
|
|
February 10, 2023, 10:37 |
|
#3 |
New Member
Jones
Join Date: Sep 2019
Posts: 1
Rep Power: 0 |
Late to the party but I came across this thread while running into the same issue (v2206, wsl2, ubuntu, win11)
In my case, I had copied the solver files to a working directory that was shared with Windows (somewhere in /mnt/) so Windows' lack of case-sensitivity in file naming was causing a conflict between correctPhi and CorrectPhi at some point either when copying the files or compiling. Copying to and working from a directory on the wsl machine that wasn't shared with Windows fixed the issue for me. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure outlet boundary condition | rolando | OpenFOAM Running, Solving & CFD | 62 | September 18, 2017 07:45 |
DPM udf error | haghshenasfard | FLUENT | 0 | April 13, 2016 07:35 |
[OpenFOAM] Native ParaView Reader Bugs | tj22 | ParaView | 270 | January 4, 2016 12:39 |
Compiling problems with hello worldC | fw407 | OpenFOAM Installation | 21 | January 6, 2008 18:38 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |