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

Eclipse for OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2011, 05:27
Default
  #41
New Member
 
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 16
AMahrla is on a distinguished road
Hi Arne,

as I can only guess, what's the real problem, you could try to include the "lnIncludes". We've added some line to the Eclipse-entry in the OpenFOAM-Wiki at the end of chapter 5.2 ...

This should also improve the autocompletion..

Best,

Astrid
AMahrla is offline   Reply With Quote

Old   August 22, 2011, 14:09
Default
  #42
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 15
anfho is on a distinguished road
Dear Foamers,


I just wanted to make sure these combinations of versions will play well together before I will waste time on solving version related issues...


I am using:
-----------
Ubuntu 11.04
OpenFoam 1.7.x
gcc 4.5.2 (checked with "gcc -v")

About gdb:
-----------
The current gdb version installed is:
gdb 7.2 (checked with "gdb -v")
The tutorial suggests not to use gdb 7.x, so should I downgrade to 6.8?
But how to?

About Eclipse
-------------
The current version of Eclipse is 3.7, but I am assuming that should not be an issue. But which one exactly should I download:
-Eclipse IDE for C/C++ developers?
-Eclipse Classic
Will this version of Eclipse Classic already include the CDT?

Adding gfortran to Eclipse:
-------------------------
Another hurdle I will have to take is that I also need gfortran in Eclipse as I am currently coupling F90 subroutines with OpenFoam/fireFoam.
Does anyone know if that is possible and/or knows how to do that (or can provide helpful links)?


Thanks! Best regards,
Andreas
anfho is offline   Reply With Quote

Old   August 24, 2011, 08:15
Default
  #43
Member
 
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16
gascortado is on a distinguished road
Hi,

I followed the tutorial. I just trying to run the cavity case (using icoFoam). I import the case folder and set the application to be /home/santiago/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/icoFoam in eclipse. When I hit run I get this:

/home/santiago/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/icoFoam: error while loading shared libraries: libfiniteVolume.so: cannot open shared object file: No such file or directory

Any idea of what is wrong?

Also, regarding http://www.cfd-online.com/Forums/ope...tml#post261470 I just downloaded eclipse as indicated in the wiki, then I browse to the executable file and run eclipse (if i try to run eclipse from the terminal its says that the program is not installed) however it runs when I double click the executable file.

I have the same problem when trying to use wmake as shown http://www.cfd-online.com/Forums/ope...tml#post260405 . I would like to run eclipse from the terminal if that is going to solve my problems.

I will appreciate any help. THanks
gascortado is offline   Reply With Quote

Old   August 24, 2011, 16:14
Default
  #44
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Santiago,

Check post #12: http://www.cfd-online.com/Forums/ope...tml#post261470

Also, reading the whole thread might lead you to some more details that I don't remember or didn't read about

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 4, 2012, 17:56
Default
  #45
Member
 
Paulo Bufacchi
Join Date: Jun 2010
Posts: 50
Rep Power: 15
Bufacchi is on a distinguished road
Hi Foamers,

I'm running OpenFOAM 2.1.x on OpenSUSE 11.4 64 bits. I compiled OpenFOAM in debug mode.

I downloaded Eclipse IDE for C/C++ Developers (includes Incubating components), for 64 bits. It is version Indigo (3.7) Service Release 1.

Thanks to the Wiki http://openfoamwiki.net/index.php/Ho...M_with_Eclipse installation and configuration ran smoothly. I also read the thread Eclipse for OpenFOAM.

I imported the icoFoam solver and cavity case as projects to my workspace. Prior to that I ran blockMesh.

When I run the case, it goes well, without errors. But when I debug it, I have the following error:

Debug Perspective:

