Skip to content

nogenmyr/PatchEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

PatchEditor

A Blender addon to edit OpenFOAM mesh patches.

Short usage on a test case:

  1. Take a tutorial
   cp -r $FOAM_TUTORIALS/mesh/snappyHexMesh/flange/ $FOAM_RUN
   run
   cd flange
   ./Allrun
   foamToSurface test.obj
  1. Put PatchEditor so that Blender sees it:
   cd your_blenderpath
   cd 2.70/scripts/addons
   git clone https://github.com/nogenmyr/PatchEditor
  1. Enable PatchEditor in Blender (User prefs. OpenFOAM category).

  2. Locate the Addons User Interface in Object Properties Panel.

  3. Click Import Patches and locate the test.obj and open it.

  4. Click Setup initial patches to assign all faces to the correct patch.

  5. Find out which face in your OpenFOAM mesh that is the first boundary face. This is the "startFace" of the first patch in polyMesh/boundary. Put this number in the "1st BC face" in the User Interface.

  6. Edit the faces patch belonging as you like. You may also introduce new patches. This is similar as in the Swift-tools.

  7. When done, click "Write". The File select dialog should open in your case' system folder. Put the createPatchDict there. A file named "batchFile" will be created in the case directory.

  8. Create faceSets which describes the new patch layout by running

    setSet -batch batchFile
in the case directory
  1. Create the new patches using the faceSets by running:
    createPatch
    or
    createPatch -overwrite
  1. The mesh will now conform to the changes you did in Blender

Note: Tested in Blender 2.70 and OpenFOAM 2.2

About

A Blender addon to edit OpenFOAM mesh patches

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages