Update on the development of the OpenFOAM CFD workbench (CFDOF)

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
johan
Posts: 14
Joined: Tue Nov 29, 2016 8:37 pm

Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by johan »

Dear all

We would like to share the latest extensions to the OpenFOAM CFD workbench (https://forum.freecadweb.org/viewtopic.php?f=18&t=21576). The majority of the work focussed on the extension to turbulent flow and the implementation of meshing utilities that allow us to model more representative geometries for fluid flow which require large meshes (> 1 M cells). Some of the new features include
  • Implemented snappyHexMesh for cut-cell Cartesian meshing with porous media
  • Implemented cfMesh for cut-cell Cartesian meshing with boundary layers
  • Extension to turbulent using RANS (k-w SST).
  • To improve code maintenance a new case builder using a modular template structure is adopted
  • Workbench supports macro scripting with Python
We have updated the CFD tutorials (https://opensimsa.github.io/training.html) to use the python scripting. Please have look at the new features and let us know what you think. To make it easier to install CFDOF we have requested that it be added to the FC add-ons list, we will in the meantime make a Windows executable available.
mesh.png
mesh.png (157.54 KiB) Viewed 11844 times
velc.png
velc.png (43.01 KiB) Viewed 11844 times
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by thschrader »

Hello Johan,

this is my first cfd-calculation ever according to your tutorial.
fluid: oil SAEW10, inlet-velocity=300 mm/s.
I am only a beginner, but I think you guys are doing a great work!
Greetings to south-africa!
regards Thomas

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11935 (Git)
Build type: Release
Branch: master
Hash: a5bc70cca0d2eaa56709603521650ccb3d8d926c
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
settings.JPG
settings.JPG (42.74 KiB) Viewed 11780 times
cfmesh.JPG
cfmesh.JPG (185.28 KiB) Viewed 11780 times
residuals.JPG
residuals.JPG (123.52 KiB) Viewed 11780 times
paraview.JPG
paraview.JPG (193.64 KiB) Viewed 11780 times
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by saso »

One of the interesting use cases of cfd for structural engineering can be wind loads (wind tunnel) simulations on structures / buildings...
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by looo »

I tried one of the tutorials too. But I don't know how to set the OpenFoam -Path in the preference dialog. I guess the open-foam directory should be the directory where for example simpleFoam is:

Code: Select all

lo@lo-desktop:~$ which simpleFoam
/usr/bin/simpleFoam
So all the commands are directly available. But somehow the path has to be set, and is not allowed to be /usr/bin...
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by oliveroxtoby »

looo wrote: Fri Sep 01, 2017 5:09 am I tried one of the tutorials too. But I don't know how to set the OpenFoam -Path in the preference dialog. I guess the open-foam directory should be the directory where for example simpleFoam is:

Code: Select all

lo@lo-desktop:~$ which simpleFoam
/usr/bin/simpleFoam
So all the commands are directly available. But somehow the path has to be set, and is not allowed to be /usr/bin...
I haven't seen this before - normally the installation is in its own directory like /opt/openfoam4, /usr/local/OpenFOAM/OpenFOAM4.x, ~/OpenFOAM/OpenFOAM4.x, something like that. Which system and which OpenFOAM package are you using?
Please provide all the information requested in this post before reporting problems with CfdOF.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by looo »

oliveroxtoby wrote: Which system and which OpenFOAM package are you using?
should be this package: https://launchpad.net/ubuntu/zesty/+source/openfoam (ubuntu 17.04, openfoam4.1)

I think the binaries are directly in bin and therefore accessible without any paths. But I don't know what is needed to run the simulation
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by oliveroxtoby »

  • The latest Windows build incorporating the CFD workbench is now available at https://opensimsa.github.io/download.html
  • The CFDOF workbench is available from https://github.com/jaheyns/CfdOF
  • Please note that the workbench will only work with a very recent prerelease of FreeCAD - version 0.17.11832 or later
  • For full information please see the Readme
  • Also added is basic multiphase (interFoam/multiphaseInterFoam) support (currently lacking support for surface tension, and setting non-default values of gravity). Thank you to Klaus Sembritzki for his contribution.
Please provide all the information requested in this post before reporting problems with CfdOF.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by looo »

rusing the official repository installes openfoam in /opt/openfoam4/ and this makes the dependency-checker is happy. Maybe the package from the ubuntu repositories shouldn't be used...
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by oliveroxtoby »

looo wrote: Fri Sep 01, 2017 6:44 am
oliveroxtoby wrote: Which system and which OpenFOAM package are you using?
should be this package: https://launchpad.net/ubuntu/zesty/+source/openfoam (ubuntu 17.04, openfoam4.1)

I think the binaries are directly in bin and therefore accessible without any paths. But I don't know what is needed to run the simulation
From the README:
Set the OpenFOAM install directory in the preferences panel - typical install locations are /home/user/OpenFOAM/OpenFOAM-4.x or /opt/openfoam4 (It will be automatically detected in common default install locations.)
The install path that the CFD workbench wants is the one containing etc/bashrc which is used to initialise the OpenFOAM environment.
My understanding with the Ubuntu package is that this should be /opt/openfoam4, but I'd like to hear if this is not the case. If it is, then it should be picked up automatically if you just leave the install path blank.
rusing the official repository installes openfoam in /opt/openfoam4/ and this makes the dependency-checker is happy. Maybe the package from the ubuntu repositories shouldn't be used...
Aha, interesting. I did not realise there was a distinction. It sounds as if the ubuntu repository package integrates the directory structure into the system. If you are able it would be helpful to know if there is a path set up in the WM_PROJECT_DIR environment variable (I guess not, as this would have satisfied the dependency checker), or alternatively whether the FOAM_ETC variable is set?
Please provide all the information requested in this post before reporting problems with CfdOF.
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Update on the development of the OpenFOAM CFD workbench (CFDOF)

Post by makkemal »

When will this be part of the addon manager ?
It really full featured workbench already
Post Reply