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

[blockMesh] Meshing a "triangle" with blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2020, 13:04
Default Meshing a "triangle" with blockMesh
  #1
New Member
 
Marc Batlle
Join Date: Mar 2017
Posts: 9
Rep Power: 9
Marc Batlle is on a distinguished road
Good afternoon Foamers,

These days I am facing problems to mesh a triangular shape together with rectangle the way I want. I think the best explanation comes with a representative sketch.

I attach two images, the "OP_1" is what I am looking for, and, the "OP_2" what I obtain.

I already tried to mergePatchPair unsuccesfully, wondered about splitMesh but dismissed due to a lack of information ..

Any help is welcomed
Attached Files
File Type: pdf OP_1.pdf (32.2 KB, 142 views)
File Type: pdf OP_2.pdf (32.2 KB, 95 views)
Marc Batlle is offline   Reply With Quote

Old   April 2, 2020, 17:48
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Any blockMeshDict, which doesn't work? Working over it might help.
HPE is offline   Reply With Quote

Old   April 3, 2020, 03:53
Default
  #3
Member
 
Bram Kerkhofs1
Join Date: Oct 2016
Posts: 30
Rep Power: 10
brammekeuh987 is on a distinguished road
Hi Marc

I would make two meshes: A rectangle (block1) and a parallelogram (block2). Then try to cut the parallelogram in 2, in order to get the triangle.

Cutting the mesh up, you can use splitMesh. To figure out how it works, type splitMesh -help in your terminal.
There you see something like this :
Code:
Usage: splitMesh [OPTIONS] <faceSet> <master> <slave> 
Arguments:
<faceSet>         The faces used for splitting                                                                          
<master>          The master patch name                                                                                 
<slave>           The slave patch name                                                                                
Options:                                                                                                                  
-case <dir>       Specify case directory to use (instead of the cwd)                                                    
-overwrite        Overwrite existing mesh/results files                                                                 
-doc              Display documentation in browser                                                                      
-help             Display short help and exit                                                                           
-help-compat      Display compatibility options and exit                                                                
-help-full        Display full help and exit                                                                                                                                                                                                  Splits mesh by making internal faces external at defined faceSet
At the top it says how to use it, completely on the bottom it says what it does. As you see, you need to get a faceSet.
You can use setSet for this, or topoSet. setSet does the same as topoSet, but if you google the topoSet wiki, it has a more complete explanation regarding the possibilities.
In order to define the domain, you can use a searchableBox, and make it of the dimensions so all the cells of the triangle are in there, and than filter the right faces out. I would do something like this:

cellSet of all cells in the triangle
cellSet inverted version of above cells (to invert it, you first need to copy it, and than invert it)
faceSet of the first cellSet
faceSet of the second cellSet
faceSet subset of first cellSet with second cellSet

So cut the mesh, and than use stitchMesh to stitch it.

Hope this helps!
brammekeuh987 is offline   Reply With Quote

Old   April 3, 2020, 05:52
Default
  #4
Member
 
Franco Marra
Join Date: Mar 2009
Location: Napoli - Italy
Posts: 70
Rep Power: 17
francescomarra is on a distinguished road
Dear Marc,

a possible solution could be to split the triangle (that is the real problem) into three subfigures as in the attached picture.

Best regards,

Franco

TriangleMesh.png
francescomarra is offline   Reply With Quote

Old   April 3, 2020, 11:40
Default
  #5
New Member
 
Marc Batlle
Join Date: Mar 2017
Posts: 9
Rep Power: 9
Marc Batlle is on a distinguished road
Hello again and thanks for your replies,

I have been working on Bram's answer without success for the moment.

As requested, I attach a simple case only meshing the "triangle" which initially I define as a parallelogram with only 4 cells for simplicity. A topoSetDict file can also be found in /system with my interpretation from Bram's suggestions.

Thanks again.
Attached Files
File Type: gz case.tar.gz (3.7 KB, 37 views)
Marc Batlle is offline   Reply With Quote

Old   May 13, 2022, 14:31
Default
  #6
New Member
 
M. Constanza Sadino Riquelme
Join Date: May 2022
Posts: 1
Rep Power: 0
sadinori is on a distinguished road
Hello Marc,

I want to create a similar mesh. Could you find a strategy for this?

Thank you
sadinori is offline   Reply With Quote

Old   November 25, 2022, 14:08
Default
  #7
New Member
 
Gerardo Zegers
Join Date: Apr 2015
Posts: 4
Rep Power: 11
Gzegers is on a distinguished road
Hi,

I was having the same issue and solved the problem using francescomarra solution! Here is my blockmesdict.

Best,

Gerardo

----

/*--------------------------------*- C++ -*----------------------------------*\n| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 2.3.1 |
| \ / A nd | Web: www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(0.143424 0.143292 -6.949927463502417)//0
(1.000188 0.143292 -6.949927463502417)//1
(1.000188 1.856396 -6.949927463502417)//2
(0.143424 1.856396 -6.949927463502417)//3
(0.143424 0.143292 -6.589941731751209)//4
(0.7145999999999999 0.143292 -6.709936975668278)//5
(0.7145999999999999 1.856396 -6.709936975668278)//6
(0.143424 1.856396 -6.589941731751209)//7
(0.143424 0.143292 -6.229956)//8
(1.000188 0.143292 -6.589941731751208)//9
(1.000188 1.856396 -6.589941731751208)//10
(0.143424 1.856396 -6.229956)//11
(1.856952 0.143292 -6.949927463502417)//12
(1.856952 1.856396 -6.949927463502417)//13
);
blocks
(
hex ( 3 2 6 7 0 1 5 4) fluido (8 8 3)
simpleGrading (1 1 1 )
hex (7 6 10 11 4 5 9 8) fluido (8 8 3)
simpleGrading (1 1 1 )
hex (2 13 10 6 1 12 9 5) fluido (8 8 3)
simpleGrading (1 1 1 )
);

edges
(
);

boundary
(

);

mergePatchPairs
(
);

// ************************************************** *********************** //
Attached Images
File Type: jpg Screenshot from 2022-11-25 11-05-39.jpg (59.2 KB, 60 views)
Gzegers is offline   Reply With Quote

Reply

Tags
blockmesh, mergepatchpair, splitmesh, triangle


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
[ANSYS Meshing] Cooper Method Meshing RTN3000 ANSYS Meshing & Geometry 1 March 2, 2015 00:59
[ANSYS Meshing] Meshing strategy for External Flows Hybrid ANSYS Meshing & Geometry 0 January 24, 2012 15:27
[blockMesh] error Meshing a 3D cube geometry with blockMesh GodOfLove OpenFOAM Meshing & Mesh Conversion 5 July 14, 2009 16:30
Best Meshing scheme for Cylinder Nutrex Main CFD Forum 4 July 29, 2008 12:03
Volume Meshing & Face Meshing? singularity of grid ken FLUENT 0 September 4, 2003 12:08


All times are GMT -4. The time now is 00:46.