Skip to content

Workflow_OpenFOAM

qingfengxia edited this page Jan 23, 2020 · 1 revision

Workflow for OpenFOAM

Choices on OpenFOAM case creation

Solver Control Task Panel should have such a choice.

Solver Object should a property to store this choice from user.

From Scratch, by TemplateString

By this way, a simple case setup can be generated by the software without any user intervention, while advanced boundary condition/solver control is not applicable. User may need edit the case control dict to run realistic engineering problem.

The fluid boundary condition setup mimic Ansys Fluent GUI; it may help new learner to setup simulation case in OpenFOAM.

From Tutorial case of OpenFOAM

All boundary condition will be stripped, only solver control dict in system will be kept. Mesh will be generated by Cfd module, boundary condition setup can be done interactively in GUI.

From Existing case (yet completed)

This route fit for engineering design with several design iterations. In each design iteration, geometry may change (so the boundary condition attaching faces change), but boundary condition setup like value should remain. In GUI, only update mesh and boundary condition and keep other solver control dict untouched.

Furthermore, it is recommended to use scripting workflow for parameter study, see also example of using python to build engineering design pipeline https://github.com/qingfengxia/CAE_pipeline

GUI : for learning OpenFOAM and this Cfd module

Gui for new learner, may be not suitable to deal with complex engineering problems

Advanced boundary condition

Special foam setting can be specified in GUI

Manually edit case set up files

On SolverControl TaskPanel, selection edit case, the case folder is opened, user can double check all kinds of solver setting. before run the computation.

Update case mesh

On SolverControl TaskPanel, selection update mesh , instead of write case in Solver Control Task Panel

Create analysis from mesh by external mesher

gmsh output geo file can be edited by user to add more advance control, which is currently unavailable in FreeCAD GUI or Gmsh GUI.

Import back to Cfd module, and carry on boundary setting up.

Scripting without GUI

<CfdScriptExample.py> (not yet complete)

This is the preferred way to deal with realistic engineering design