Console Window:

Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C "debuginfo(build-id)=b1d398a5cb1609e7ac1c51a26588e87fc20f753c"
Missing separate debuginfo for /lib64/libdl.so.2
Try: zypper install -C "debuginfo(build-id)=9a8d0811525ec7a152dca9e109292adca81857c1"
Missing separate debuginfo for /usr/lib64/libstdc++.so.6
Try: zypper install -C "debuginfo(build-id)=e87ebb28b8b5aa032cf2925387aaa13f2cb93c90"
Missing separate debuginfo for /lib64/libm.so.6
Try: zypper install -C "debuginfo(build-id)=5ac64cd348d3581ec2a223ee70f42e73cad029cc"
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: zypper install -C "debuginfo(build-id)=e6eb8011838a065946e5808e036550844548379f"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C "debuginfo(build-id)=70bab20280816eb26a0553f13382ee75d53179f5"
Missing separate debuginfo for /lib64/libpthread.so.0
Try: zypper install -C "debuginfo(build-id)=e23cbc772e670af00bea9874f925e2e61afda713"
[Thread debugging using libthread_db enabled]
Missing separate debuginfo for /lib64/libz.so.1
Try: zypper install -C "debuginfo(build-id)=61e4e9a46287c10135232e8a269575a1ceda7638"
Missing separate debuginfo for /lib64/libnsl.so.1
Try: zypper install -C "debuginfo(build-id)=2d5906a5f42a9ad6df5fc2f91ab5bca478ce4959"
Missing separate debuginfo for /lib64/libutil.so.1
Try: zypper install -C "debuginfo(build-id)=5751266e22e9f2cbca821b110e87ecd37e70e7b4"


Debug Window:

cavity [C/C++ Application]
/home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15362] [cores: 4]
Thread [1] 15362 [core: 4] (Suspended : Breakpoint)
main() at setRootCase.H:5 0x4409ed
gdb
cavity [C/C++ Application]
/home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15408] [cores: 7]
Thread [1] 15408 [core: 7] (Suspended : Breakpoint)
main() at setRootCase.H:5 0x4409ed
gdb
cavity [C/C++ Application]
/home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15447] [cores: 0]
Thread [1] 15447 [core: 0] (Suspended : Breakpoint)
main() at setRootCase.H:5 0x4409ed
gdb


It is important to say that I'm not compiling an application. I'm running the case and I started Eclipse from the icon in its folder and not from a terminal.

Although I have included all paths, it seems that the icoFoam.C file can't find many other files and variables.

How can I fix the error?


Thanks,

Paulo
Bufacchi is offline   Reply With Quote

Old   February 4, 2012, 19:13
Default
  #46
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Bufacchi View Post
Hi Foamers,

I'm running OpenFOAM 2.1.x on OpenSUSE 11.4 64 bits. I compiled OpenFOAM in debug mode.

I downloaded Eclipse IDE for C/C++ Developers (includes Incubating components), for 64 bits. It is version Indigo (3.7) Service Release 1.

Thanks to the Wiki http://openfoamwiki.net/index.php/Ho...M_with_Eclipse installation and configuration ran smoothly. I also read the thread Eclipse for OpenFOAM.

I imported the icoFoam solver and cavity case as projects to my workspace. Prior to that I ran blockMesh.

When I run the case, it goes well, without errors. But when I debug it, I have the following error:

Debug Perspective:

Console Window:

Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C "debuginfo(build-id)=b1d398a5cb1609e7ac1c51a26588e87fc20f753c"
Missing separate debuginfo for /lib64/libdl.so.2
Try: zypper install -C "debuginfo(build-id)=9a8d0811525ec7a152dca9e109292adca81857c1"
Missing separate debuginfo for /usr/lib64/libstdc++.so.6
Try: zypper install -C "debuginfo(build-id)=e87ebb28b8b5aa032cf2925387aaa13f2cb93c90"
Missing separate debuginfo for /lib64/libm.so.6
Try: zypper install -C "debuginfo(build-id)=5ac64cd348d3581ec2a223ee70f42e73cad029cc"
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: zypper install -C "debuginfo(build-id)=e6eb8011838a065946e5808e036550844548379f"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C "debuginfo(build-id)=70bab20280816eb26a0553f13382ee75d53179f5"
Missing separate debuginfo for /lib64/libpthread.so.0
Try: zypper install -C "debuginfo(build-id)=e23cbc772e670af00bea9874f925e2e61afda713"
[Thread debugging using libthread_db enabled]
Missing separate debuginfo for /lib64/libz.so.1
Try: zypper install -C "debuginfo(build-id)=61e4e9a46287c10135232e8a269575a1ceda7638"
Missing separate debuginfo for /lib64/libnsl.so.1
Try: zypper install -C "debuginfo(build-id)=2d5906a5f42a9ad6df5fc2f91ab5bca478ce4959"
Missing separate debuginfo for /lib64/libutil.so.1
Try: zypper install -C "debuginfo(build-id)=5751266e22e9f2cbca821b110e87ecd37e70e7b4"


