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

[blockMesh] emove a cylinder from a cube

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2016, 11:03
Default emove a cylinder from a cube
  #1
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Hi
I want to simulate Free Convection flow of water over a circular cylinder as a practice.
How can I remove a cylinder from a cube?

Thanks friends
alimea is offline   Reply With Quote

Old   May 29, 2016, 17:57
Default
  #2
New Member
 
Marco Atzori
Join Date: Mar 2016
Posts: 22
Rep Power: 10
Atzori is on a distinguished road
Hi!

I'm not sure it is what you are looking for: try to use blockMesh with the attachment (I changed a little bit what I found in this post: http://www.cfd-online.com/Forums/ope...-cylinder.html)

Anyway, if I had to started from scratch, I would use Salome to obtain an .stl and Snappy or cfMesh for the mesh.

Cheers!
Attached Files
File Type: txt blockMeshDict.txt (5.5 KB, 23 views)
Atzori is offline   Reply With Quote

Old   May 30, 2016, 03:36
Default
  #3
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Atzori View Post
Hi!

I'm not sure it is what you are looking for: try to use blockMesh with the attachment (I changed a little bit what I found in this post: http://www.cfd-online.com/Forums/ope...-cylinder.html)

Anyway, if I had to started from scratch, I would use Salome to obtain an .stl and Snappy or cfMesh for the mesh.

Cheers!
Hi Marco
Thanks a lot for your cooperation!
It works well and I can see the Mesh.
I'm a beginner in openFoam. I know about Verticies, blocks, edges but not about patches! What are patches? in fact why do we use patch command in blockMeshDict?
In addition, could you please explain how to create this mesh by that code?

Thanks a lot
alimea is offline   Reply With Quote

Old   May 30, 2016, 04:04
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

Patches are basically faces on which usually boundary conditions are applied for the problem that you are solving. It is the generic term for faces on which BCs will be applied.

While patch is the generic term, there are instance when you might want to be more specific about the type of patch the face is, e.g. wall, symmetry etc.

You can read more about it here (under the section on boundary): http://cfd.direct/openfoam/user-guide/blockMesh/

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   May 30, 2016, 04:19
Default
  #5
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Hi Antimony!!
of course it was helpful. but in the page you introduce me, there is a code that has boundary, not patches:


boundary // keyword
(
inlet // patch name
{
type patch; // patch type for patch 0
faces
(
(0 4 7 3) // block face in this patch
);
} // end of 0th patch definition
outlet // patch name
{
type patch; // patch type for patch 1
faces
(
(1 2 6 5)
);
}
walls
{
type wall;
faces
(
(0 1 5 4)
(0 3 2 1)
(3 7 6 2)
(4 5 6 7)
);
}
);


while, in the code that is sent to me by my friend Marco Atzori (top of this page) we have patches instead of boundaries!

patches
(
symmetryPlane down
(
(42 43 56 55)
(41 42 55 54)
(43 50 63 56)
(50 49 62 63)
)
patch right
(
(2 3 22 21)
(3 6 25 22)
(2 38 51 21)
(38 41 54 51)
)
symmetryPlane up
(
(7 8 27 26)
(6 7 26 25)
(8 18 37 27)
(18 17 36 37)
)
patch left
(
(14 13 32 33)
(17 14 33 36)
(46 13 32 59)
(49 46 59 62)
)
symmetryPlane cylinder
(
(10 5 24 29)
(5 0 19 24)
(16 10 29 35)
(11 16 35 30)
(45 40 53 58)
(40 0 19 53)
(48 45 58 61)
(11 48 61 30)
)
);


why?
whats difference?


Thanks my dear friend
alimea is offline   Reply With Quote

Old   May 30, 2016, 05:49
Default
  #6
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

I don't think there is a difference. I think "patches" at that location is from an older version of OF, while "boundary" is the one that has been around from OF 2.1.x (at least that is how long I can remember it being there). The one sent by Atzori seems to be from OF 1.5, though I could be wrong about that.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   May 30, 2016, 05:55
Default
  #7
New Member
 
Marco Atzori
Join Date: Mar 2016
Posts: 22
Rep Power: 10
Atzori is on a distinguished road
Hi!
Antimony's perfectly right: I took the example directly from the previous post and it is an old version: I suppose that a sort of partial redundancy is adopted because I managed to compile the attachment in OF 2.2 (the attachment, what you have post later differs from the presence of the “symmetryPlane”), but I recognise now the difference with the current standard: I’m writing a new dict, just one sec: I notice that “front” and “back” are not included in the boundary and it takes some min to add them
Atzori is offline   Reply With Quote

Old   May 30, 2016, 06:14
Default
  #8
New Member
 
Marco Atzori
Join Date: Mar 2016
Posts: 22
Rep Power: 10
Atzori is on a distinguished road
Hi!

It is better now

Notice that the "empty type" is mandatory in that case for frontAndBack since it is a 2D case.

Cheers!
Attached Files
File Type: txt blockMeshDict.txt (6.4 KB, 7 views)
Atzori is offline   Reply With Quote

Old   May 30, 2016, 10:27
Default
  #9
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Thanks dear friends. You helped me a lot!

Best Regards...
alimea is offline   Reply With Quote

Reply

Tags
free convection, openfoam


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
Flow past a 2D cylinder - High Re (1E+05) - Cd too high Pervispasco OpenFOAM Running, Solving & CFD 4 March 14, 2022 03:19
Drag force coefficient too high for a flow past a cylinder using komega sst Scabbard OpenFOAM Running, Solving & CFD 37 March 21, 2016 17:16
Forces Acting on a Rotating Cylinder (Moving Mesh) dreamchaser CFX 5 April 25, 2015 07:01
Gambit help: Cube inside cube Jack Martinez FLUENT 13 August 11, 2010 07:29
[blockMesh] Specifying boundary faces failes in blockMesh blaise OpenFOAM Meshing & Mesh Conversion 0 May 10, 2010 04:56


All times are GMT -4. The time now is 12:49.