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

Change a name in cellzones

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2024, 10:30
Default Change a name in cellzones
  #1
AJC
New Member
 
Pierre Lecanu
Join Date: Mar 2024
Posts: 4
Rep Power: 2
AJC is on a distinguished road
In my “cellZones” file in the “constant/polyMesh” directory, the name is defined as “movingZone0”.
I would like to change the name movingZone0 to movingZone1.
I think I need to create a file topoSetDict
Can you help me create this file? Thanks


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2406 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
arch "LSB;label=32;scalar=64";
class regIOobject;
location "constant/polyMesh";
object cellZones;
meta
{
names 1 ( movingZone0 );
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

1
(movingZone0
{
type cellZone;
cellLabels List<label>
1682
(
0
1
AJC is offline   Reply With Quote

Old   November 7, 2024, 04:17
Default
  #2
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20
JNSN is on a distinguished road
you can change the entry directly in the file, just rename with a text editor
JNSN is offline   Reply With Quote

Old   November 7, 2024, 05:02
Default
  #3
AJC
New Member
 
Pierre Lecanu
Join Date: Mar 2024
Posts: 4
Rep Power: 2
AJC is on a distinguished road
Thank you

Of course, it's possible to make the changes with a text editor. But you'll have to do it every time.
In the Allrun.pre file, I've inserted
cd constant/polyMesh
sed -i “y/movingZone0/movingZone1/” cellZones
cd .. && cd ..
AJC is offline   Reply With Quote

Reply

Tags
cellzones, cellzoneset


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
[snappyHexMesh] SHM doesn't create cellZones for one region Eko OpenFOAM Meshing & Mesh Conversion 10 January 24, 2018 03:03
change the under-relaxation factors hotboy FLUENT 4 May 28, 2015 23:25
No density change - rhoSimplecFoam krapic OpenFOAM 1 November 29, 2014 19:39
DecomposePar and CellZones Anne Lincke OpenFOAM 4 October 13, 2010 10:18
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


All times are GMT -4. The time now is 13:43.