Installation CfdOf / HiSA

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

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

Re: Installation CfdOf / HiSA

Post by oliveroxtoby »

Geefer wrote: Thu Feb 11, 2021 11:19 am Thanks Oliver. I just updated my Workbench and installed the Mingw openfoam installation from the preferences panel. Then I ran the dependency checker and it ran horrendously slowly? It took over 3 minutes to run and tell me that OpenFoam was installed but that cfMesh and HiSA were not. Did you notice anything similar on your setup?
On my system it takes about 10 seconds to set up the environment (you can see this when you run the MSYS2 terminal from the desktop shortcut). It's slower than BlueCFD but only happens once each time you run the solver or mesher, so doesn't make much difference in the greater scheme of things. This is where most of the time goes when running the dependency checker, but it still only takes 40s on my machine. 3 minutes sounds excessive though. How long does the terminal take to initialise for you if you run it from the "OpenFOAM-v2012-MSYS2-Terminal" shortcut on the desktop?
I noticed that the preferences form is no longer persisting the path to the OpenFOAM directory when you click apply or OK
That should be resolved, thanks for reporting.
Geefer
Posts: 18
Joined: Mon Feb 01, 2021 4:10 pm

Re: Installation CfdOf / HiSA

Post by Geefer »

oliveroxtoby wrote: Thu Feb 11, 2021 7:35 pm On my system it takes about 10 seconds to set up the environment (you can see this when you run the MSYS2 terminal from the desktop shortcut). It's slower than BlueCFD but only happens once each time you run the solver or mesher, so doesn't make much difference in the greater scheme of things. This is where most of the time goes when running the dependency checker, but it still only takes 40s on my machine. 3 minutes sounds excessive though. How long does the terminal take to initialise for you if you run it from the "OpenFOAM-v2012-MSYS2-Terminal" shortcut on the desktop?
It takes around 13 seconds on my machine, which is not the fastest in the world I admit. However, my other MSYS2 installation takes about a second to start up a shell so goodness knows what is going on. The .cmd files run by the shortcut for the two installations are mostly identical so I'm not sure where the extra time is coming from.
User avatar
oliveroxtoby
Posts: 812
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Installation CfdOf / HiSA

Post by oliveroxtoby »

Geefer wrote: Fri Feb 12, 2021 12:32 pm It takes around 13 seconds on my machine, which is not the fastest in the world I admit. However, my other MSYS2 installation takes about a second to start up a shell so goodness knows what is going on. The .cmd files run by the shortcut for the two installations are mostly identical so I'm not sure where the extra time is coming from.
It's related to setting up the OpenFOAM environment, rather than anything to do with MSYS2 itself.

The dependency checker should only start the Foam enivronment four (maybe five) times, so something else must be going wrong for it to take an extra ~2 minutes. Perhaps you can see where it is taking the time if you keep an eye on the progress of the commands in the Report View while the dependency checker is running?
Geefer
Posts: 18
Joined: Mon Feb 01, 2021 4:10 pm

Re: Installation CfdOf / HiSA

Post by Geefer »

oliveroxtoby wrote: Sat Feb 13, 2021 4:47 pm The dependency checker should only start the Foam enivronment four (maybe five) times, so something else must be going wrong for it to take an extra ~2 minutes. Perhaps you can see where it is taking the time if you keep an eye on the progress of the commands in the Report View while the dependency checker is running?
It takes 22s each time the environment setup is run and the whole dependency checker (with cfMesh and HiSA NOT installed so failing check) takes 1min 33s now so maybe that's just an indication that I need a faster machine.
sstevenson638
Posts: 36
Joined: Thu Jun 15, 2023 8:51 pm

Re: Installation CfdOf / HiSA

Post by sstevenson638 »

Geefer wrote: Wed Feb 10, 2021 4:27 pm
oliveroxtoby wrote: Wed Feb 10, 2021 6:03 am
Geefer wrote: Tue Feb 09, 2021 3:07 pm
  • Finally I had to make minor changes to CfdTools.py to makeRunCommand and checkCfdDependencies.
Nice, thank you for the feedback! Any chance you could submit your changes as a pull request? Thank you!
Sadly I have now found more problems due to the templating system somehow still using Windows paths in the resultant files when Linux paths are required - which I have not yet been able to resolve.

I even tried FreeCAD and OpenFoam running inside WSL2 using an X server to render it in the Windows GUI but that failed to find the Workbenches so I must have had something wrong there too.

For now I have decided to give up (much against my nature) and use the BlueCFD installation, as I was advised to a few days ago. It works out of the box and I really need to spend some time actually learning how to use CfdOf and get onto the project I should be working on at the moment. Once I have made some progress I may be able to get back to this though

Did you ever try getting this to work? I am going through the same process you must have gone through: trying to get FeeCAD to work with WSL Ubuntu version of OpenFOAM. Was the change you made to CfdTools.py in the "makeRunCommand" function? I'm thinking I can make it work with WSL by adding "wsl" in front of the command so that it runs as a wsl Linux command. Would you mind posting the change you made?

I don't want to get much deeper into this if I know there are other road blocks ahead. Did you have any ideas on how to get the Windows paths issue sorted out?

I really wish we could get this working with WSL, I haven't tried any of the OpenFOAM windows installs because I'm afraid the performance of those could be bad.
Geefer
Posts: 18
Joined: Mon Feb 01, 2021 4:10 pm

Re: Installation CfdOf / HiSA

Post by Geefer »

Sorry but it was so long ago that I can no longer remember and I no longer have that setup on my pc.
Post Reply