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

[blockMesh] Adding an Internal Wall

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Alczem
  • 1 Post By GerhardHolzinger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2024, 16:45
Default Adding an Internal Wall
  #1
New Member
 
Christoph Trier
Join Date: Mar 2024
Posts: 12
Rep Power: 2
Lorddrinkalot is on a distinguished road
Hey,

I am new to OpenFOAM and I would like to create an internal wall. I have already finished the blockMeshDict and wanted to add a wall between two blocks, but apparently this is not possible (marked it in red in the code). So, I searched around and came across createBafflesDict and this great video. https://www.youtube.com/watch?v=7Ex1RHDQqIc&t=1s

But I need to name the face to create a baffle to create my internal wall. At this point, I thought I would just ask here in parallel to my further search because all I want is to create an internal wall between two blocks to create a boundary condition.
An image is attached.

Hopefully, one of you can help me further.

Best regards,
Christoph

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2212                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale   0.001;

vertices
(
    (0 0 0)
	(566.5 0 0)
    (851 0 0)
    (1133 0 0)
    (0 214 0)
	(566.5 214 0)
    (851 214 0)
    (1133 214 0)
    (0 369.6 0)
    (566.5 369.6 0)
    (851 369.6 0)
	(1133 369.6 0)
    (566.5 1850.5 0)
    (851 1850.5 0)
    (1133 1850.5 0)
	(566.5 2135 0)
	(851 2135 0)
    (1133 2135 0)
	(0 0 161.6)
	(566.5 0 161.6)
    (851 0 161.6)
    (1133 0 161.6)
    (0 214 161.6)
	(566.5 214 161.6)
    (851 214 161.6)
    (1133 214 161.6)
    (0 369.6 161.6)
    (566.5 369.6 161.6)
    (851 369.6 161.6)
	(1133 369.6 161.6)
    (566.5 1850.5 161.6)
    (851 1850.5 161.6)
    (1133 1850.5 161.6)
	(566.5 2135 161.6)
	(851 2135 161.6)
    (1133 2135 161.6)

);

blocks
(
    hex (0 1 5 4 18 19 23 22) (30 20 20) simpleGrading (1 1 1)
	hex (1 2 6 5 19 20 24 23) (20 20 20) simpleGrading (1 1 1)
	hex (2 3 7 6 20 21 25 24) (20 20 20) simpleGrading (1 1 1)
	hex (4 5 9 8 22 23 27 26) (30 15 20) simpleGrading (1 1 1)
	hex (5 6 10 9 23 24 28 27) (20 15 20) simpleGrading (1 1 1)
	hex (6 7 11 10 24 25 29 28) (20 15 20) simpleGrading (1 1 1)
	hex (9 10 13 12 27 28 31 30) (20 60 20) simpleGrading (1 1 1)
	hex (10 11 14 13 28 29 32 31) (20 60 20) simpleGrading (1 1 1)
	hex (12 13 16 15 30 31 34 33) (20 20 20) simpleGrading (1 1 1)
	hex (13 14 17 16 31 32 35 34) (20 20 20) simpleGrading (1 1 1)

);



boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 18 22 4)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (4 22 26 8)
        );
    }
	//internalwall
	//{
	//	type wall;
	//	faces
	//	(
	//		(4 22 23 5)
	//		(5 23 24 6)
	//		(6 24 28 10)
	//		(10 28 31 13)
	//	);
	//}
    wall_out
    {
        type wall;
        faces
        (
            (0 1 19 18)
			(1 2 20 19)
			(2 3 21 20)
			(3 7 25 21)
			(7 11 29 25)
			(11 14 32 29)
			(14 17 35 32)
			(17 16 34 35)
			(16 15 33 34)
			(12 30 33 15)
			(9 27 30 12)
			(8 26 27 9)
        );
    }
	Wall_side
	{
		type wall;
		faces
		(
		(18 19 23 22)
		(19 20 24 23)
		(20 21 25 24)
		(22 23 26 27)
		(23 24 28 27)
		(24 25 29 28)
		(27 28 31 30)
		(28 29 32 31)
		(30 31 34 33)
		(31 32 35 34)
		(1 0 4 5)
		(2 1 5 6)
		(3 2 6 7)
		(4 8 9 5)
		(5 9 10 6)
		(6 10 11 7)
		(9 12 13 10)
		(10 13 14 11)
		(12 15 16 13)
		(13 16 17 14)
		);	
	}
);


// ************************************************************************* //
Attached Images
File Type: jpg experiment_geometrie.jpg (19.4 KB, 17 views)
Lorddrinkalot is offline   Reply With Quote

Old   April 10, 2024, 04:35
Default
  #2
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Hey!


If you have created faces at the location of the internal mesh, you can use topoSet to create a new faceZone that includes these faces. Once the faceZone has been created, the utility createBaffles will duplicate the faces to create two patches (usually called master and slave, similar to a wall and its shadow wall in Fluent).


You should end up with two patches overlapping but with normals pointing the opposite way. Use whatever boundary condition you need then. Watch out if you use the option -overwrite when using createBaffles if you intend to keep the original mesh.
Lorddrinkalot likes this.
Alczem is offline   Reply With Quote

Old   April 10, 2024, 05:10
Default
  #3
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
blockMesh itself does not support internal walls. Do your self a favour, and do not try to achieve something with internal walls, what you can achieve with ordinary walls.


I have overlaid your image of the geometry with a block-structure, that consists of connected and unconnected blocks. If you modify your blockMeshDict accordingly, you turn your internal wall into an ordinary wall, which blockMesh is perfectly happy to provide you with.
Attached Images
File Type: jpg experiment_geometrie_blockStructure.jpg (50.2 KB, 23 views)
Lorddrinkalot likes this.
GerhardHolzinger is offline   Reply With Quote

Old   April 10, 2024, 11:52
Default
  #4
New Member
 
Christoph Trier
Join Date: Mar 2024
Posts: 12
Rep Power: 2
Lorddrinkalot is on a distinguished road
Hey,

Really thanks to Gerhard. Didn't think about it that way. This makes it much easier and I don't have to deal with creatbaffle and the rest. (for now)

Best regards,
Christoph
Attached Images
File Type: png L-shape mesh.PNG (51.9 KB, 11 views)
Lorddrinkalot is offline   Reply With Quote

Old   April 10, 2024, 12:02
Default
  #5
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
If the geometry allows for blocking, i.e., creating a representation or a good enough approximation of your geometry, then you can do great things with blockmesh.


Attached is a cut-away of a branching pipeline, all done using blockmesh and extrudemesh with a helping of stitchmesh. The forks and bends are blockmesh-creations, and the straight parts are simply extrusions.


There was also a bit of subset-ing and mirror-ing involved.






... anyways, blockmesh can do good things for you.
Attached Images
File Type: jpg complexPipeLines.jpg (70.3 KB, 13 views)
GerhardHolzinger is offline   Reply With Quote

Reply

Tags
internal wall


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
conjugateHeatFoam + interFoam farhagim OpenFOAM Programming & Development 15 July 19, 2016 08:55
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
[ICEM] Merge meshes with internal wall BrolY ANSYS Meshing & Geometry 20 February 20, 2013 11:43
BC for a permeable internal wall Andi-HH OpenFOAM Pre-Processing 6 April 24, 2012 11:39
[Commercial meshers] tmerge utility creates unwanted interface/walls comes in the final mesh Shoonya OpenFOAM Meshing & Mesh Conversion 11 January 20, 2012 07:23


All times are GMT -4. The time now is 16:13.