Debug Window:

cavity [C/C++ Application]
/home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15362] [cores: 4]
Thread [1] 15362 [core: 4] (Suspended : Breakpoint)
main() at setRootCase.H:5 0x4409ed
gdb
cavity [C/C++ Application]
/home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15408] [cores: 7]
Thread [1] 15408 [core: 7] (Suspended : Breakpoint)
main() at setRootCase.H:5 0x4409ed
gdb
cavity [C/C++ Application]
/home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15447] [cores: 0]
Thread [1] 15447 [core: 0] (Suspended : Breakpoint)
main() at setRootCase.H:5 0x4409ed
gdb


It is important to say that I'm not compiling an application. I'm running the case and I started Eclipse from the icon in its folder and not from a terminal.

Although I have included all paths, it seems that the icoFoam.C file can't find many other files and variables.

How can I fix the error?


Thanks,

Paulo
Disclaimer: I user neither Eclipse nor OpenSUSI

If you google around you'll find that the libraries (libm.so ,libpthread.so ..) are not part of OF. So this is a general problem. It seems that the developers of Eclipse knew that Suse-Users need a bit of handholding so the told them how to fix thsi. Maybe they should have been a bit more verbose and write something like:

Try the command "zypper install -C .... " to fix this
gschaider is offline   Reply With Quote

Old   February 7, 2012, 15:08
Default
  #47
Member
 
Paulo Bufacchi
Join Date: Jun 2010
Posts: 50
Rep Power: 15
Bufacchi is on a distinguished road
Hi Bernhard,

Thanks for your note.

I did try the zypper command as super user, but I got an error message, saying about a repository. The problem is that openSUSE-12.1-Debug, openSUSE-12.1-Update-Debug and openSUSE-12.1-Source repositories were not enabled. After changing that, the zypper command worked well.

Thanks,

Paulo
wyldckat likes this.
Bufacchi is offline   Reply With Quote

Old   February 11, 2012, 11:14
Default Problems with Eclpse
  #48
Member
 
Join Date: Feb 2012
Posts: 35
Rep Power: 14
Matt_B is on a distinguished road
Hi everybody,
I'm brand new on this forum and quite new in learning OpenFoam. I'm very interested in using Eclipse, because I found out that is possible to debug the very heavy C++ code and it could be a very powerful and useful thing to understand how OpenFoam really works.I read all this thread and I tried to follow all the steps of the Eclipse user guide one by one but I didn't succeded untill now.
First of all I tried to build simpleFoam solver by means of "wmake" but it didn't work; after that I swapped "wmake" with $HOME/directory/foamExec wmake, as one user suggested, and finally it started to build the project. The problem is that after a while, build operation quits with 6 errors, all concerning the LIBRARY listed in the "Make/Option" file (-lincompressible... for example). Eclipse goes in a wrong directory to find shared libraries. My question is: why compiler doesn't use correct directory? Could I set somehow? Has it something to do with "bashrc" and the problem that Eclipse doesn't read it?
Thank you in advance for the answers.

Matteo
Matt_B is offline   Reply With Quote

Old   February 11, 2012, 11:41
Default
  #49
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Matteo and welcome to the forum!

OK, let's step back a few steps. Apparently the first problem is that you are not able to compile OpenFOAM in debug mode. So:
  1. Which OpenFOAM version and which Linux distribution and version are you using?
  2. What instructions did you follow to build OpenFOAM?
If we know these, it'll be a loooot easier to help you!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 11, 2012, 18:07
Default
  #50
Member
 
Join Date: Feb 2012
Posts: 35
Rep Power: 14
Matt_B is on a distinguished road
Hi Bruno,
thank you for the very quick reply

