Starting with CfdOF

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

maxam
Posts: 13
Joined: Mon Jun 20, 2022 8:13 am

Starting with CfdOF

Post by maxam »

Hello

Fist of all, as my first post, I wolud like to introduce myself: my name is Max and I'm a project engineer working in an italian automotive spare parts company.
I'm focused in designing axial fans for cooling systems.

I'm tryng to get familiar with CFD in ordert to improve and speed up the design of our fans.
I'm tryng to install CfdOF on my FreeCAD but I'm facing troubles so I ask fo an help.

FreeCAD istalled is version 0.20 on a windows 10 workstation.

I tryed both to make the automatic procedure (tools > addon manager > select CfdOF > click "Install/update" ) and manual instalation (by manually download CfdOF an put into C:\FreeCAD_02\Mod\), but I get several errors of installation when I install OpenFOAM, run the dependecy checker and install other dependencies.


14:47:53 /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2012/etc/bashrc: No such file or directory
14:47:53 Error parsing OpenFOAM version string environment...
14:47:59 Running cartesianMesh -version
14:47:59 Sourcing OpenFOAM environment...
14:47:59 /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2012/etc/bashrc: No such file or directory
14:47:59 /usr/bin/bash: cartesianMesh: comando non trovato

14:47:59 cfMesh (CfdOF version) not found
14:48:05 Running hisa -version
14:48:05 Sourcing OpenFOAM environment...
14:48:05 /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2012/etc/bashrc: No such file or directory
14:48:05 /usr/bin/bash: hisa: comando non trovato

14:48:05 HiSA not found
14:48:11 Checking for paraview:
14:48:11 Paraview executable: C:/Program Files/ParaView 5.5.2-Qt5-Windows-64bit/bin/paraview.exe
14:48:11 Checking Plot module:
14:48:11 Checking for gmsh:
14:48:11 gmsh executable: C:/FreeCAD_02/bin/gmsh.exe
14:48:11 Running 'C:/FreeCAD_02/bin/gmsh.exe' -version
14:48:11 Sourcing OpenFOAM environment...
14:48:11 /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2012/etc/bashrc: No such file or directory
14:48:11 4.10.3
14:48:12 Completed CFD dependency check
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Starting with CfdOF

Post by oliveroxtoby »

maxam wrote: Mon Jun 20, 2022 1:16 pm I tryed both to make the automatic procedure (tools > addon manager > select CfdOF > click "Install/update" ) and manual instalation (by manually download CfdOF an put into C:\FreeCAD_02\Mod\), but I get several errors of installation when I install OpenFOAM, run the dependecy checker and install other dependencies.
If you can get to the dependency checker, then CfdOF is installed fine. The problem is with the installation of the external programs.
14:47:53 /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2012/etc/bashrc: No such file or directory
There seems to be a problem with your OpenFOAM installation. If you provide the full output of your report view when running the dependency checker, this should help.

EDIT: Sorry - talking nonsense here. You did provide the report view output, but there seems to be information missing. Could you go to Edit | Preferences | General | Output Window and make sure "Report log messages" is ticked, then re-run the dependency checker. Please also provide the output that appears in the output window on the preference page (after "Checking dependencies...").
Please provide all the information requested in this post before reporting problems with CfdOF.
maxam
Posts: 13
Joined: Mon Jun 20, 2022 8:13 am

Re: Starting with CfdOF

Post by maxam »

Thanks for your answer.

Here below the outputs after the "dependency check".

Output from the "Preference" window:

Code: Select all

Checking dependencies...
System: Windows
Runtime: MinGW
OpenFOAM directory: C:\OpenFoam\v2112
Error parsing OpenFOAM version string environment...
cfMesh (CfdOF version) not found
HiSA not found
Paraview executable: C:/Program Files/ParaView 5.5.2-Qt5-Windows-64bit/bin/paraview.exe
gmsh executable: C:/FreeCAD_02/bin/gmsh.exe
Output from main window:

Code: Select all

