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

[blockMesh] Problems in creating a wedge type mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2015, 08:25
Default
  #21
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Gareth,

perhaps a bit late, but (7 8 17 16) is no proper defined face.
7 and 16, and 8 and 17 define the same points in your blockMesh.

greetings
Alex
alexB is offline   Reply With Quote

Old   May 13, 2015, 06:28
Default
  #22
New Member
 
Adkar
Join Date: Apr 2015
Posts: 18
Rep Power: 11
adkar is on a distinguished road
If you want 2d mesh, set the same points again like follows.
vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
);
adkar is offline   Reply With Quote

Old   May 14, 2015, 05:10
Default
  #23
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Adkar,

I don't know where you are referring to...

But your idea won't work.
If you want to set up a two-dimensional case you still have to make your mesh three-dimensional, but define the front and back boundaries as empty boundaries.

Just have a look at the cavity tutorial /incompressible/icofoam/cavity

regards
Alex
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   October 16, 2015, 03:28
Default
  #24
New Member
 
Adkar
Join Date: Apr 2015
Posts: 18
Rep Power: 11
adkar is on a distinguished road
Quote:
Originally Posted by adkar View Post
If you want 2d mesh, set the same points again like follows.
vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
);
Yeah..i was wrong. Sorry for the inconvinence.

Last edited by adkar; October 20, 2015 at 05:59.
adkar is offline   Reply With Quote

Old   November 2, 2015, 09:58
Default Negative pyramid volume
  #25
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 13
vigneshTG is on a distinguished road
Hello everyone,

I made my own axi-symmetric mesh in 2D following the steps listed in this page. I get these warnings ...

Code:
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -1.13485e-07 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -5.67424e-08 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -5.67424e-08 for face 3
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -5.67424e-08 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -5.67424e-08 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 255
    negative volume block : 0, probably defined inside-out
Can somebody tell me what i am doing wrong ??

here is the blockMeshDict file
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1.0;
// a- 0.024976
//b- 0.0010905
vertices
(
    (0 0 0)                 // pt_0
    (0.024976 0 0.0010905)         // pt_1
    (0.024976 0.0125 0.0010905)     // pt_2
    (0 0.0125 0)                 // pt_3
    (0.024976 0 -0.0010905)           // pt_4
    (0.024976 0.0125 -0.0010905)       // pt_5

);

blocks
(
    hex (0 4 1 0 3 5 2 3) (20 1 20) simpleGrading (1 1 1)
//    hex (0 1 4 0 3 2 5 3) (20 20 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
     front
     { 
           type wedge;
           faces  
           (
               (0 1 2 3)
           );
      }
     back
     { 
           type wedge;
           faces  
           (
               (0 3 5 4)
           );
      }
     right
     { 
           type wall;
           faces  
           (
               (1 4 5 2)
           );
      }
    bottom
     { 
           type wall;
           faces  
           (
               (0 4 1 0)
           );
      }
     top
     { 
           type wall;
           faces  
           (
               (3 5 2 3)
           );
      }
     axis
     { 
           type empty;
           faces  
           (
               (0 3 3 0)
           );
      }
);
 
mergePatchPairs
(
);
// ************************************************************************* //
__________________
Thanks and Regards

Vignesh
vigneshTG is offline   Reply With Quote

Old   November 2, 2015, 10:56
Default
  #26
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

In general negative volume of cells is a result of wrong vertex numbering. If you change

Code:
hex (0 4 1 0 3 5 2 3) (20 1 20) simpleGrading (1 1 1)
to

Code:
hex (3 5 2 3 0 4 1 0) (20 1 20) simpleGrading (1 1 1)
Errors disappear.
alexeym is offline   Reply With Quote

Old   November 3, 2015, 02:06
Default
  #27
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 13
vigneshTG is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

In general negative volume of cells is a result of wrong vertex numbering. If you change

Code:
hex (0 4 1 0 3 5 2 3) (20 1 20) simpleGrading (1 1 1)
to

Code:
hex (3 5 2 3 0 4 1 0) (20 1 20) simpleGrading (1 1 1)
Errors disappear.
Thank you alexeym !!
__________________
Thanks and Regards

Vignesh
vigneshTG is offline   Reply With Quote

Old   November 3, 2015, 11:27
Default Automating wedge points using m4 programming
  #28
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 10
usv001 is on a distinguished road
Hello everyone,

I have written a very simple script in m4 to create the points of the wedge:

Code:
divert(-1)
define([wedge],
[ifelse(calc(([$2]==0)),1,
[($1 0 0)],
[($1 calc($2*cos(2.5*pi/180)) calc($2*sin(2.5*pi/180)))
   ($1 calc($2*cos(-2.5*pi/180)) calc($2*sin(-2.5*pi/180)))])])dnl
divert
If you input the points in the x,y plane, it will return two points revolved 2.5deg on either side about x-axis. So,

Code:
wedge(1,2) -> two points
(1 1.99809837241304 0.0871945764388748)
(1 1.99809837241304 -0.0871945764388748)
wedge(1,0) -> only one point returned if point is on x-axis
(1 0 0)
It's a little primitive but works for me.
sourav90 likes this.
usv001 is offline   Reply With Quote

Old   August 3, 2019, 07:59
Smile
  #29
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 6
sourav90 is on a distinguished road
Thanks https://www.cfd-online.com/Forums/members/trt.html, very much for sharing your code! Was pulling my hair to get a simple example go wedge geometry until I found this...

Last edited by sourav90; August 3, 2019 at 08:01. Reason: forgot quoting.
sourav90 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[blockMesh] 3-D Mesh in a cylinder Nikunj.R OpenFOAM Meshing & Mesh Conversion 32 July 9, 2023 13:22
[Commercial meshers] Problems with ANSYS mesh conversion tdog OpenFOAM Meshing & Mesh Conversion 1 March 31, 2016 17:36
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Problem with geometry - concentric cylinders Rhoddwen OpenFOAM Running, Solving & CFD 0 December 15, 2014 09:22
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


All times are GMT -4. The time now is 08:35.