Quote:
OK, let's step back a few steps. Apparently the first problem is that you are not able to compile OpenFOAM in debug mode
You are definitely right: I haven't ever compiled OpenFoam in debug mode so far, that's why I'm interested in managing Eclipse in a proper way. And by the way, if it could help, I never used wmake so far too in Terminal shell, but I don't thing it would give any problem.

Quote:
  1. Which OpenFOAM version and which Linux distribution and version are you using?
I'm using OpenFoam 2.1.0 and UBUNTU 11.10.

Quote:
2. What instructions did you follow to build OpenFOAM?
I followed step by step the instructions given on OpenFoam official site and I never have had any problems in running solvers and test cases by terminal window. I can run a test case until postprocessing by means of Paraview.
When I try to build a solver or to run a test case in Eclipse, I receive error message because the shared libraries specified in the Make/Options file.
Here below the error message i receive in Eclipse:
Code:
**** Build of configuration Debug for project simpleFoam ****

/home/matteo/OpenFOAM/OpenFOAM-1.7.1/bin/foamExec wmake all 
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels     -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels/incompressible/RAS/RASModel     -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/transportModels     -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/transportModels/incompressible/singlePhaseTransportModel     -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude   -fPIC Make/linuxGccDPOpt/simpleFoam.o -L/home/matteo/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt \
         -lincompressibleTurbulenceModel     -lincompressibleRASModels     -lincompressibleTransportModels     -lfiniteVolume -lOpenFOAM -liberty -ldl   -lm -o /home/matteo/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/simpleFoam
/usr/bin/ld: cannot find -lincompressibleTurbulenceModel
/usr/bin/ld: cannot find -lincompressibleRASModels
/usr/bin/ld: cannot find -lincompressibleTransportModels
/usr/bin/ld: cannot find -lfiniteVolume
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: *** [/home/matteo/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/simpleFoam] Error 1
I know that the correct directory for libraries shall be the following:
/opt/openfoam210/platforms/linuxGccDPOpt/lib.
I tried to let artificially recognize library by Eclipse, substituting -l with -L, for example:
-lincompressibleTurbulenceModel with:
-L$/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleTransportModels
It works but I don't fix the problem completely.
I hope to have helped you to help me
Matt_B is offline   Reply With Quote

Old   February 12, 2012, 08:50
Default
  #51
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Matteo,

OK, you've got more than one OpenFOAM installation. In this case, first read the following blog post of mine: Advanced tips for working with the OpenFOAM shell environment

Then build OpenFOAM 2.1.0 as instructed on the website: http://www.openfoam.org/download/source.php
Also to take into account, if you want to build things faster and keep a good log on it:
Code:
export WM_NCOMPPROCS=4
./Allwmake > make.log 2>&1
This will build with 4 cores and keep a full log in the file "make.log". When complete, search for the expression "Error " (without quotes and with the space after the word "Error"); if only one line appears, then it's all OK.

Then you can try and build the Debug version. I think that the respective instructions are on the wiki.

Best regards,
Bruno
maysmech likes this.
__________________
wyldckat is offline   Reply With Quote

Old   February 12, 2012, 11:59
Default
  #52
Member
 
Join Date: Feb 2012
Posts: 35
Rep Power: 14
Matt_B is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Matteo,

OK, you've got more than one OpenFOAM installation. In this case, first read the following blog post of mine: Advanced tips for working with the OpenFOAM shell environment

Then build OpenFOAM 2.1.0 as instructed on the website: http://www.openfoam.org/download/source.php
Also to take into account, if you want to build things faster and keep a good log on it:
Code:
export WM_NCOMPPROCS=4
./Allwmake > make.log 2>&1
This will build with 4 cores and keep a full log in the file "make.log". When complete, search for the expression "Error " (without quotes and with the space after the word "Error"); if only one line appears, then it's all OK.

Then you can try and build the Debug version. I think that the respective instructions are on the wiki.

Best regards,
Bruno
Thanks again Bruno, I understood that having multiple OpenFoam installations could be the reason of confusion. I installed first the 1.7.0 release and after a while straight to the 2.1.0, following this steps http://www.openfoam.org/download/ubuntu.php.
Neverthless your help with the new install procedure you pointed out to me, I can't still succeed because it seems to have problems with the ./Allwmake command: it reports a lot of errors ("Access to folder denied" and "No such directory" for example). I'm thinking it could be better to uninstall both OpenFoam versions before to begin building again new version, but I don't know how to make it. What do you think about?
Matt_B is offline   Reply With Quote

