CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] I Updated the `modifyPatches` utility for OpenFOAM-v2206

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2023, 08:25
Default I Updated the `modifyPatches` utility for OpenFOAM-v2206
  #1
Member
 
Ali B.
Join Date: Mar 2020
Location: abzrg.github.io
Posts: 44
Rep Power: 6
reverseila is on a distinguished road
Hello Foamers

The code is available on github.

---

This utility allows you to change the type of patches from the comfort of command-line not needing to edit the `constant/polyMesh/boundary` file.
This is particularly useful for those who use Gmsh as they have to manually edit the boundary file.
Wit this utility, one can write a shell script that converts their mesh with `gmshToFoam` and then modifies the patch
types to the correct ones.

It was originally written by Hisham El Safti back in 2013, and it seems it hasn't been updated since then (BTW, I don't know if OpenFOAM has introduced any utility that does the similar job.).

---

The primary change, in order to compile the code successfully, was the arguments passed to
constructors of various polyPatch types (for example: wallPolyPatch, processorPolyPatch,...).
I had to add the `patchType` to the end of constructor calls. I just add the `typeName`.
For example for `wallPolyPatch` constructor I add `word("wall")` as the last arg to the constructor.

The code seems to work fine as I test it with `-empty` and `-wall` options.

---

The code can get better in terms of coding style and maybe pattern. Further, some repeating codes can to be encapsulated into functions.

---

Links:
reverseila is offline   Reply With Quote

Reply

Tags
gmsh, mesh, modifypatches


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to run dynamic mesh(6dof) and wave UDF shedo Fluent UDF and Scheme Programming 0 July 1, 2022 18:22
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 03:36
wallHeatFlux Calculation wrt utility version ahmet OpenFOAM Post-Processing 1 December 18, 2016 20:45
Something doens't work with wallHeatFlux utility or externalWallHeatFluxTemperat BC!! zfaraday OpenFOAM Post-Processing 0 February 5, 2015 17:47
LiftDrag utility not available guggi OpenFOAM Running, Solving & CFD 1 August 2, 2006 13:36


All times are GMT -4. The time now is 06:14.