2

I recently started using Ubuntu for learning OpenFoam and I'm currently using this tutorial for learning http://files.the-foam-house5.webnode.es/200000361-e64a0e745a/Chapter2_Plates.pdf

I followed the tutorial up until section 2.3.3 and placed the files in the right directories, when I try type the command blockMesh followed by paraFoam in the terminal, it says it's not found.

bash$ paraFoam
-bash: paraFoam: command not found

It is installed, how come it says it's not found? How to fix this?

Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
user44033
  • 31
  • 1
  • 3
  • 1
    Include the problematic code in your question. Don't just link us to the tutorial. – peacetype Jan 09 '18 at 11:35
  • sorry about that, I fixed it now – user44033 Jan 10 '18 at 04:52
  • The *problematic code* was the stuff you had in the huge useless image. If the program cannot execute, what data you plan to give to it once it works is not really pertinent to the question. – tripleee Jan 10 '18 at 05:43
  • Rather than have us read the tutorial and guess whether you executed each step in it successfully, tell us what you actually did to make sure an executable file named `paraFoam` exists on your system in a directory which is included in your `PATH`. (The chapter you link to doesn't seem to cover installation and set-up at all, anyway. Indeed, the whole guide does not seem to address this.) – tripleee Jan 10 '18 at 05:51
  • I haven't made an executable file and I have no idea what path is. I'm sorry I really am a noob – user44033 Jan 10 '18 at 08:22

2 Answers2

3

Diagnosis:

It mainly depends to the installation method you have used. I highly recommend the official OpenFOAM installation for Ubuntu from openfoam.org as it includes 'paraFoam'. If you follow the instructions correctly you should find the paraFoam executive in /opt/openfoam5/bin/. Maybe the installation folder is diffrent.you can find it by searching your drive (first make sure your database is updated sudo updatedb then look for it locate -i paraFoam)

Then make sure you have added the line:

source /opt/openfoam5/etc/bashrc

at the end of your ~/.bashrc file.

Alternative solution 1:

Alternatively you can open OpenFOAM results using the original ParaVIEW installation (sudo apt-get install paraview). In your project folder run the command foamToVTK. Then make an empty dummy file in you project folder with any arbitrary name and .foam extension (dummy.foam). Then in ParaView open this file and it will automatically loads the results.

Alternative solution 2:

If you also don't have the foamToVTK, another method suggested here is to open the system/ControlDict in ParaVIEW selecting the OpenFOAM option.

Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
0

type the command "touch nameany.foam" inside the folder where you performed the simulation. Then enter the file folder through the directory (other than through the terminal) and open it with paraview.