I am using OpenFOAM to conduct several simulations. In most cases, I constantly use the ‘
autoPatch’ utility to divide external faces of the mesh into patches based on a given angle. The utility will rename the resulting patches:
auto2, etc. then I need to rename those names to meaningful counterparts, e.g.
auto0 should be renamed to
auto5 should be renamed to
My workflow is as follows:
Step 1: run the autoPatch utility:
autoPatch -overwrite 85
Step 2: create a dummy file:
Step 3: Open that file using ParaView.
Step 4: Inside Paraview, as you can see in the screenshot, I need to visualize each
autoN (N is an integer) to see what it should be renamed to:
Step 5: I need to write down manually in a piece of paper or in a text document the following tables (of course, it depends on the mesh):
auto0 ---> inlet auto1 ----> wall auto2 -----> airfoil ...etc.
Then I need to open the
./consant/polyMesh/boundary file to rename those occurences or using a command such as
sed, e.g: :
sed -i s/auto0/inlet/ ./constant/polyMesh/boundary
My question is:
As you can see, the last two steps are tedious and are prone to errors. The ideal solution in my case is to right-click on the patch (auto0, auto1, etc.) in Paraview and choose rename, then Paraview will automatically update the boundary conditions file (
Paraview, unfortunately, doesn’t provide the “rename” option as I described it above, But I would really like to know to achieve that inside Paraview either by creating a plugin or anything that could help.
Any suggestions on how to achieve that? I appreciate your help.