[Solved] Working Dir changes when launching Analysis Control Task Panel using GMSH Mesh

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
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

[Solved] Working Dir changes when launching Analysis Control Task Panel using GMSH Mesh

Post by Syres »

Hi,

I updated the CFDOf Workbench at approx. 19:30 British Summertime last night having noticed some changes of late. I'm just renewing my (lack of) skills with Tutorial 2 Porous Baffle using GMSH. I'm happy that all had gone as expected until the time to carry out the Solving Stage. I like to keep each case in it's own directory and therefore always create a new folder, browse and select it in the Working Dir field so there's no typo's and save the FreeCAD file at this stage. The example screenshot shows how it looks before I launch the Analysis Control Task Panel to write the case.
CFDOf_WorkingDir_Before.jpg
CFDOf_WorkingDir_Before.jpg (47.83 KiB) Viewed 1507 times
Now I double click OpenFOAM in the tree to be able to Write and Solve the case and now the Working Dir has changed to my Default Output Directory as set in CFD Preferences page, as per screenshot below including Report View output.
CFDOf_WorkingDir_After.jpg
CFDOf_WorkingDir_After.jpg (382.06 KiB) Viewed 1507 times
Please note the case is written and the solver runs fine but it's just that if I forget it could overwrite a previous case due to the issue which I'm sure isn't by design. I was under the belief that the Default Output Directory would only be used if the Working Dir had been left blank by the user but by all means correct me if I'm mistaken.
I've attached my FreeCAD file if it's of any use and I'm using the following version:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14482 (Git)
Build type: Release
Branch: master
Hash: 6f06345634e25839b535a4534face9d9c1196201
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)

Thanks
John
Attachments
CFD_BasicBaffle.FCStd
(202.31 KiB) Downloaded 44 times
Last edited by Syres on Thu Aug 30, 2018 10:52 am, edited 3 times in total.
User avatar
oliveroxtoby
Posts: 812
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Working Dir changes when launching Analysis Control Task Panel using GMSH Mesh

Post by oliveroxtoby »

Syres wrote: Wed Aug 29, 2018 8:42 am Hi,

I updated the CFDOf Workbench at approx. 19:30 British Summertime last night having noticed some changes of late. I'm just renewing my (lack of) skills with Tutorial 2 Porous Baffle using GMSH. I'm happy that all had gone as expected until the time to carry out the Solving Stage. I like to keep each case in it's own directory and therefore always create a new folder, browse and select it in the Working Dir field so there's no typo's and save the FreeCAD file at this stage. The example screenshot shows how it looks before I launch the Analysis Control Task Panel to write the case.
CFDOf_WorkingDir_Before.jpg

Now I double click OpenFOAM in the tree to be able to Write and Solve the case and now the Working Dir has changed to my Default Output Directory as set in CFD Preferences page, as per screenshot below including Report View output.
CFDOf_WorkingDir_After.jpg

Please note the case is written and the solver runs fine but it's just that if I forget it could overwrite a previous case due to the issue which I'm sure isn't by design. I was under the belief that the Default Output Directory would only be used if the Working Dir had been left blank by the user but by all means correct me if I'm mistaken.
I've attached my FreeCAD file if it's of any use and I'm using the following version:
Thanks for the report. We had moved the working directory setting to the analysis object but had neglected to remove it from the solver object. It should be fixed now. The setting in the analysis object now affects both the meshing and solver location.
Please provide all the information requested in this post before reporting problems with CfdOF.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: [Solved] Working Dir changes when launching Analysis Control Task Panel using GMSH Mesh

Post by Syres »

Thanks Oliver for the quick fix, updated my CFdOF WB, all working correctly and I've updated the thread title accordingly.

Cheers
John
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: [Solved] Working Dir changes when launching Analysis Control Task Panel using GMSH Mesh

Post by Syres »

I'm afraid half a fix at the moment Oliver, the Working Dir field is now correct but when Writing the case and therefore running the Solver it is still using the Default Output Directory.

Code: Select all

Start to write case to folder E:\Data\FreeCAD\FEM_CFD
Successfully wrote stl surface

Matching boundary conditions ...
Populating createPatchDict to update BC names
Writing gmsh generated mesh

Successfully wrote OpenFOAM case to folder E:\Data\FreeCAD\FEM_CFD
Cheers
John
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: [Solved] Working Dir changes when launching Analysis Control Task Panel using GMSH Mesh

Post by Syres »

Oliver ignore the above post, apologies I didn't grasp that I had to clear out the CFD Analysis from my existing file and enter the custom case directory in the CFDAnalysis container.

All is good and thanks again John.
Post Reply