Old   February 12, 2012, 12:17
Default
  #53
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Matteo,

If you want to build your own builds of OpenFOAM for debugging, then follow these instructions: http://www.openfoam.org/download/source.php - then you can also try building the Debug version.

The instructions for Ubuntu deb packages is for simply using OpenFOAM, and perhaps building your own solvers and utilities. But if you want to do "full-on debugging", then you should do your own builds! You can still have the ".deb" version installed and use it just in case your own builds fail

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 12, 2012, 12:55
Default
  #54
Member
 
Join Date: Feb 2012
Posts: 35
Rep Power: 14
Matt_B is on a distinguished road
I'm sorry to bother you again, but as I already told you, I tried to build OpenFoam with the Source installation pack but all I got is errors. If I type "foamInstallationTest" I got a FATAL ERROR.
I'm still a newbie with Linux, because I installed it just after knowing that OpenFoam could run only on this O.S. I even tried to build just one solver from Eclipse Environment, pointing to new Openfoam 2.1.0 Application/solvers/incompressible/simpleFoam folder but still I got errors with libraries location....it seems I didn't get any step further.... :-(
Matt_B is offline   Reply With Quote

Old   February 12, 2012, 13:22
Default
  #55
Member
 
Paulo Bufacchi
Join Date: Jun 2010
Posts: 50
Rep Power: 15
Bufacchi is on a distinguished road
Quote:
Originally Posted by Matt_B View Post
I'm sorry to bother you again, but as I already told you, I tried to build OpenFoam with the Source installation pack but all I got is errors. If I type "foamInstallationTest" I got a FATAL ERROR.
I'm still a newbie with Linux, because I installed it just after knowing that OpenFoam could run only on this O.S. I even tried to build just one solver from Eclipse Environment, pointing to new Openfoam 2.1.0 Application/solvers/incompressible/simpleFoam folder but still I got errors with libraries location....it seems I didn't get any step further.... :-(

Hi Matteo and Bruno,

Let me try a different point of view here.

I have many different OpenFOAM versions on my computer, and I can assure you that they don't interfere with each other. There will always be a single version in use, and that version is the one in your $HOME/.bashrc file or similar (depends on the shell).

Second, if you follow strictly what is on the download page, (almost) nothing can go wrong. I say that because I already did a lot of installs (over 20) using Ubuntu and Suse.

I would like to sugest Matteo to begin from scratch. If you are not sure about the many changes you made in your OS, reinstall it.

If there is something well written is the installation procedure.

I hope this helps and encourages you in installing OpenFOAM.

Paulo
Bufacchi is offline   Reply With Quote

Old   March 21, 2012, 05:07
Default
  #56
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Hej,

I have a question about the "Path & Symbols" includes. Which ones should I definitely include?

1. The ones that are also listed in the files and options file?
2. Additional ones?

At the moment I have the solver buoyantBoussinesqSimpleFoam loaded with includes to the following


It resolved the whole "unresolved" sources part in the main file. However, I am still getting error messages on "wrong syntax" as one can see on the open file next to it, which is pEqn.H.

In the main file I don't have any squiggly lines, but in the pEqn.H file I do. How do I get rid of these?

In the createFields.H the squiggly lines are only on the Info lines
Code:
Info<< "Reading field p_rgh\n" << endl;
and in the UEqn.H only on the second part
Code:
    // Solve the momentum equation

    tmp<fvVectorMatrix> UEqn
    (
        fvm::div(phi, U)
      + turbulence->divDevReff(U)
    );

    UEqn().relax();

    if (simple.momentumPredictor())
    {
        solve
        (
            UEqn()
            ==
            fvc::reconstruct
            (
                (
                  - ghf*fvc::snGrad(rhok)
                  - fvc::snGrad(p_rgh)
                )*mesh.magSf()
            )
        );
    }
And it states syntax error.
__________________
~roman
romant is offline   Reply With Quote

Old   March 22, 2012, 06:16
Default
  #57
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
Hi
I had that "wrong syntax" message too in the included files but every thing was OK and the solvers compiled truly.
barati likes this.
ata is offline   Reply With Quote

Old   March 22, 2012, 06:53
Default
  #58
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Yes, I have seen this, that they compile, it is annoying, since I can't see if I make a mistake.
__________________
~roman
romant is offline   Reply With Quote

Old   April 11, 2012, 05:28
Default
  #59
Member
 
Join Date: Feb 2012
Posts: 35
Rep Power: 14
Matt_B is on a distinguished road
Hi again everybody!
Still here, with the same problem, after a lot of steps further by the way...
As I posted before, I had troubles with debugging a test case: I didn't succeed before and I still don't succeed now.
What I did untill now is compiling OpenFoam version 2.1.0 by means of Source code using .Allwmake utility and in both Optimization and Debug mode. I'm now able to run a test case with gdc by a terminal shell and to build a solver in Eclipse environment exploiting the foamExec script, because without it, the simple wmake doesn't work at all.
When I tried to run a test case, I got the message that it couldn't find shared libraries and, after a while, I bypassed this problem manually defining in the ld.so.config file the directories leading to OpenFoam's libraries and it worked. Now, when I run or debug a test case I don't receive the shared libraries error anymore, but a new error (Fatal error) regarding the fact that it cannot find controlDict. I suppose it can't find the reference to this header but I don't know how to get do it.
Maybe the answer is in the Bruno's hint below but I don't understand how to implement this. Could anyone help me?

Quote:
Originally Posted by wyldckat View Post

  • To launch wmake, use:
    Code:
    $HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec wmake
    Update OpenFOAM version/path accordingly to your installation.
    No problem with that: It worked.
  • Likewise for launching the built solver; for example, to run icoFoam:
    Code:
    $HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec icoFoam
    Not working.
    Or even for extended completeness:
    Code:
    $HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec icoFoam -case $HOME/OpenFOAM/$USER-1.6/mytestcase
    This way it will run on the case "$HOME/OpenFOAM/$USER-1.6/mytestcase".
    Not working.

    Best regards,
    Bruno
I don't understand WHERE I should put the foamExec directory for the binary applcation. I understood (actually it's not explicit above) that I have to go to "Run configurations" (or "Debug configurations") and in the same field where I should put the directory to the binary solver, I have to substitute it with
Code:
$HOME/OpenFOAM/OpenFOAM-2.1.0/bin/foamExec icoFoam
it doesn't work because it is not recognized as a valid executable. After I even tried to put instead the binary solver directory, executing it with the foamExec script in this fashion
Code:
$HOME/Opt/OpenFOAM/OpenFOAM-2.1.0/...../foamExec icoFoam
but even in this case
it is not recognized as a valid executable.
Where am I mistaken? As a last attempt, I
even tried to build the test case switching to Debug and substituting
Code:
$HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec wmake
with
Code:
$HOME/OpenFOAM/OpenFOAM-2.1.0/bin/foamExec icoFoam
but I received a lot of other errors

Thank you in advance.

Matteo
Matt_B is offline   Reply With Quote

Old   April 11, 2012, 17:19
Default
  #60
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Matteo,

Sorry about not being very clear on that old post. The idea I had back then was to explain how to run things on the command line.

So, let me explain further:
  • If the application icoFoam is not running because Eclipse is unable to tell it where everything is, then we need to first call an application that knows where things are, namely foamExec.
  • For example, icoFoam can be called from almost anywhere with the following command:
    Code:
    icoFoam -case $HOME/OpenFOAM/$USER-1.6/mytestcase
    This means that the application is icoFoam and "-case $HOME/OpenFOAM/$USER-1.6/mytestcase" are arguments. These arguments are meant to be placed on the second tab that says "(x)= Arguments":

  • Now when I say that foamExec has to be called first, this becomes the application and icoFoam becomes an argument.

Anyway, the most clean way of doing this is to simply launch eclipse from the command line, straight from a working shell environment where the debug version of icoFoam can work without any problems

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 20:48.