CfdOf with latest v2106 v2112 OpenFOAM.com versions

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Post Reply
Oli772
Posts: 26
Joined: Wed Apr 27, 2022 2:35 pm

Re: Question to convergence and residuals / v2112

Post by Oli772 »

Hello,
first thank you all for your work at making CfdOf a performant tool.
I can see from this post that it is possible to make it running with OpenFoam v2112.

I am using OF v2112 on ubuntu 20.04 LTS under Windows WSL2 and I am also using FreeCAD 0.19.
Unfortunately for me, after many tentatives I am still unable to make CfdOf working.

Here is the kind of error I get:

Code: Select all

0.0: Preparing meshing ...
0.1: Exporting mesh refinement data ...
0.2: Exporting the part surfaces ...
1.3: Mesh case written successfully
6.6: Please edit the case input files externally at: \\wsl$\Ubuntu-20.04\home\om840\OpenFOAM\om840-v2112\run\cfMesh\meshCase 
0.0: Running cfMesh ...
0.1: Mesher started
0.4: Meshing exited with error
and the error FreeCAD reports is:

Code: Select all

15:55:12  Part to mesh:
  Name: Cut005, Label: Cut005, ShapeType: Compound
15:55:12    CharacteristicLengthMax: 0.5
15:55:12  Exporting mesh refinement data ...
15:55:12  Matching boundary patches
15:55:12  Matching mesh refinement regions
15:55:12  Exporting the part surfaces ...
15:55:13  Triangulating part Cut005, patch patch_0_0 ... writing to file
15:55:13  Populating mesh dictionaries in folder \\wsl$\Ubuntu-20.04\home\om840\OpenFOAM\om840-v2112\run\cfMesh\meshCase
15:55:14  Successfully wrote meshCase to folder \\wsl$\Ubuntu-20.04\home\om840\OpenFOAM\om840-v2112\run\cfMesh\meshCase
15:55:14  Wrote mesh case to \\wsl$\Ubuntu-20.04\home\om840\OpenFOAM\om840-v2112\run\cfMesh\meshCase
15:58:21  Executing: bash -c cd "/mnt/\\wsl$\ubuntu-20.0/home/om840/OpenFOAM/om840-v2112/run/cfMesh/meshCase" && ./Allmesh
15:58:21  Raw command:  ['C:/Program Files/FreeCAD 0.19/bin\\python.exe', '-u', 'C:\\Users\\HP Z840 V4 PRO\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'bash', '-c', 'cd "/mnt/\\\\wsl$\\ubuntu-20.0/home/om840/OpenFOAM/om840-v2112/run/cfMesh/meshCase" && ./Allmesh']
15:58:21  /bin/bash: line 0: cd: /mnt/\wsl$\ubuntu-20.0/home/om840/OpenFOAM/om840-v2112/run/cfMesh/meshCase: No such file or directory
OF v2112 in normaly installed under \\wsl$\Ubuntu-20.04\usr\lib\openfoam\openfoam2112.
There I had to add the modules folder, which was not present with the full OF installation, in which I put the cfmesh-cfdof folder copied from https://sourceforge.net/projects/cfmesh-cfdof/
I tried to compile using the ./Allwmake command. That took some time end ended with

Code: Select all

    -lmeshTools -lsurfMesh -lmeshLibrary -lOpenFOAM -ldl  \
     -lm -o /home/om840/OpenFOAM/om840-v2112/platforms/linux64GccDPInt32Opt/bin/surfaceToFMS
make[1]: Leaving directory '/usr/lib/openfoam/openfoam2112/modules/cfmesh-cfdof/utilities/surfaceToFMS'
which I do not know if that makes a correct compilation or not...

please may I have some advice about installing CfdOf with OF v2112 ?

Thank you

Olivier
KAKM
Posts: 109
Joined: Tue May 04, 2021 12:17 am

Re: Question to convergence and residuals

Post by KAKM »

I think that your OpenFOAM/CfdOF installation is probably okay. Looking at your error messages, two lines stand out:

Code: Select all

Wrote mesh case to \\wsl$\Ubuntu-20.04\home\om840\OpenFOAM\om840-v2112\run\cfMesh\meshCase
and

Code: Select all

/bin/bash: line 0: cd: /mnt/\wsl$\ubuntu-20.0/home/om840/OpenFOAM/om840-v2112/run/cfMesh/meshCase: No such file or directory
It appears that the location your meshCase was written in and the location cfMesh is looking for your meshCase are not the same location. You should probably check to make sure that cfMesh was installed to the correct location and that the CfdOF preferences menu has the correct folder for your OpenFOAM location.
Oli772
Posts: 26
Joined: Wed Apr 27, 2022 2:35 pm

CfdOf with latest v2106 v2112 OpenFOAM.com versions

Post by Oli772 »

Dear CfdOpenFoamers,

I am using OpenFOAM v2112 on ubuntu 20.04 LTS under Windows WSL2 and FreeCAD 0.19.
Unfortunately for me, after many tentatives I am still unable to make CfdOf working.

OpenFOAM install directory is set to: //wsl$/Ubuntu-20.04/usr/lib/openfoam

But checking the dependencies gives the following:

Code: Select all

Could not find OpenFOAM installation: The directory \\wsl$\Ubuntu-20.04\usr\lib\openfoam is not a recognised OpenFOAM installation
gmsh executable: C:/Program Files/FreeCAD 0.19/bin/gmsh.exe
gmsh could not be run from OpenFOAM environment
If I try to mesh then I get the following:

Code: Select all

0.0: Preparing meshing ...
0.1: Exporting mesh refinement data ...
0.2: Exporting the part surfaces ...
1.3: Mesh case written successfully
0.0: Running cfMesh ...
0.1: Mesher started
0.6: Meshing exited with error
and the error FreeCAD reports is:

Code: Select all

06:50:20  Part to mesh:
  Name: Cut005, Label: Cut005, ShapeType: Compound
06:50:20    CharacteristicLengthMax: 0.5
06:50:20  Exporting mesh refinement data ...
06:50:20  Matching boundary patches
06:50:20  Matching mesh refinement regions
06:50:20  Exporting the part surfaces ...
06:50:21  Triangulating part Cut005, patch patch_0_0 ... writing to file
06:50:22  Populating mesh dictionaries in folder \\wsl$\Ubuntu-20.04\home\om840\OpenFOAM\om840-v2112\run\cfMesh\meshCase
06:50:22  Successfully wrote meshCase to folder \\wsl$\Ubuntu-20.04\home\om840\OpenFOAM\om840-v2112\run\cfMesh\meshCase
06:50:22  Wrote mesh case to \\wsl$\Ubuntu-20.04\home\om840\OpenFOAM\om840-v2112\run\cfMesh\meshCase
06:50:25  Executing: bash -c cd "/mnt/\\wsl$\ubuntu-20.0/home/om840/OpenFOAM/om840-v2112/run/cfMesh/meshCase" && ./Allmesh
06:50:25  Raw command:  ['C:/Program Files/FreeCAD 0.19/bin\\python.exe', '-u', 'C:\\Users\\HP Z840 V4 PRO\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'bash', '-c', 'cd "/mnt/\\\\wsl$\\ubuntu-20.0/home/om840/OpenFOAM/om840-v2112/run/cfMesh/meshCase" && ./Allmesh']
06:50:25  /bin/bash: line 0: cd: /mnt/\wsl$\ubuntu-20.0/home/om840/OpenFOAM/om840-v2112/run/cfMesh/meshCase: No such file or directory
Has some of you got any success with CdfOf on OF v2106 or v2112 ?

Please may I have some advice about how this could be done ?

Many thanks

Olivier
User avatar
oliveroxtoby
Posts: 812
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Question to convergence and residuals / v2112

Post by oliveroxtoby »

Oli772 wrote: Wed Apr 27, 2022 2:58 pm Hello,
first thank you all for your work at making CfdOf a performant tool.
I can see from this post that it is possible to make it running with OpenFoam v2112.

I am using OF v2112 on ubuntu 20.04 LTS under Windows WSL2 and I am also using FreeCAD 0.19.
Unfortunately for me, after many tentatives I am still unable to make CfdOf working.
WSL isn't currently supported with CfdOF unfortunately. It is probably very close to working, but we would need a volunteer to test and debug.

The easiest way to get it working in Windows would be to follow the installation instructions in the README. If you really need WSL, it will require some investigation.
KAKM
Posts: 109
Joined: Tue May 04, 2021 12:17 am

Re: CfdOf with latest v2106 v2112 OpenFOAM.com versions

Post by KAKM »

Oli772 wrote: Thu Apr 28, 2022 4:55 am
OpenFOAM install directory is set to: //wsl$/Ubuntu-20.04/usr/lib/openfoam

But checking the dependencies gives the following:

Code: Select all

Could not find OpenFOAM installation: The directory \\wsl$\Ubuntu-20.04\usr\lib\openfoam is not a recognised OpenFOAM installation
gmsh executable: C:/Program Files/FreeCAD 0.19/bin/gmsh.exe
gmsh could not be run from OpenFOAM environment
I think you have your OpenFOAM install directory set to the wrong level. Try changing it to //wsl$/Ubuntu-20.04/usr/lib/OpenFOAM/OpenFOAM-v2112 or //wsl$/Ubuntu-20.04/usr/lib/OpenFOAM/om840-v2112. That should resolve the "openfoam is not a recognised OpenFOAM installation" error.
Post Reply