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

[snappyHexMesh] Snappy : Multi-region meshing

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2012, 16:50
Default
  #21
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Aqua,

I believe that what you are looking for is this tutorial:
Code:
tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater
Study it and you should be able to create the desired mesh.

This thread should also be useful to you: http://www.cfd-online.com/Forums/ope...oth-parts.html

Best regards,
Bruno
hi, Bruno, Thank you so much for your reply. I will try that.
Cheers!

Aqua
aqua is offline   Reply With Quote

Old   January 9, 2012, 06:51
Default
  #22
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by Aurelien Thinat View Post
Hello Bruno,

Thank you for answering. I'll test the impact of the feature angles and of the tesselation of the stl file. I would be able to check if snappy is sensible to the triangle's size of the stl. I'll let you know about the results.

Then I don't think I can create a less complicated test case. I have already tested 2 cubes sharing 1 interface. This was successful. So now a cube inside another one seems like, to me at least, the natural next step.

I can upload the files if anyone wants them (even the whole case).

Aurélien
Hello Aurélien,

I am doing the same example: there are two cubes next to each other, cube1.stl and cube2.stl. but i couldn't make it to get the correct snappyhexmesh. Could you please, if possible, send me your case?
Thank you sooooo much!!!

Aqua
aqua is offline   Reply With Quote

Old   January 10, 2012, 08:08
Default
  #23
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 16
Aurelien Thinat is on a distinguished road
Hi Aqua,

You should have a look to the tutorial of snappyHexMesh for CHT solver. Copy/paste the case directory and change the .stl file by your own. Then edit the snappyHexMeshDict and change the name of the .stl file too.

I don't have my first test case anymore.

Aurélien
Aurelien Thinat is offline   Reply With Quote

Old   January 10, 2012, 10:18
Default
  #24
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by Aurelien Thinat View Post
Hi Aqua,

You should have a look to the tutorial of snappyHexMesh for CHT solver. Copy/paste the case directory and change the .stl file by your own. Then edit the snappyHexMeshDict and change the name of the .stl file too.

I don't have my first test case anymore.

Aurélien
Hello,Aurélien,
Thank you so much for your reply. what i did is:
1. modify the blockMeshDic to change the block;
2. put my iblock.stl and oblock.stl into the file "triSurface"
3. change bottomAir and topAir to iblock and oblock under the file "constant"
4. change regionProperties
5. change snappyHexMeshDict.
I would say, I did what i can think of. But only iblock has mesh, oblock doesn't....

Besides, there are some files named domain1 and domain2 created, I don't know why...

