CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Airfoil2D Error (https://www.cfd-online.com/Forums/openfoam-solving/243675-airfoil2d-error.html)

Bruno H June 30, 2022 03:18

Airfoil2D Error
 
Hi, I'm new to OpenFOAM and I am having trouble with the airfoil2d tutorial.

I installed and run the OpenFOAM on WSL (using Ubuntu, latest version), and I use Paraview on Windows.
When I tried to do the airfoil tutorial, I have a polyMesh file in the constant directory, but if I run blockMesh it gives FOAM FATAL ERROR:
FOAM FATAL ERROR:
"/airFoil2D/system/blockMeshDict"

From int main(int, char**)
in file findBlockMeshDict.H at line 78.

If I try to run simpleFoam it also gives an error.

This tutorial I've seen people use the paraFoam command to open paraview (when it's being run on linux as well) and it recognizes the mesh as done (it creates or recognizes a .foam file). It doesn't work in my case since I use paraview on Windows.

Been reading a lot about it but haven't found a good way to solve the issue.
Any ideas will be appreciated.

Thanks

Yann June 30, 2022 04:02

Hi Bruno,

The easiest way to start is to use the Allrun script (type ./Allrun to run it) to run the case. Then you can have a look at the script and try to reproduce it step by step in order to understand what it does and then adjust it to your own needs.

For the airFoil2D tutorial, there is no need to run blockMesh since the mesh already exists.

As you already know, you cannot use paraFoam since you are running openfoam on WSL from windows. What you can do however, is to create a dummy file with the .foam extension (in your linux terminal, just type something like touch case.foam and it will create a case.foam empty file). Then open this file in paraview, it will load the case with ParaView's native openfoam reader and you will be able to visualize your case.

Cheers,
Yann

Bruno H July 1, 2022 13:13

Thank you for the help Yann!

Had to re-copy the airFoil2D tutorial, but after doing that and going for the ./Allrun command and touch file.foam it worked fine.


All times are GMT -4. The time now is 21:38.