CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   SnappyHexMesh and locationinMesh (http://www.cfd-online.com/Forums/openfoam/95831-snappyhexmesh-locationinmesh.html)

aqua January 4, 2012 12:44

SnappyHexMesh and locationinMesh
 
1 Attachment(s)
Dear all,
I have a problem that i couldn't solve for a long time. It's like this:
as you can see in the attachment, there are block1 and block2. there is also a cube in each block. So, what I will do is, making the two blocks to move passing by each other.the two cubes stand for cars.
The problems is:
if the LocationInMesh is defined inside block1, then after snappyHexMesh, block2 will disappear. Vice versa.
the boundary file is like:
(
inlet
{
type patch;
nFaces 1600;
startFace 5785353;
}
outlet
{
type patch;
nFaces 0;
startFace 5786953;
}
fixedWalls
{
type wall;
nFaces 0;
startFace 5786953;
}
movingwalls
{
type patch;
nFaces 6400;
startFace 5786953;
}
interface1
{
type patch;
nFaces 1600;
startFace 5793353;
}
interface2
{
type patch;
nFaces 0;
startFace 5794953;
}
cubes_ICUBE
{
type wall;
nFaces 98304;
startFace 5794953;
}
ocube_OCUBE
{
type wall;
nFaces 0;
startFace 5893257;
}
)
so you can see, for outlet, fixedwalls, interface2 and ocube-OCUBE, nFaces=0!!!! (locationInMesh is defined in block1)
Can someone help me on this please? Thank you so much!

Aqua

wyldckat January 4, 2012 17:26

Hi Aqua,

I'm just tying-in some loose ends for future readers...
For those reading this thread and wondering about the same question, Aqua also asked about this on another thread and I replied here: http://www.cfd-online.com/Forums/ope...tml#post337890 post #20

Best regards,
Bruno

aqua January 5, 2012 06:18

Quote:

Originally Posted by wyldckat (Post 337898)
Hi Aqua,

I'm just tying-in some loose ends for future readers...
For those reading this thread and wondering about the same question, Aqua also asked about this on another thread and I replied here: http://www.cfd-online.com/Forums/ope...tml#post337890 post #20

Best regards,
Bruno

Dear Bruno,
I just looked through the snappymultiRegion case. And I would like to confirm one thing with you: in my case (please have a look at the picture above in my post), I don't need the mesh inside the cubes, which stand for cars. The simulation is aimed to simulat the air flow when the two cubes(cars) pass by each other. So could you please confirm that, the snappymultyRegion case is what i need? Thank you so much!

wyldckat January 5, 2012 06:26

Hi Aqua,

Then why do you need the two outer boxes? Why not just one single open space and the two blocks/cars?

Nonetheless, if you do need 2 regions (dynamic mesh motion perhaps?), then you can still use snappyHexMesh and then remove the meshes inside the car blocks. Using setSet might be a good option for removing said cells.

Look here in the forum for my nickname and setSet. Or look for setSet at openfoamwiki.net!

Best regards,
Bruno

aqua January 5, 2012 06:55

Quote:

Originally Posted by wyldckat (Post 337957)
Hi Aqua,

Then why do you need the two outer boxes? Why not just one single open space and the two blocks/cars?

Nonetheless, if you do need 2 regions (dynamic mesh motion perhaps?), then you can still use snappyHexMesh and then remove the meshes inside the car blocks. Using setSet might be a good option for removing said cells.

Look here in the forum for my nickname and setSet. Or look for setSet at openfoamwiki.net!

Best regards,
Bruno

Dear Bruno,
Thank you so much for your quick reply! and yes, I do need dynamic mesh motion, that's why I have two blocks. Ok, I will try to use the multiRegion case and see whether I can make it.
All the best!
Aqua

aqua January 5, 2012 09:14

Quote:

Originally Posted by wyldckat (Post 337957)
Hi Aqua,

Then why do you need the two outer boxes? Why not just one single open space and the two blocks/cars?

Nonetheless, if you do need 2 regions (dynamic mesh motion perhaps?), then you can still use snappyHexMesh and then remove the meshes inside the car blocks. Using setSet might be a good option for removing said cells.

Look here in the forum for my nickname and setSet. Or look for setSet at openfoamwiki.net!

Best regards,
Bruno

Dear Bruno,
I got another question. In the snappyMultiRegion case, there is only one block. but what i need is, two blocks containing the cube, moving towards each other...so the blocks will move with GGI interface between them.
I kind of feel confused about how to use the snappyMultiRegion case...
Could you please give me more suggestions?
Thank you so much!!!

wyldckat January 5, 2012 17:20

Hi Aqua,

I was assuming that you have the following geometry setup:
  • snappyHexMesh needs an outer bounding box to work with. This outer box will have inside it all other boxes.
    • 1 environment box for car 1
      • 1 box representing the car.
    • another environment box for car 2
      • the other box representing the car 2
This setup should be compatible with the tutorial case that I told you about. You should also look to the other tutorials that use dynamic meshes to get more ideas from them.

Best regards,
Bruno

aqua January 6, 2012 05:57

Quote:

Originally Posted by wyldckat (Post 338052)
Hi Aqua,

I was assuming that you have the following geometry setup:
  • snappyHexMesh needs an outer bounding box to work with. This outer box will have inside it all other boxes.
    • 1 environment box for car 1
      • 1 box representing the car.
    • another environment box for car 2
      • the other box representing the car 2
This setup should be compatible with the tutorial case that I told you about. You should also look to the other tutorials that use dynamic meshes to get more ideas from them.

Best regards,
Bruno

Dear Bruno,
Thank you so much for your reply, I understand your idea: the two environment boxes will move towards each other, with the two cars inside them, yes? Hopefully I will make it!
Cheers!
Aqua


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