Even in the bounday file for iblock, something like this appeared:
iblock_to_domain1
{
type directMappedWall;
nFaces 1190;
startFace 127154;
sampleMode nearestPatchFace;
sampleRegion domain1;
samplePatch domain1_to_iblock;
offsetMode uniform;
offset (0 0 0);
}
iblock_to_domain2
{
type directMappedWall;
nFaces 2835;
startFace 128344;
sampleMode nearestPatchFace;
sampleRegion domain2;
samplePatch domain2_to_iblock;
offsetMode uniform;
offset (0 0 0);

I don't understand why something like iblock_to_domain2 would appear....

thank you so much!

Aqua
aqua is offline   Reply With Quote

Old   January 10, 2012, 10:22
Default
  #25
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 16
Aurelien Thinat is on a distinguished road
Yes, try to refine your blockMesh and the surface mesh of the stl.
Aurelien Thinat is offline   Reply With Quote

Old   January 10, 2012, 11:28
Default
  #26
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by Aurelien Thinat View Post
Yes, try to refine your blockMesh and the surface mesh of the stl.
Thank you so much for your reply. May I ask, which software do you use to edit stl file? I have proe, but it doesn't work...

Thank you!

Aqua
aqua is offline   Reply With Quote

Old   January 10, 2012, 11:30
Default
  #27
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 16
Aurelien Thinat is on a distinguished road
I used starccm+
Aurelien Thinat is offline   Reply With Quote

Old   January 10, 2012, 12:04
Default
  #28
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by Aurelien Thinat View Post
I used starccm+
Hello,
I tried starccm+ too, and created different boundaries for different surfaces. such as in the picture. Then right click "import", choose "export surface", to stl file. BUT, when I open the stl file in ICEM, all the boundaries disappeared and there is only ONE part, as you can see in another picture.

I am so struggling about this. Could you please tell me how to solve this?

Thank you so much!

Aqua
Attached Images
File Type: jpg 未命名.jpg (17.1 KB, 44 views)
File Type: jpg 11.jpg (34.3 KB, 57 views)
aqua is offline   Reply With Quote

Old   January 10, 2012, 12:22
Default
  #29
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 16
Aurelien Thinat is on a distinguished road
- You have to create 1 region per boundary.
- Then export each one in a different stl file "boundary1.stl" boundary2.stl" etc.
- Open each boundary*.stl, rename it "solid boundary1 (...) endsolid boundary1"
- Copy paste everything in "cube.stl" : it should look like :
'solid boundary1
...
endsolid boundary1
solid boundary2
...
endsolid boundary2
solid boundary3
...'

And relaunch SHM.
Aurelien Thinat is offline   Reply With Quote

Old   January 10, 2012, 16:50
Default
  #30
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by Aurelien Thinat View Post
- You have to create 1 region per boundary.
- Then export each one in a different stl file "boundary1.stl" boundary2.stl" etc.
- Open each boundary*.stl, rename it "solid boundary1 (...) endsolid boundary1"
- Copy paste everything in "cube.stl" : it should look like :
'solid boundary1
...
endsolid boundary1
solid boundary2
...
endsolid boundary2
solid boundary3
...'

And relaunch SHM.
Thank you so much!!!!! Finally I know how to do this!

All the best!!!

Aqua
aqua is offline   Reply With Quote

Old   January 11, 2012, 13:39
Default
  #31
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by Aurelien Thinat View Post
- You have to create 1 region per boundary.
- Then export each one in a different stl file "boundary1.stl" boundary2.stl" etc.
- Open each boundary*.stl, rename it "solid boundary1 (...) endsolid boundary1"
- Copy paste everything in "cube.stl" : it should look like :
'solid boundary1
...
endsolid boundary1
solid boundary2
...
endsolid boundary2
solid boundary3
...'

And relaunch SHM.
Hello,Aurélien,
I got it managed to modify the stl file(two blocks next to each other: iblock and oblock, see the attachment). And after SHM, there is no error. But the weired thing is:
-two time step files were created, 0.001 and 0.002(see the attachment), in which there was the file polyMesh. in the tutorial case, under constant/bottomAir, there is polyMesh, under constant/topAir, there is also the polyMesh, etc.
-so i copied the polyMesh in file 0.002 to constant and check it in paraFoam, seems like the mesh is ok (see the attachment) .

I am not sure whether the mesh is right or not. Could you please help on this question: why i didn't get polyMesh under constant/iblock/, but i got it in the file 0.002?

Also, in paraFoam, under Mesh Parts, there is no iblock faceZone, why?

Thank you so much!
Attached Images
File Type: jpg two.jpg (18.9 KB, 74 views)
File Type: jpg timestep.jpg (6.3 KB, 46 views)
File Type: jpg para.jpg (81.9 KB, 86 views)
aqua is offline   Reply With Quote

Old   January 12, 2012, 09:15
Default
  #32
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Hello,Aurélien,
after SHM, I run splitMeshRegions, then under the file 0.002, there are the two files named iblock and oblock, including their own polyMesh! Is that right now?
Thank you so much!
Aqua
aqua is offline   Reply With Quote

Old   January 12, 2012, 10:47
Default
  #33
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Aqua,

I believe that what you are looking for is this tutorial:
Code:
tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater
Study it and you should be able to create the desired mesh.

This thread should also be useful to you: http://www.cfd-online.com/Forums/ope...oth-parts.html

Best regards,
Bruno
Hi, Bruno,
I created a simple mesh for two stl files, named iblock.stl and oblock.stl. they are next to each other, having an interface.
But, do you remember what i want to do? I want to simulate two cars passing by each other, using moving mesh. So, the situation would be like in the picture as attachment. So, it's not a multiregion problem actually. there is only AIR. But in the case snappyMultiRegion, the mesh was created under each file named bottomAir, topAir, heater, leftsolid and right solid.
So, is there some way to put all the mesh in one file? in my case, it will be, how i can put polyMesh under iblock, and polyMesh under oblock together as in one polyMesh?
Thank you so much!

Aqua
aqua is offline   Reply With Quote

Old   January 15, 2012, 09:33
Default
  #34
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Aqua,

Well, since you wanted two strictly defined environments, I thought that the easiest way would be to use the multi-region feature in snappyHexMesh.

OK, since you don't need a multi-region, then all you need is the two cubes representing the cars. Then just define the location point on the outer volume surrounding both cars.
As for having that wall dividing the two sides of the mesh, you don't need to strictly define it with an STL file; you can simply define the outer bounding box in two connected parts in the "blockMeshDict" file. snappyHexMesh will only change that mesh if the cubes are too close to that zone.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 15, 2012, 17:14
Default
  #35
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Aqua,

Well, since you wanted two strictly defined environments, I thought that the easiest way would be to use the multi-region feature in snappyHexMesh.

OK, since you don't need a multi-region, then all you need is the two cubes representing the cars. Then just define the location point on the outer volume surrounding both cars.
As for having that wall dividing the two sides of the mesh, you don't need to strictly define it with an STL file; you can simply define the outer bounding box in two connected parts in the "blockMeshDict" file. snappyHexMesh will only change that mesh if the cubes are too close to that zone.

Best regards,
Bruno
Hello Bruno,
thank you so much for your reply. Sorry that I didn't make it clear: I have two cars, which would pass by each other in the simulation. Since I will use moving mesh, so, there has to be another two boxes, containing the two cars, and the two boxes will move towards each other. Like in the attachment:
icube and ocube stand for the two cars. block1 contains icube, block2 contains ocube. interface between block1 and block2 will be set as GGI, and block1 and block2 will move towards each other...
Do you have some good idea? Thank you so much!
Aqua
Attached Images
File Type: jpg two blocks with two cubes.jpg (18.7 KB, 53 views)
aqua is offline   Reply With Quote

Old   January 15, 2012, 17:24
Default
  #36
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Aqua,

OK, then let's step back and look at existing examples. Which tutorial are you basing yourself for your case? Namely, which tutorial(s) are you going to base yourself for GGI?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 15, 2012, 17:56
Default
  #37
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Hi, Bruno,
For GGI, I want to use the tutorial "turbopassengerotating" in OF16ext. But I have to use SHM for the complicated cars. So, currently i am looking for how to creat the mesh first...
thank you!
Aqua
aqua is offline   Reply With Quote

Old   January 15, 2012, 19:55
Default
  #38
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Aqua,

OK, the tutorial you are talking about is "incompressible/icoDyMFoam/turboPassageRotating". I haven't tested my theory yet, but I propose the following procedure:
  1. You create a "blockMeshDict" that has the two environments in a single box.
  2. Still on that "blockMeshDict", create "overlapGgi interface1" and "overlapGgi interface2" that define the wall that separates the two outer/environment boxes.
  3. After running blockMesh, you can now simply have the two cars in STL format and run snappyHexMesh! snappyHexMesh should be able to generate the surrounding mesh and preserve the wall between them!
Any other missing feature can later be generated by either using topoSet or setSet.

If creating the separation wall leads to snappyHexMesh only generating the mesh on one side, then remove that separation wall from "blockMeshDict". You can recreate that wall after the mesh has been created with snappyHexMesh, simply by using topoSet or setSet and/or createPatch.
It might also be possible to simply skip the dedicated separation wall if you create the cellZones manually... which again, you can create with at least setSet.

If you don't know how to use setSet, run it and type in the command:
Code:
help
Good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 16, 2012, 05:39
Default
  #39
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 15
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Aqua,


OK, the tutorial you are talking about is "incompressible/icoDyMFoam/turboPassageRotating". I haven't tested my theory yet, but I propose the following procedure:
  1. You create a "blockMeshDict" that has the two environments in a single box.
  2. Still on that "blockMeshDict", create "overlapGgi interface1" and "overlapGgi interface2" that define the wall that separates the two outer/environment boxes.
  3. After running blockMesh, you can now simply have the two cars in STL format and run snappyHexMesh! snappyHexMesh should be able to generate the surrounding mesh and preserve the wall between them!
Any other missing feature can later be generated by either using topoSet or setSet.

If creating the separation wall leads to snappyHexMesh only generating the mesh on one side, then remove that separation wall from "blockMeshDict". You can recreate that wall after the mesh has been created with snappyHexMesh, simply by using topoSet or setSet and/or createPatch.
It might also be possible to simply skip the dedicated separation wall if you create the cellZones manually... which again, you can create with at least setSet.

If you don't know how to use setSet, run it and type in the command:
Code:
help
Good luck!
Bruno
Morning Bruno,
thank you so much for your reply!
Yes, for me the situation would be: "snappyHexMesh only generating the mesh on one side".
Another thing I want to confirm is, when you said " create a "blockMeshDict" that has the two environments in a single box." sorry I don't understand this part:
blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) .....
);
you see, I may creat two hex as the outer envirment boxes. so there will be two hex boxed. But how to "creat them in a single box"?
Thank you so much!
aqua is offline   Reply With Quote

Old   January 16, 2012, 17:15
Default
  #40
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Aqua,

Unfortunately I'm not experienced enough on this subject. My guess is that you should generate the mesh in two steps:
  1. Generate the mesh as if you weren't going to use GGI.
  2. Then after the mesh is completely made, use one (or more) of the mesh manipulation utilities, such as createPatch, topoSet or setSet.
I also suggest that you post your question in the forum at http://www.extend-project.de/ - simply because there you should find more people dedicated to using OpenFOAM 1.6-ext and GGI!

Good luck!
Bruno
__________________
wyldckat 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
How I can introduce my power heat (W) in chtMultiRegionFoam? aminem OpenFOAM Pre-Processing 32 August 29, 2019 03:23
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[snappyHexMesh] New multi region meshing tutorial with sHM Tobi OpenFOAM Meshing & Mesh Conversion 0 November 24, 2014 18:42
[snappyHexMesh] Snappy. Mesh region between 2 concentric stls be_inspired OpenFOAM Meshing & Mesh Conversion 3 May 20, 2014 14:21
[snappyHexMesh] How to generate geometry - multi region stl, obj wersoe OpenFOAM Meshing & Mesh Conversion 0 June 1, 2013 04:02


All times are GMT -4. The time now is 22:44.