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

[mesh manipulation] Creating cellSets bases on existing regions

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By nope

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2020, 03:55
Default Creating cellSets bases on existing regions
  #1
New Member
 
Join Date: Nov 2017
Posts: 11
Rep Power: 8
nope is on a distinguished road
Hello everyone

I've already found a lot of information regarding the creation of regions, cellSets and cellZones. However I haven't found a nice solution for my problem.

In an automated workflow I use mergeMeshes to merge multiple meshes together. The goal is to have a cellZone for each mesh that got merged.
The mergeMeshes utility will merge the meshes and create a region (region0, region1, ...) for each of the merged meshes. The simplest way I've found to convert the regions into cellZones is the following:

Code:
splitMeshRegions -makeCellZones -overwrite
This will create a cellZone for each region. The cellZones are named region0, region1, ... which I don't like. Additionally this will create a file "cellToRegion" in the 0 directory which I don't want and need.

A prefered way would be the following:
  1. create a cellSet for each region and give the cellSet a specific name
  2. use topoSet to convert the cellSets into cellZones with specific names

The second point is no problem, the first point seems to be more tricky. If I run checkMesh, this will be done and the cellSets are named region0, region1, ... but running checkMesh at this point is a waste of time in this workflow. I also took a look at setSet, but couldn't find a command that uses regions.
How can I create cellSets for each existing region?

Thank you in advance, regards
nope
Zane likes this.
nope is offline   Reply With Quote

Old   November 16, 2023, 09:03
Default
  #2
New Member
 
Shenhui Ruan
Join Date: Nov 2021
Location: Karlsruhe
Posts: 12
Rep Power: 4
fly_light is on a distinguished road
Hi nope,

maybe the reply is very delayed. But I think you can create stl files for each mesh and then use
HTML Code:
searchableSurfaceToCell
to create cellset for each of them. And then employ
HTML Code:
setToCellZone
to create cellzone.

Also, I have written a code that can merge multiple meshes simultaneously. I have tested it, and it works very quickly and efficiently even for more than ten thousand meshes. Here is the link. But I didn't put a test case inside, and maybe I will add it later. Anyone who needs it can contact me.

I hope it will be useful for others with the same needs.

best!
fly_light is offline   Reply With Quote

Reply


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
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 15:33
Creating new boundary conditions from existing ones rassilon OpenFOAM Running, Solving & CFD 0 February 12, 2010 02:43
Creating new mesh from existing mesh az_f ANSYS Meshing & Geometry 5 January 18, 2010 23:12
Problems with Meshing: Collapsed Cells Emmanuel Resch Siemens 1 July 30, 2007 03:02
creating spline along existing line cell? guang ai Siemens 3 September 4, 2006 02:33


All times are GMT -4. The time now is 20:48.