14:45:14  Checking CFD workbench dependencies...
14:45:14  Checking FreeCAD version
14:45:14  Checking for OpenFOAM:
14:45:14  System: Windows
Runtime: MinGW
OpenFOAM directory: C:\OpenFoam\v2112
14:45:14  Running  echo $FOAM_API
14:45:14  CfdConsoleProcess running command: ['C:/FreeCAD_02/bin\\python.exe', '-u', 'C:\\FreeCAD_02\\Mod\\CfdOF\\.\\CfdOF\\WindowsRunWrapper.py', 'C:\\OpenFoam\\v2112\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'echo Sourcing OpenFOAM environment...; source $HOME/OpenFOAM/OpenFOAM-v2112/etc/bashrc; export PATH=$FOAM_LIBBIN/msmpi:$FOAM_LIBBIN:$WM_THIRD_PARTY_DIR/platforms/linux64MingwDPInt32/lib:$PATH; echo $FOAM_API']
14:45:14  Sourcing OpenFOAM environment...

14:45:14  /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2112/etc/bashrc: No such file or directory
14:45:14  Error parsing OpenFOAM version string environment...
14:45:16  Running  cartesianMesh -version
14:45:16  CfdConsoleProcess running command: ['C:/FreeCAD_02/bin\\python.exe', '-u', 'C:\\FreeCAD_02\\Mod\\CfdOF\\.\\CfdOF\\WindowsRunWrapper.py', 'C:\\OpenFoam\\v2112\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'echo Sourcing OpenFOAM environment...; source $HOME/OpenFOAM/OpenFOAM-v2112/etc/bashrc; export PATH=$FOAM_LIBBIN/msmpi:$FOAM_LIBBIN:$WM_THIRD_PARTY_DIR/platforms/linux64MingwDPInt32/lib:$PATH; cartesianMesh -version']
14:45:16  Sourcing OpenFOAM environment...
14:45:16  /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2112/etc/bashrc: No such file or directory
14:45:16  /usr/bin/bash: cartesianMesh: comando non trovato
14:45:17  cfMesh (CfdOF version) not found
14:45:19  Running  hisa -version
14:45:19  CfdConsoleProcess running command: ['C:/FreeCAD_02/bin\\python.exe', '-u', 'C:\\FreeCAD_02\\Mod\\CfdOF\\.\\CfdOF\\WindowsRunWrapper.py', 'C:\\OpenFoam\\v2112\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'echo Sourcing OpenFOAM environment...; source $HOME/OpenFOAM/OpenFOAM-v2112/etc/bashrc; export PATH=$FOAM_LIBBIN/msmpi:$FOAM_LIBBIN:$WM_THIRD_PARTY_DIR/platforms/linux64MingwDPInt32/lib:$PATH; hisa -version']
14:45:19  Sourcing OpenFOAM environment...
14:45:19  /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2112/etc/bashrc: No such file or directory
14:45:20  /usr/bin/bash: hisa: comando non trovato
14:45:20  HiSA not found
14:45:22  Checking for paraview:
14:45:22  Paraview executable: C:/Program Files/ParaView 5.5.2-Qt5-Windows-64bit/bin/paraview.exe
14:45:22  Checking Plot module:
14:45:22  Checking for gmsh:
14:45:22  gmsh executable: C:/FreeCAD_02/bin/gmsh.exe
14:45:22  Running  'C:/FreeCAD_02/bin/gmsh.exe' -version
14:45:22  CfdConsoleProcess running command: ['C:/FreeCAD_02/bin\\python.exe', '-u', 'C:\\FreeCAD_02\\Mod\\CfdOF\\.\\CfdOF\\WindowsRunWrapper.py', 'C:\\OpenFoam\\v2112\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', "echo Sourcing OpenFOAM environment...; source $HOME/OpenFOAM/OpenFOAM-v2112/etc/bashrc; export PATH=$FOAM_LIBBIN/msmpi:$FOAM_LIBBIN:$WM_THIRD_PARTY_DIR/platforms/linux64MingwDPInt32/lib:$PATH; 'C:/FreeCAD_02/bin/gmsh.exe' -version"]
14:45:22  Sourcing OpenFOAM environment...
14:45:22  /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2112/etc/bashrc: No such file or directory
14:45:22  4.10.3
14:45:23  Completed CFD dependency check
Last edited by maxam on Tue Jun 21, 2022 1:57 pm, edited 1 time in total.
maxam
Posts: 13
Joined: Mon Jun 20, 2022 8:13 am

Re: Starting with CfdOF

Post by maxam »

Just for info:

FreeCad is installed into the directory C:\FreeCAD_02 and OpenFOAM is isntalled into the directory C:\OpenFoam\v2112.

Both directories have full access / permissions.
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Starting with CfdOF

Post by oliveroxtoby »

maxam wrote: Tue Jun 21, 2022 12:50 pm

Code: Select all

14:45:14  CfdConsoleProcess running command: ['C:/FreeCAD_02/bin\\python.exe', '-u', 'C:\\FreeCAD_02\\Mod\\CfdOF\\.\\CfdOF\\WindowsRunWrapper.py', 'C:\\OpenFoam\\v2112\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'echo Sourcing OpenFOAM environment...; source $HOME/OpenFOAM/OpenFOAM-v2112/etc/bashrc; export PATH=$FOAM_LIBBIN/msmpi:$FOAM_LIBBIN:$WM_THIRD_PARTY_DIR/platforms/linux64MingwDPInt32/lib:$PATH; echo $FOAM_API']
14:45:14  Sourcing OpenFOAM environment...

14:45:14  /usr/bin/bash: /home/massimiliano/OpenFOAM/OpenFOAM-v2112/etc/bashrc: No such file or directory
The home directory seems to be set differently in your installation compared to mine, and I don't know why.
To confirm this, could you double-click the "OpenFOAM-v2112-MSYS2-Terminal" on the desktop, then type

Code: Select all

echo $HOME
and tell me what is displayed. On my installation, it is always '/home/ofuser' here.
maxam
Posts: 13
Joined: Mon Jun 20, 2022 8:13 am

Re: Starting with CfdOF

Post by maxam »

Here below the info

Code: Select all

$ echo $HOME
/home/massimiliano
Problem is...that I don't find that directory on my PC.... :?:
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Starting with CfdOF

Post by thschrader »

maxam wrote: Wed Jun 22, 2022 7:05 am Problem is...that I don't find that directory on my PC.... :?:
Have you tried this?
https://www.youtube.com/watch?v=SLvHzL12028
hidden_folders.JPG
hidden_folders.JPG (81.95 KiB) Viewed 1910 times
maxam
Posts: 13
Joined: Mon Jun 20, 2022 8:13 am

Re: Starting with CfdOF

Post by maxam »

thschrader wrote: Wed Jun 22, 2022 9:18 am
maxam wrote: Wed Jun 22, 2022 7:05 am Problem is...that I don't find that directory on my PC.... :?:
Have you tried this?
Yes. All files/directories visible.
Seems to be a virtual dir. Is it possible?
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Starting with CfdOF

Post by thschrader »

maxam wrote: Wed Jun 22, 2022 11:28 am Yes. All files/directories visible.
Seems to be a virtual dir. Is it possible?
Sorry, I dont know.

Maybe you should try this openFOAM-version for Windows:
http://bluecfd.github.io/Core/Downloads/

Runs fine with cfdof-workbench, easy to install.
Bonus: Paraview
bluecfd.JPG
bluecfd.JPG (33.27 KiB) Viewed 1848 times
maxam
Posts: 13
Joined: Mon Jun 20, 2022 8:13 am

Re: Starting with CfdOF

Post by maxam »

thschrader wrote: Wed Jun 22, 2022 12:45 pm
maxam wrote: Wed Jun 22, 2022 11:28 am Yes. All files/directories visible.
Seems to be a virtual dir. Is it possible?
Sorry, I dont know.

Maybe you should try this openFOAM-version for Windows:
http://bluecfd.github.io/Core/Downloads/

Runs fine with cfdof-workbench, easy to install.
Bonus: Paraview
I installed BlueCFD as you suggested.
Sadly I still get errors at dependecy check

Code: Select all

09:04:32  Checking CFD workbench dependencies...
09:04:32  Checking FreeCAD version
09:04:32  Checking for OpenFOAM:
09:04:32  System: Windows
Runtime: BlueCFD2
OpenFOAM directory: C:\Program Files\blueCFD-Core-2020\OpenFOAM-8
09:04:32  Running  echo $WM_PROJECT_VERSION
09:04:32  
09:04:32  Running  wmake -help
09:04:39  /usr/bin/bash: wmake: comando non trovato
09:04:39  OpenFOAM installation does not include 'wmake'. Installation of cfMesh and HiSA will not be possible.
09:04:45  Running  cartesianMesh -version
09:04:45  /usr/bin/bash: cartesianMesh: comando non trovato
09:04:45  cfMesh (CfdOF version) not found
09:04:52  Running  hisa -version
09:04:52  /usr/bin/bash: hisa: comando non trovato
09:04:52  HiSA not found
09:04:59  Checking for paraview:
09:04:59  Paraview executable: C:\Program Files\blueCFD-Core-2020\OpenFOAM-8\..\AddOns\ParaView\bin\paraview.exe
09:04:59  Checking Plot module:
09:04:59  Checking for gmsh:
09:04:59  gmsh executable: C:/FreeCAD_02/bin/gmsh.exe
09:04:59  Running  'C:/FreeCAD_02/bin/gmsh.exe' -version
09:04:59  4.10.3
09:04:59  Completed CFD dependency check
Post Reply