FreeCad CfdOF "Not Responding"

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
markinca
Posts: 56
Joined: Sun Apr 30, 2023 2:41 pm

FreeCad CfdOF "Not Responding"

Post by markinca »

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.2.29603 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * CfdOF 1.22.5
  * Help 1.0.3
WIndows 11

I have a very long CfdOF simulation running and have sleep mode turned off. If I leave the computer and after 30 min or so, come back, FreeCad no longer responds and in the title bar it says "Not Responding". However, I can see in Task Manager that FreeCad has CPU time and so do the InterFoam processes. It seems like just the FreeCad GUI is frozen but everything else is continuing on.

This has happened both times that I have tried to run this sim.

Is this a FreeCad issue or a CfdOF issue?
Last edited by markinca on Sun May 07, 2023 6:13 pm, edited 1 time in total.
User avatar
Raedchen_im_System
Posts: 95
Joined: Sun Oct 27, 2019 5:22 pm
Location: In der Nähe von Stuttgart
Contact:

Re: FreeCad CfdOF "Not Responding"

Post by Raedchen_im_System »

Hello markinca,

if you have a question like this, you should upload your FreeCad model so that others - here in particular Oliver - can reproduce your problem. You should upload the model without a mesh, because the mesh takes up a lot of storage space.

In some models, I had the same issue. I am very sure that this is not an issue of FreeCad or CfdOf, but of OpenFoam for Windows: When you look in the log-file of the solver (in your case: log.interfoam), you will see that this file is not updated either. The log files are in the "case"-directory, you can access this directory, if you click "edit" in the solver-menu of CfdOf.

This is not a large issue, you can just wait until OpenFoam finishes. You can see either in the log file or in the task manager that OpenFoam has ended. In most cases, FreeCad then "comes back to live" again. If not, you can just close FreeCad via Taskmanager and restart again. You can review the results by clicking "paraview" in the solver menu.

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * A2plus
  * Assembly4 0.12.5
  * CfdOF 1.21.4
  * fasteners
  * FCGear
  * Plot
User avatar
markinca
Posts: 56
Joined: Sun Apr 30, 2023 2:41 pm

Re: FreeCad CfdOF "Not Responding"

Post by markinca »

Thanks for the reply!

I believe you are correct. I took a look at the log file and it was last written at about 2pm yesterday slightly before I noticed FreeCAD was frozen. I also looked at the openfoam time step folders/files and those were updated last evening at around 8pm so the simulation has technically "finished" because the last time step was written but Interfoam is still running and FreeCAD is still frozen.

I decided to terminate FreeCAD and shortly there after, Interfoam stopped running too without my intervention. This seems like it could be an interface issue between CfdOF and Openfoam.

I may try a different simulation and see if the same thing happens.
Attachments
Spa_Jet_TR.FCStd
(59.32 KiB) Downloaded 46 times
Venturi 3.step
(27.83 KiB) Downloaded 44 times
Last edited by markinca on Wed May 10, 2023 8:41 pm, edited 2 times in total.
User avatar
markinca
Posts: 56
Joined: Sun Apr 30, 2023 2:41 pm

Re: FreeCad CfdOF "Not Responding"

Post by markinca »

UPDATE

Tried a different simulation and FreeCAD froze in much shorter time (< 10min).

If I do any work on the PC while the simulation is running, then everything runs ok. It seems to be only when there are no other inputs to the PC.
Attachments
Convection.FCStd
(76.47 KiB) Downloaded 46 times
User avatar
oliveroxtoby
Posts: 837
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: FreeCad CfdOF "Not Responding"

Post by oliveroxtoby »

markinca wrote: Fri May 05, 2023 5:12 pm UPDATE

Tried a different simulation and FreeCAD froze in much shorter time (< 10min).

If I do any work on the PC while the simulation is running, then everything runs ok. It seems to be only when there are no other inputs to the PC.
Sadly I haven't been able to reproduce this issue on my Windows system, but I'll see if I can think of anything...
User avatar
markinca
Posts: 56
Joined: Sun Apr 30, 2023 2:41 pm

Re: FreeCad CfdOF "Not Responding"

Post by markinca »

I find that it will only hang when you leave the computer to process without any user input for some time (~30min). If I am using the computer at the same time as the simulation, it seems to continue without issue. My first thought is it has something to due with the Windows idle timer but I wasn't sure if FreeCAD uses that or not.

But again, the computer is configured to "Never" go into sleep. I also tried with and without hard drives turning off and that had no effect either but probably because I have an SSD. One thing I have not tried yet is to disable the display blanking. That might be next when I get some time but I did have a freeze before the screens went blank so I kind of ruled that out too.


Thanks
User avatar
markinca
Posts: 56
Joined: Sun Apr 30, 2023 2:41 pm

Re: FreeCad CfdOF "Not Responding" [SOLVED]

Post by markinca »

I think I may have found what was causing FreeCad to freeze.

I noticed that the volume of messages to the "Report View" was quite large and was coming across very quickly. I found a setting in General > Output Window > "Redirect internal Python output to report view" and I unselected it. No more freezes.

I think the reason that it was freezing on my machine but not others may have to do with processing power and the rate at which the messages were delivered to the "Report view". The processor in my machine is an AMD 5900HX 8 Core/16 Threads and I was using all cores/threads for parallel processing. I think the simulation processing speed was overwhelming the buffer for the report view window. This is probably why the memory for FreeCAD kept growing as it was attempting to keep all of these messages in active memory.

I have seen similar behavior with Excel VBA and the Immediate window. If you write to much data to that window, Excel will freeze.
User avatar
oliveroxtoby
Posts: 837
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: FreeCad CfdOF "Not Responding" [SOLVED]

Post by oliveroxtoby »

markinca wrote: Fri May 12, 2023 2:01 pm I noticed that the volume of messages to the "Report View" was quite large and was coming across very quickly. I found a setting in General > Output Window > "Redirect internal Python output to report view" and I unselected it. No more freezes.
Fantastic, thanks so much for figuring that out. I'll try to put in a fix shortly.
User avatar
markinca
Posts: 56
Joined: Sun Apr 30, 2023 2:41 pm

Re: FreeCad CfdOF "Not Responding"

Post by markinca »

I think I found another solution.

Instead of unchecking "Redirect internal Python output to report view"

I checked "Use software OpenGL" in the Display settings and that too prevented the freezing.
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCad CfdOF "Not Responding"

Post by adrianinsaval »

software opengl severely hurts the performance of the 3d view, I do not recommend using it if you don't need it.
Post Reply