{"id":13993796,"url":"https://github.com/jaheyns/CfdOF","last_synced_at":"2025-07-22T18:31:53.966Z","repository":{"id":20769679,"uuid":"75399712","full_name":"jaheyns/CfdOF","owner":"jaheyns","description":"Computational Fluid Dynamics (CFD) for FreeCAD based on OpenFOAM solver","archived":false,"fork":false,"pushed_at":"2024-11-19T12:28:08.000Z","size":7971,"stargazers_count":495,"open_issues_count":15,"forks_count":95,"subscribers_count":33,"default_branch":"master","last_synced_at":"2024-11-19T13:31:57.281Z","etag":null,"topics":["cad","cfd","freecad-workbench","openfoam"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"qingfengxia/Cfd","license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaheyns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-02T13:51:31.000Z","updated_at":"2024-11-19T12:28:12.000Z","dependencies_parsed_at":"2024-06-29T20:45:08.592Z","dependency_job_id":"8895f365-7eff-460e-ab9f-9700891ff115","html_url":"https://github.com/jaheyns/CfdOF","commit_stats":{"total_commits":926,"total_committers":22,"mean_commits":42.09090909090909,"dds":0.5107991360691144,"last_synced_commit":"2dff3bfec7e991a7d4dbf45a57f363f8643352f7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaheyns%2FCfdOF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaheyns%2FCfdOF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaheyns%2FCfdOF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaheyns%2FCfdOF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaheyns","download_url":"https://codeload.github.com/jaheyns/CfdOF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227156338,"owners_count":17739281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cad","cfd","freecad-workbench","openfoam"],"created_at":"2024-08-09T14:02:33.727Z","updated_at":"2025-07-22T18:31:53.949Z","avatar_url":"https://github.com/jaheyns.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# CfdOF: A Computational fluid dynamics (CFD) workbench for FreeCAD\n\nThis workbench aims to help users set up and run CFD analyses within the [FreeCAD](https://freecad.org)\nmodeller, and serves as a front-end (GUI) for the popular OpenFOAM® CFD toolkit (www.openfoam.org, www.openfoam.com).\nIt guides the user in selecting the relevant physics, specifying the material properties, generating a mesh, assigning\nboundary conditions and choosing the solver settings before running the simulation. Best practices are specified to\nmaximise the stability of the solvers.\n\n![screenshot](Doc/Resources/boiler.png)\n\nDisclaimer:\nThis offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via\nwww.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks\n\n## Features\n\n### Current:\n\n#### Flow physics\n* Incompressible, laminar flow (simpleFoam, pimpleFoam)\n* Support for various RANS, LES and DES turbulent flow models\n* Incompressible free-surface flow (interFoam, multiphaseInterFoam)\n* Compressible buoyant flow (buoyantSimpleFoam, buoyantPimpleFoam)\n* High-speed compressible flow ([HiSA](https://hisa.gitlab.io))\n* Porous regions and porous baffles\n* Basic material database\n* Flow initialisation with a potential solver\n* Solution of arbitrary passive scalar transport functions\n#### Meshing\n* Cut-cell Cartesian meshing with boundary layers (cfMesh)\n* Cut-cell Cartesian meshing with baffles (snappyHexMesh)\n* Tetrahedral meshing using Gmsh, including conversion to polyhedral dual mesh\n* Post-meshing check mesh\n* Support for dynamic mesh adaptation for supported solvers\n#### Post-processing and monitoring\n* Postprocessing using Paraview\n* Basic support for force-based function objects (Forces, Force Coefficients)\n* Basic support for probes\n#### Other features\n* Runs on Windows 7-11 and Linux\n* Unit/regression testing\n* Case builder using an extensible template structure\n* Macro scripting\n* Support for distributed parallel (cluster) runs via mpiexec \u0026 --hostfile\n\n### Platforms supported\n\n#### Linux\n\nAny system on which FreeCAD and the prerequisites listed below can be installed.\n\n#### Windows\n\nWindows 7-11; 64-bit version is required.\n\n#### macOS\n\nNot widely tested, but success has been reported. See\n[the following forum post](https://forum.freecad.org/viewtopic.php?f=37\u0026t=63782\u0026p=547611#p547578)\nfor instructions.\n\n## Getting started\n\n### Prerequisites\n\nThe CfdOF workbench depends on the following external software, some of\nwhich can be automatically installed (see below for instructions).\n\n- [Latest release version of FreeCAD (at least version 0.20.0 / git commit 29177)](https://www.freecad.org/downloads.php)\n or [latest development version (prerelease)](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds)\n- OpenFOAM [Foundation versions 9-12](http://openfoam.org/download/) or [ESI-OpenCFD versions 2006-2412](http://openfoam.com/download)\n- [Paraview](http://www.paraview.org/)\n- [cfMesh (customised version updated to compile with latest OpenFOAM versions)](https://sourceforge.net/projects/cfmesh-cfdof/)\n- [HiSA (High Speed Aerodynamic Solver)](https://hisa.gitlab.io)\n- [Gmsh (version 2.13 or later)](http://gmsh.info/) - optional, for generating tetrahedral meshes\n\n### Setting up the CfdOF workbench\n\n#### Windows\n\nThe latest\n[release](https://www.freecad.org/downloads.php)\nor [development](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds)\nFreeCAD build can be obtained (64 bit version) and installed\nby respectively running the installer or extracting the .7z archive to a directory\n\\\u003cFreeCAD-directory\\\u003e. In the latter case, FreeCAD can be run in place\n(\\\u003cFreeCAD-directory\\\u003e\\bin\\FreeCAD.exe).\n\nCfdOF itself is installed into FreeCAD using the Addon manager:\n\n* Run FreeCAD\n* Select Tools | Addon manager ...\n* Select CfdOF in the list of workbenches, and click \"Install/update\"\n* Restart FreeCAD\n* For installation of dependencies, see below\n\nNote: The CfdOF workbench can be updated at any time through the Addon manager.\n\n##### Dependency installation\n\nDependencies can be checked and installed conveniently from the CfdOF Preferences panel in FreeCAD.\nIn the FreeCAD window, select CfdOF | Open preferences.  The dependencies can be installed as\nindividual components or as part of a docker container (refer to the **Docker container install** section below).\n\nThe OpenFOAM installation is via the\n[OpenCFD MinGW package](https://www.openfoam.com/download/install-binary-windows-mingw.php), and\nthe [BlueCFD Core](https://bluecfd.github.io/Core/) port of OpenFOAM is also supported.\n\nOpenFOAM can be installed manually using the above links, or by clicking the relevant\nbutton in the Preferences panel described above. If you experience problems running OpenFOAM in CfdOF, please make\nsure you have a working installation by following instructions on the relevant websites.\n\nTo interface correctly with the OpenFOAM installation, CfdOF needs to be able to write to its\ninstall location.\nSome users experience problems using a location inside C:\\Program Files due to restrictions\nimposed by Windows User Account Control. It is therefore suggested to install to an alternative\nlocation, preferably in your home directory.\n\nIf OpenFOAM is installed with administrator privileges using the above packages, then Microsoft MPI\nwill also optionally be installed. If not, then it will be necessary to download and\ninstall it manually from [here](https://learn.microsoft.com/en-us/message-passing-interface/microsoft-mpi#ms-mpi-downloads).\nMPI is needed in order to run in parallel.\n\nSet the OpenFOAM install directory in the preferences\npanel to the install directory ending in the 'vXXXX' subfolder (where XXXX is the version number installed)\nfor the MinGW package, or the BlueCFD install directory.\n It will be automatically detected in the default install\nlocations.\n\nAny version of [ParaView](https://www.paraview.org/download/) can be installed,\nby following the above link or clicking the relevant button in the Preferences panel.\nSet the ParaView install path in the preferences panel to the 'paraview.exe' file in the 'bin'\nsubfolder of the ParaView installation. Common defaults will be detected if it is left blank.\n\nLikewise, cfMesh and HiSA can be installed from the Preferences panel. Do not close\nit until the 'Install completed' message is received.\nNote that the OpenFOAM installation must be in a writable location\nfor cfMesh and HiSA to be installed successfully.\n\nChoosing the \"Check dependencies\" option will verify that all\nprerequisites have been successfully installed.\n\n#### Linux\n\nAppImages of the latest [release](https://www.freecad.org/downloads.php)\nor [development](https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds)\nversions of FreeCAD can be downloaded and run directly\nwithout installation. Note that you will\nhave to enable execution permission on the downloaded file to run it.\nOtherwise, FreeCAD can be built\nfrom the source code at https://github.com/FreeCAD/FreeCAD .\n\nNote:\n* Installations of FreeCAD via Linux package managers\nmake use of your local Python installation. Therefore you might need to install additional\nPython packages to get full functionality. The dependency checker (see below) can help to diagnose\nthis.\n* Note that the 'Snap' container installed through some distributions' package managers\ncan be problematic as it does not allow access to system\ndirectories, and therefore OpenFOAM has to be installed in the user's home directory\nto be runnable from FreeCAD.\n\nFor the reasons above we recommend the AppImage as the most robust installation\noption on Linux.\n\nCfdOF itself is installed into FreeCAD using the Addon manager:\n\n* Run FreeCAD\n* Select Tools | Addon manager ...\n* Select CfdOF in the list of workbenches, and click \"Install/update\"\n* Restart FreeCAD\n* For installation of dependencies, see below\n\nNote: The CfdOF workbench can be updated at any time through the Addon manager.\n\n##### Dependency installation\n\nDependencies can be checked and some of them installed\nconveniently from the CFD Preferences panel in FreeCAD.\nIn the FreeCAD window, select Edit | Preferences ... and\nchoose \"CfdOF\".\n\nThe dependencies can be installed manually, or as part of a docker container (refer to Docker container install below). Manual\ninstallation may be undertaken for OpenFOAM ([OpenCFD](https://openfoam.com/download) or [Foundation](https://openfoam.org/download/)\nversions), [Paraview](http://www.paraview.org/) and [Gmsh](http://gmsh.info/) (optional) by using the links above or your distribution's package\nmanager. Note, however, that the OpenFOAM packages bundled in\nsome Linux distributions may be out of date or incomplete; for example,\nthe standard Debian and Ubuntu packages do not include the build command 'wmake'\nand therefore cannot be used with the optional components 'HiSA' and 'cfMesh'.\nWe therefore recommend installation of the packages supplied through\nthe official websites above. Please make sure the install the 'development'\npackage where available (usually named with the suffix '-devel' or '-dev') to \nbe sure that the optional components 'HiSA' and 'cfMesh' can be compiled\nwith 'wmake'.\n\nSet the OpenFOAM install directory in the preferences\npanel - examples of typical install locations are /usr/lib/openfoam/openfoam2306,\n/opt/openfoam10 or /home/user/OpenFOAM/OpenFOAM-10.x (it will be automatically\ndetected in common default install\nlocations). Note that if you have loaded the desired OpenFOAM\nenvironment already before starting FreeCAD, the install directory should be left blank.\n\ncfMesh and HiSA can be installed using the Preferences panel described above,\nand can be downloaded and built from their source\ncode inside your OpenFOAM installation if you have\nnot already done so yourself. Note that this is a lengthy process.\n\nChoosing the \"Check dependencies\" option will verify that all\nprerequisites have been successfully installed.\n\n#### Docker container install\n\nDocker containers offer a convenient way of providing pre-compiled program packages for both windows and linux. macOS can also be supported but\nassistance may be required to get this to work.  Please leave a message on the [forum](https://forum.freecad.org/viewforum.php?f=37).\n\n##### Docker on Windows\n\n[Podman](https://podman.io/) is the preferred docker run-time for Windows as using the WSL fast file system integration appears to offer performance benefits. [Docker Desktop](https://www.docker.com/products/docker-desktop/) may also be used.\n\n1. To use podman:\n    1. If an old version of podman is installed, remove it by opening a cmd window and typing the following commands:\n        * `podman machine stop podman-machine-default`\n        * `podman machine rm podman-machine-default`\n        * Agree to the deletion of files.\n    2. Install [podman](https://github.com/containers/podman/releases) .\n    3. Open a `cmd` (or terminal) window and issue the following commands:\n        * `podman machine init`\n        * `podman machine start` Note, the set rootful command should not be used.\n        * `wsl -d podman-machine-default`\n        * `sudo usermod --add-subuids 10000-75535 $USER`\n        * `sudo usermod --add-subgids 10000-75535 $USER`\n        * `podman system migrate`\n        * `mkdir -p /home/user/cfdof` This command makes a directory for WSL fast file system integration \n        * `exit`\n        * `exit` (A second time to return to the cmd prompt).\n    4. In the cfdof preference page, set the _Default output directory_ to use the WSL fast file system integration directory (created above):\n        * `\\\\wsl$\\podman-machine-default\\home\\user\\cfdof`\n2. To use Docker:\n    * Install [docker desktop](https://www.docker.com/products/docker-desktop/))\n3. Edit \u0026rarr; Preferences \u0026rarr; CfdOF: Press the _Install Paraview_ button.\n4. Edit \u0026rarr; Preferences \u0026rarr; CfdOF: Select _Use docker_.\n5. Press the _Install Docker Container_ button. There is no need to install gmsh, cfmesh and HISA as they are included in the docker image.\n6. Press the _Run dependency checker_ button.\n\n##### Docker on Linux\n\nEither docker or podman may be used on linux; however, podman is preferred.\n\n1. If podman is not installed by default, install docker or podman. Typical installation instructions are shown below for a debian based system. Similar instructions will be available for other distributions.\n    1. Docker installation\n        * `sudo apt install docker.io`\n        * `sudo usermod -aG docker $USER`\n        * Logout and log back into the session to update the user's groups (or, `sudo su $USER` can be used if Freecad is run from the current terminal window).\n    2. Podman installation\n        * `sudo apt install -y podman crun`\n        * `sudo usermod --add-subuids 10000-75535 $USER`\n        * `sudo usermod --add-subgids 10000-75535 $USER`\n        * `podman system migrate`\n3. Install paraview as per the package installation instructions for your distribution\n   (for example `sudo apt-get install paraview` on debian).\n4. Edit \u0026rarr; Preferences \u0026rarr; CfdOF: Select _Use docker_.\n5. Press the _Install Docker Container_ button. There is no need to install gmsh, cfmesh and HISA as they are included in the docker image.\n6. Press the _Run dependency checker_ button.\n\n## Documentation\n\nAt present there is no formal documentation for CfdOF apart from this README.\nHowever, demonstration cases\nare provided inside the 'Demos' folder of the\n[CfdOF workbench directory](https://github.com/jaheyns/cfdof). These aim\nto provide a basic overview of features and best practices. The examples are run\nby loading and executing the macro files ending in '.FCMacro' in the various sub-directories\nin the 'Demos' directory. Where there are several numbered files, these should be run in order\nand aim to demonstrate step-by-step how the case is set up.\n\nCommunity assistance may be sought at the\n[CfdOF dedicated FreeCAD forum](https://forum.freecad.org/viewforum.php?f=37),\nand a list of various third-party documentation is available in\n[the following forum post](https://forum.freecad.org/viewtopic.php?f=37\u0026t=33492#p280359).\n\n### FAQ\n\nQ: Do I have to create a watertight geometry?\n\nA: This isn't necessary if using the cartesian mesh generators _snappyHexMesh_ and _cfMesh_.\nYou can make use of shells and compounds instead of creating solids, as long as the\ncollection of shapes in the compound being meshed blocks off the volume desired.\nGaps smaller than the mesh spacing are also allowed.\n\n## Feedback\n\n### Reporting Bugs\n\nPlease discuss issues on the [CfdOF FreeCAD forum](https://forum.freecad.org/viewforum.php?f=37)\nfor community assistance.\nBugs can be reported on the [Github project site](https://github.com/jaheyns/cfdof).\n\nPlease first read the [guidelines for reporting bugs](https://forum.freecad.org/viewtopic.php?f=37\u0026t=33492#p280359)\nin order to provide sufficient information.\n\n## Development\n\nIf you would like to get involved in the development of CfdOF, please refer to the [Contribution guidelines](CONTRIBUTING.md)\nand [Roadmap](ROADMAP.md).\n\n## Acknowledgements\n\n### Funding\n\nThis development was made possible through initial funding from [Eskom Holdings SOC Ltd](http://www.eskom.co.za)\nand the [Council for Scientific and Industrial Research](https://www.csir.co.za) (South Africa).\n\n### Contributors\n\n* Oliver Oxtoby (CSIR, 2016-2018; private 2019-) \u003coliveroxtoby@gmail.com\u003e\n* Johan Heyns (CSIR, 2016-2018) \u003cjaheyns@gmail.com\u003e\n* Alfred Bogaers (CSIR, 2016-2018) \u003calfredbogaers@gmail.com\u003e\n* Jonathan Bergh (2022)\n* Qingfeng Xia (2015)\n* Thomas Schrader (2017-) \u003cinfo@schraderundschrader.de\u003e\n* Michael Hindley (2016)\n* Mark Mackenzie [Forum: @markrmau]\n* Katy Akmal (2022) [Forum: @KAKM]\n* Adrian Insaurralde (2022)\n* Klaus Sembritzki (2017)\n\n### Dedication\n\nCfdOF is dedicated to the memory of Michael Hindley. It is thanks to his irrepressible enthusiasm for\nFreeCAD and open source software that this workbench exists. Rest in peace.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaheyns%2FCfdOF","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaheyns%2FCfdOF","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaheyns%2FCfdOF/lists"}