|
[Sponsors] |
Various problems compiling interFoam with CFDSupport's v1706 port of OpenFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 16, 2017, 04:35 |
Various problems compiling interFoam with CFDSupport's v1706 port of OpenFOAM
|
#1 |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Hi everyone,
I am using OpenFoam for window OF4Win 17.06 and I got following error when building my own code. If I use default correctPhi.H file of OpenFoam v4. It shows errors like as shown in figure 1( file error1.png) I think that is due to the change in file correctPhi.H then I use the old version of correctPhi.H (OpenFoam v 2.3) and rebuild my code. It shows error like in fig 2 (file error2.png) The main error is due to the unqualified-id before { token. I do not know clearly on this error. Could some one please help me to solve it. Thank you very much [Moderator note: Some of the posts below were moved from the thread How to compile Foam code using blueCFD - while several other posts were moved into this thread, given they are all regarding the same topic.] Last edited by wyldckat; December 31, 2017 at 15:40. Reason: see "Moderator note:" |
|
June 18, 2017, 23:38 |
|
#2 | |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Quote:
I have installed and run tutorial CFD case, it run well following the tutorial setup. However, when I compile my own code, it showed error like this: expected unqualified-id before '{' token. I searched some guide on this error, however, it is not good to deal with this problem. Could you help me on this problem The error shows like this Last edited by wyldckat; December 31, 2017 at 15:18. Reason: merged posts 1 minute apart |
||
June 19, 2017, 01:12 |
|
#3 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
The error is in correctPhi.H. You have to analyze it.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
June 19, 2017, 07:33 |
|
#4 |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Could you please guide me in more detail.
I just copy and build again interFoam solver from default of OpenFoam v-4. The CorrectPhi.H file is as in the attached file. |
|
August 21, 2017, 03:20 |
correctPhi interFoam
|
#5 |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Hi everyone,
It would be appreciate if someone could help me on the following error during compilation of interFoam based on OpenFoam v17.06 Thanks --- [Moderator note: Answer for this problem was given here: Error about correctPhi during compilation - post #4] Last edited by wyldckat; December 31, 2017 at 15:27. Reason: see "Moderator note:" |
|
October 11, 2017, 04:47 |
error in compilation openfoam based on OpenFOAM v17.06 for windows
|
#6 |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Dear Foamer,
I am using OpenFOAM 17.06 Windows version for my CFD. I have errors during compilation as follows: undefined reference to "Foam::xxxxx" Even this code can compile well based on OpenFOAM-dev for Ubuntu. I understand there are different between Linux and Windows version in dynamics linking library but it is difficult for me to correct the error. It would be appreciated if someone could help me to correct it. Thanks |
|
December 31, 2017, 15:51 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@ndtrong: I've moved several posts that you have about this topic into this single thread, so that it's easier to help you with this problem. Even though you have solved several of the intermediate problems, there is one critical flaw in how you are trying to do the development of your custom solver. If I understood correctly what you are trying to do, then what you need to do is as follows:
If you do not do it like this, you will get all of those errors. This is because OpenFOAM has changed considerably between versions, which makes it not very practical to use a solver from an older version of OpenFOAM directly on a more recent version of OpenFOAM. The latest error message that you have above is a sign of this. The file "Make/options" in the source code provided by CFDSupport, has a fix for that exact problem. Best regards, Bruno
__________________
|
|
January 8, 2018, 18:37 |
|
#8 | |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Quote:
Thank you very much for your useful suggestions |
||
July 20, 2018, 03:09 |
|
#9 | |
Member
Join Date: May 2016
Posts: 39
Rep Power: 10 |
Quote:
https://stackoverflow.com/questions/...clude-filename So what works for me is to change in the interFoam.C the line #include "CorrectPhi.H" to #include <CorrectPhi.H> Then it compiles it without errors. Hope it helps |
||
April 10, 2020, 12:56 |
|
#10 |
New Member
Depei Song
Join Date: Mar 2020
Posts: 1
Rep Power: 0 |
Hi, everyone
I have the same issue on WSL, that the code is exactly the same as original interFoam but something went wrong with correctPhi.H. I noticed that in interFoam.C there are two headers, one is "CorrectPhi.H" and another "correctPhi.H", it seems that compiler has mix these two things up. Change #include "CorrectPhi.H" to #include <CorrectPhi.H> would help but I am realy confused why is it. Another solution is to rename correctPhi.H, so that this header is unambiguous to the compiler. Have no idea if this only happen on windows based platform, if anyone knows more about this, please let me know, I will be appreciated. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Some problems in naca 0012 V&V case of NASA TMR and DPW using OpenFOAM | chengdi | OpenFOAM Running, Solving & CFD | 7 | October 5, 2019 14:20 |
interface smearing. InterFoam, OpenFOAM 2.3.0 and higher | vagnerserge | OpenFOAM Running, Solving & CFD | 4 | February 4, 2019 08:56 |
OpenFOAM freelancer required to port case from interFoam to compressibleInterFoam | SFr | CFD Freelancers | 3 | December 8, 2017 00:34 |
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology | wyldckat | OpenFOAM | 17 | November 10, 2017 16:54 |
OpenFOAM 4.0 Released | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 2 | October 6, 2017 06:40 |