Skip to content

fix MeanVelocityForceCellZone demo: typo and missing ShapeRefs#262

Merged
oliveroxtoby merged 1 commit intojaheyns:masterfrom
kevinsmia1939:fix_meanvelocityforce_cellzone
Apr 20, 2026
Merged

fix MeanVelocityForceCellZone demo: typo and missing ShapeRefs#262
oliveroxtoby merged 1 commit intojaheyns:masterfrom
kevinsmia1939:fix_meanvelocityforce_cellzone

Conversation

@kevinsmia1939
Copy link
Copy Markdown
Contributor

Test for MeanVelocityForceCellZone failed with

-------------- Start of CFD tests --------------- 
Running Meanvelocityforce_cellZone macro /home/kevin/.local/share/FreeCAD/v1-1/Mod/CfdOF/Demos/Meanvelocityforce_cellZone/01-geom.FCMacro ... 
Running Meanvelocityforce_cellZone macro /home/kevin/.local/share/FreeCAD/v1-1/Mod/CfdOF/Demos/Meanvelocityforce_cellZone/02-analysis.FCMacro ... 
Running Meanvelocityforce_cellZone macro /home/kevin/.local/share/FreeCAD/v1-1/Mod/CfdOF/Demos/Meanvelocityforce_cellZone/03-mesh.FCMacro ... 
Running Meanvelocityforce_cellZone macro /home/kevin/.local/share/FreeCAD/v1-1/Mod/CfdOF/Demos/Meanvelocityforce_cellZone/04-boundary_conditions.FCMacro ... 
======================================================================
ERROR: test_run (TestCfdOF.MeanVelocityForceCellZoneTest.test_run)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAlDEDDo/usr/lib/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
  File "/tmp/.mount_FreeCAlDEDDo/usr/lib/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
  File "/tmp/.mount_FreeCAlDEDDo/usr/lib/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/home/kevin/.local/share/FreeCAD/v1-1/Mod/CfdOF/./TestCfdOF.py", line 540, in test_run
    CfdTools.executeMacro(macro_name)
  File "/home/kevin/.local/share/FreeCAD/v1-1/Mod/CfdOF/./CfdOF/CfdTools.py", line 1724, in executeMacro
    macro_contents += open(macro_name).read()
                      ^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/kevin/.local/share/FreeCAD/v1-1/Mod/CfdOF/Demos/Meanvelocityforce_cellZone/04-boundary_conditions.FCMacro'

Shaperef also need to be add to fix another fail test

AssertionError: fvOptions test failed.
  @@ -19 +19 @@                                                                                                             
  -Cylinder001MomentumSource                                                                                                
  +MomentumSource                                                                                                           
  @@ -23 +23 @@                                                                                                             
  -    cellZone        Cylinder001;                                                                                         
  +    cellZone        ;                                                                                                    
  @@ -28 +28 @@
  -        cellZone        Cylinder001;                                                                                     
  +        cellZone        ;               

- Rename 04-boundry_conditions.FCMacro → 04-boundary_conditions.FCMacro
- Add ShapeRefs to each MeanVelocityForce object in 05-mean_velocity_force.FCMacro
  so cell zone names (Cylinder, Cylinder001, Cylinder002) are correctly
  written to fvOptions
- Bump version to 1.34.17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants