Accompanies OnCFD Newsletter #144: How to change a patch name
Need to rename a patch in a meshed & decomposed case? Do the following...
- Copy the dictionary below & save it as
/system/createPatchDict
- Edit the
name
&patches
entries to the required names - Run
createPatch -overwrite
in parallel to make the change
See the accompanying article for more info 👋
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
pointSync false;
patches
(
// Example of "renaming" a patch
// i.e moving faces from an exising patch to a new one
// repeat this section if you want to "rename" more patches
{
// name of our new patch
name my_new_patch;
// build our new patch from an existing one
constructFrom patches;
// name of our old patch
patches (my_old_patch);
// set basic patch info
patchInfo
{
// patch type for our new patch
type wall;
// what groups should our new patch be in (optional)
inGroups (Group01 Group02);
}
}
);
// ************************************************************************* //
Thanks Robin, i have installed 2 OF version 2.3 and the last blueCFD version, and i was looking for some like this, avoiding change the patch name manually, I'll try on both version.