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

[mesh manipulation] erging of two regions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2016, 02:40
Default erging of two regions
  #1
New Member
 
Anton
Join Date: Aug 2016
Posts: 4
Rep Power: 5
foamaof is on a distinguished road
Dear foamers,

i am quite new in openfoam and have a problem with merging of two regions as you can see in pic 1. My real model is a bit more complex like this example, so i want to use a tetrahedral mesh. After i exported this model from salome to foam, i tried methods like stitchMesh to put the 2 from openfoam identified regions together, but it didn't work. A closer look to the connecting faces (pic 2) shows, that the faces of the thethadrons from the regions doesn't fit completely to each other (Maybe the reason for failure?). Does anybody have any idea, how to fix that problem? Or are there other ways to solve that? Thanks

Anton
Attached Images
File Type: jpg 1.jpg (80.7 KB, 41 views)
File Type: jpg 2.jpg (61.8 KB, 30 views)
foamaof is offline   Reply With Quote

Old   August 17, 2016, 05:58
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 388
Rep Power: 10
Antimony is on a distinguished road
Hi,

Have you tried stitchMesh with the -partial flag?

Best,
Antimony
Antimony is offline   Reply With Quote

Old   August 17, 2016, 08:18
Default
  #3
New Member
 
Anton
Join Date: Aug 2016
Posts: 4
Rep Power: 5
foamaof is on a distinguished road
Hi Antimony,

thanks for reply. I solved the problem in a strange way as follows (the interfaces are int1 of region 1 and int2 of region 2):

1. ideasUnvToFoam testmesh.unv
2. stitchMesh -overwrite -toleranceDict tolerance int1 int2. But first i have to hide or copy the T,u,p files from the 0-folder to an other folder (if i don't, i'll get the message:

--> FOAM FATAL IO ERROR:
Cannot find patchField entry for int1

file: C:/Users/Simulationen/testmesh/0/T.boundaryField from line 26 to line 36.)

3. open the boundary file in polyMesh and manually remove the int1 and int2 patches.
4. copy T,u and p back to 0-folder.
5. start the show with porousSimpleFoam

I don't unterstand the point 2. where i first have to hide the p,T,u files, before i can start stitchMesh. Or is there a more elegant way to stich 2 regions together?

Anton

Last edited by foamaof; August 18, 2016 at 16:16.
foamaof is offline   Reply With Quote

Old   August 17, 2016, 22:23
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 388
Rep Power: 10
Antimony is on a distinguished road
Hi,

Typically in your time folder, for each of your field files, you need to have all the patches that are named in constant/polyMesh/boundary to be present in the field files. If you don't then OF will throw an error. Even if the patch is meant to be intermediate and not in the final version, OF expects it to be in the field files.

From your naming, I would think int1 and int2 are the interfaces that will most likely 'disappear' when you stitch the two meshes. And since they would not be in the final version of the mesh on which you run the simulation, int1 and int2 would not have been mentioned in T, U, p etc. If you have a time directory, then int1 and int2 should be mentioned in them to ensure that stitchMesh runs. Renaming your time directory to time directory.something is a simple way to circumvent this issue (and which is what you have already figured out )

Hope this clarifies.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   August 18, 2016, 02:31
Default
  #5
New Member
 
Anton
Join Date: Aug 2016
Posts: 4
Rep Power: 5
foamaof is on a distinguished road
Hi,

aah okay, thank you for that advice As expected, I got another problem with stitchMesh. I can only mention one Masterpatch and one Slavepatch. Thats okay for two Regions with one interface (2 patches). But what can i do, if i have to stitch more than two patches (interfaces) together for example a cube inside another bigger cube. Is it possible to do that with stichMesh?

regards,
Anton
foamaof is offline   Reply With Quote

Old   August 18, 2016, 03:11
Default
  #6
Senior Member
 
Join Date: Aug 2013
Posts: 388
Rep Power: 10
Antimony is on a distinguished road
Hi,

Yes. In a rather roundabout way though.

Refer to my two posts (#24 and #25) here:

http://www.cfd-online.com/Forums/ope...sh-used-2.html

Cheers,
Antimony
Antimony is offline   Reply With Quote

Reply

Tags
merge, mesh, regions, salome, stitch

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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] multiple regions Tobi OpenFOAM Meshing & Mesh Conversion 56 March 29, 2020 04:53
multiRegionFoam with only solid regions stockzahn OpenFOAM Pre-Processing 2 October 18, 2018 10:32
[CAD formats] Clean / Repair STL file with multiple regions on command line matthiasd OpenFOAM Meshing & Mesh Conversion 6 May 24, 2016 06:51
Determining the calculation sequence of the regions in multe regions calculation peterhess OpenFOAM Running, Solving & CFD 4 March 9, 2016 03:07
chtMultiRegionFoam different properties in (fluid) region(s) volker1 OpenFOAM Pre-Processing 3 February 4, 2015 06:46


All times are GMT -4. The time now is 18:01.