Porous Baffle Problem

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
airflowhack
Posts: 5
Joined: Fri Jul 26, 2019 2:29 pm

Porous Baffle Problem

Post by airflowhack »

Hi

I'm working through the Porous Baffle CFD (SnappyHexMesh) tutorial located at http://www.opensim.co.za/training.html

Everything seems to work fine until I try to write the case to start the analysis job. I get an Error writing the case.

Code: Select all

0.0: Checking dependencies...
0.0: Case writer called
0.0: Error writing case:
0.0: name 'CfdMeshRefinement' is not defined
0.0: Write case setup file failed
In the report view, I see

Code: Select all

Traceback (most recent call last):
  File "C:\Users\username\AppData\Roaming\FreeCAD\Mod\CfdOF\_TaskPanelCfdSolverControl.py", line 119, in write_input_file_handler
    FreeCADGui.doCommand("writer.writeCase()")
  File "<string>", line 1, in <module>
  File "C:\Users\username\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdCaseWriterFoam.py", line 106, in writeCase
    self.setupPatchNames()
  File "C:\Users\username\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdCaseWriterFoam.py", line 531, in setupPatchNames
    isinstance(regionObj.Proxy, CfdMeshRefinement._CfdMeshRefinement):
NameError: name 'CfdMeshRefinement' is not defined
I'm running FreeCAD 0.19_pre on Windows. I also had this error on FreeCAD 0.18.3. Is it a bug or an installation error on my machine?

TIA
Attachments
porousBaffleGeometry.fcstd
(16.47 KiB) Downloaded 45 times
User avatar
oliveroxtoby
Posts: 840
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Porous Baffle Problem

Post by oliveroxtoby »

airflowhack wrote: Fri Jul 26, 2019 3:37 pm Hi

I'm working through the Porous Baffle CFD (SnappyHexMesh) tutorial located at http://www.opensim.co.za/training.html

Everything seems to work fine until I try to write the case to start the analysis job. I get an Error writing the case.

Code: Select all

0.0: Checking dependencies...
0.0: Case writer called
0.0: Error writing case:
0.0: name 'CfdMeshRefinement' is not defined
0.0: Write case setup file failed
In the report view, I see

Code: Select all

Traceback (most recent call last):
  File "C:\Users\username\AppData\Roaming\FreeCAD\Mod\CfdOF\_TaskPanelCfdSolverControl.py", line 119, in write_input_file_handler
    FreeCADGui.doCommand("writer.writeCase()")
  File "<string>", line 1, in <module>
  File "C:\Users\username\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdCaseWriterFoam.py", line 106, in writeCase
    self.setupPatchNames()
  File "C:\Users\username\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdCaseWriterFoam.py", line 531, in setupPatchNames
    isinstance(regionObj.Proxy, CfdMeshRefinement._CfdMeshRefinement):
NameError: name 'CfdMeshRefinement' is not defined
I'm running FreeCAD 0.19_pre on Windows. I also had this error on FreeCAD 0.18.3. Is it a bug or an installation error on my machine?

TIA
It was indeed a bug. Thanks for reporting; should be working now.
Please provide all the information requested in this post before reporting problems with CfdOF.
airflowhack
Posts: 5
Joined: Fri Jul 26, 2019 2:29 pm

Re: Porous Baffle Problem

Post by airflowhack »

Thanks for looking at this. It works now.
Post Reply