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

[blockMesh] blockmesh arc, no curves, no arc, only straight lines

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 8, 2010, 11:56
Default blockmesh arc, no curves, no arc, only straight lines
  #1
Senior Member
 
Join Date: Dec 2009
Posts: 112
Rep Power: 17
heavy_user is on a distinguished road
HI Folks,

i have been trying to create a slice of a cylinder (like a peace of cake).

But blockmesh is not making curved lines for me.
I tried to figure why, but i am stuck.
I made a really simple case, which is symmetric to the y-axis.
On the -y side he is making an arc, on the +y side not...and i dont know why..(attached picture, it is supposed to be half a circle)
Did I overlook something simple??


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

convertToMeters 1;




vertices        
(    
    (0     0    0)  
    (1 0 0)
    (0 1 0)
    (-1  0 0)

    (0    0    2)  
    (1 0 2)
    (0 1  2)
    (-1 0  2)
);


edges
(
           //(1/sqrt (2) 1/sqrt (2) 0 )
arc 1 2 (0.70710678 0.70710678 0)
arc 2 3 (-0.70710678 0.70710678 0)
arc 5 6 (0.70710678 0.70710678 2)
arc 6 7 (-0.70710678 0.70710678 2)

);


blocks          
(   
    hex (0 1 2 3 4 5 6 7)      (10 1 60) simpleGrading (3 1 3)
);



patches         
(


    patch inlet
    (
        (0 3 2 1)
    )    

   
    wall sidewall 
    (
       (2 6 5 1)
       (3 7 6 2)
    )


    wall wedge
    (
    (0 1 5 4)
    (4 7 3 0)
    )
    
    patch outlet    
    (
    (4 7 6 5)
    )
);

mergePatchPairs 
(
);

// ************************************************************************* //
Attached Images
File Type: jpg no_arc.jpg (36.0 KB, 585 views)
heavy_user is offline   Reply With Quote

Old   March 22, 2010, 06:58
Default
  #2
New Member
 
Paul Garlick
Join Date: Mar 2009
Location: Bournemouth, UK
Posts: 27
Rep Power: 17
pg22 is on a distinguished road
I think that the block definition is wrong here. There is only one block which would lead to highly skewed cells.

It would be better to use an O-type grid. The semi-circular region would be split into four sub-regions. In this layout there would be a central rectangular region surrounded by three outer regions. The outer regions would have curved outer edges to fit the semi-circular geometry.
pg22 is offline   Reply With Quote

Old   July 27, 2013, 06:11
Default Draw the geometry in blockmesh
  #3
psk
Member
 
david
Join Date: Jun 2013
Location: Montreal, Canada
Posts: 62
Rep Power: 12
psk is an unknown quantity at this point
Good Day Folks,

I am trying to draw my wing geometry inside blockMesh [ ie. wing is locate inside the domain] for that i create domain,
-----------------------------------------------------------------------------------------------------------------------
Domain (Rectangular )
(
(0 0 0) // vertex 0
(100 0 0) // vertex 1
(100 0 25) // vertex 2
(0 100 0) // vertex 3

(0 100 0) // vertex 4
(100 100 0) // vertex 5
(100 100 25) // vertex 6
(0 100 25) // vertex 7
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
)
------------------------------------------------------------------------------------------------------------------------
wing Geometry coordinates

points[1] = point(11.03188, 3.534115, 6.404323);
points[2] = point(3.190682, 4.892467, 5.764356);
points[3] = point(9.559749, -5.47123, 2.317475);
__________________________________________________ ___________________

I took example of blockMesh from potentialFoam cylinder tutorial, kindly help me how I can built wing inside the domain using blockMeshDict.kindly see my attached wing & blockMeshDict for your kind perusal.while running blockmesh I got erroe like this,

toshiba@ubuntu:~/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder$ blockMesh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-0bc225064152
Exec : blockMesh
Date : Jul 27 2013
Time : 15:07:51
Host : "ubuntu"
PID : 4111
Case : /home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Creating block mesh from
"/home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder/constant/polyMesh/blockMeshDict"
Using #codeStream at line 19 in file "/home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder/constant/polyMesh/blockMeshDict"
Using #codeStream with "/home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder/dynamicCode/platforms/linuxGccDPOpt/lib/libcodeStream_257d30184e57a5c9c2f645de53bc3f5b42c8 fb53.so"
Creating new library in "dynamicCode/_257d30184e57a5c9c2f645de53bc3f5b42c8fb53/platforms/linuxGccDPOpt/lib/libcodeStream_257d30184e57a5c9c2f645de53bc3f5b42c8 fb53.so"
Invoking "wmake -s libso /home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder/dynamicCode/_257d30184e57a5c9c2f645de53bc3f5b42c8fb53"
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file codeStreamTemplate.C
/home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder/constant/polyMesh/blockMeshDict::#codeStream: In function ‘void Foam::codeStream_257d30184e57a5c9c2f645de53bc3f5b4 2c8fb53(Foam::Ostream&, const Foam::dictionary&)’:
/home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder/constant/polyMesh/blockMeshDict::#codeStream:34:8: error: ‘line’ was not declared in this scope
/home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder/constant/polyMesh/blockMeshDict::#codeStream:36:6: error: ‘lines’ was not declared in this scope
make: *** [Make/linuxGccDPOpt/codeStreamTemplate.o] Error 1

--> FOAM FATAL IO ERROR:
Failed wmake "dynamicCode/_257d30184e57a5c9c2f645de53bc3f5b42c8fb53/platforms/linuxGccDPOpt/lib/libcodeStream_257d30184e57a5c9c2f645de53bc3f5b42c8 fb53.so"

file: /home/toshiba/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder/constant/polyMesh/blockMeshDict from line 17 to line 17.

From function functionEntries::codeStream::execute(..)
in file db/dictionary/functionEntries/codeStream/codeStream.C at line 195.

FOAM exiting

toshiba@ubuntu:~/OpenFOAM/toshiba-2.1.0/run/openfoam210/tutorials/basic/potentialFoam/testcylinder/cylinder$
__________________
Million Thanks,
David

"Small Dream is a Crime"

Last edited by psk; August 12, 2013 at 03:54.
psk is offline   Reply With Quote

Old   January 20, 2017, 17:49
Default your mesh
  #4
New Member
 
Manuel Fermin Fonseca
Join Date: Nov 2014
Location: Valencia, Venezuela
Posts: 18
Rep Power: 12
manuelffonseca is on a distinguished road
dude, you have this

edges
(
//(1/sqrt (2) 1/sqrt (2) 0 )
arc 1 2 (0.70710678 0.70710678 0)
arc 2 3 (-0.70710678 0.70710678 0)
arc 5 6 (0.70710678 0.70710678 2)
arc 6 7 (-0.70710678 0.70710678 2)

);

but the arc have to have a point between vertice 1 and 2, that mean you need a pont that satisfy the circunference equacion, 2ndf you have to reconfigurate the vertices to a real coordinates, because i see between the Parentheses (), looks like the cube coords as sown below
vertices
(
(0 0 0)
(1 0 0)
(0 1 0)
(-1 0 0)

(0 0 2)
(1 0 2)
(0 1 2)
(-1 0 2)
);

i think the real vertices are

(
(0 0 0)
(1 0 0)
(0.70710678 0.70710678 0)
(0 0 z)
(1 0 z)
(0.70710678 0.70710678 z)
)

whre z can to be a small number

can i to help you
Best regards
Manuel Fermin Fonseca


Quote:
Originally Posted by heavy_user View Post
HI Folks,

i have been trying to create a slice of a cylinder (like a peace of cake).

But blockmesh is not making curved lines for me.
I tried to figure why, but i am stuck.
I made a really simple case, which is symmetric to the y-axis.
On the -y side he is making an arc, on the +y side not...and i dont know why..(attached picture, it is supposed to be half a circle)
Did I overlook something simple??


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

convertToMeters 1;




vertices        
(    
    (0     0    0)  
    (1 0 0)
    (0 1 0)
    (-1  0 0)

    (0    0    2)  
    (1 0 2)
    (0 1  2)
    (-1 0  2)
);


edges
(
           //(1/sqrt (2) 1/sqrt (2) 0 )
arc 1 2 (0.70710678 0.70710678 0)
arc 2 3 (-0.70710678 0.70710678 0)
arc 5 6 (0.70710678 0.70710678 2)
arc 6 7 (-0.70710678 0.70710678 2)

);


blocks          
(   
    hex (0 1 2 3 4 5 6 7)      (10 1 60) simpleGrading (3 1 3)
);



patches         
(


    patch inlet
    (
        (0 3 2 1)
    )    

   
    wall sidewall 
    (
       (2 6 5 1)
       (3 7 6 2)
    )


    wall wedge
    (
    (0 1 5 4)
    (4 7 3 0)
    )
    
    patch outlet    
    (
    (4 7 6 5)
    )
);

mergePatchPairs 
(
);

// ************************************************************************* //
manuelffonseca is offline   Reply With Quote

Old   January 20, 2017, 22:50
Default
  #5
New Member
 
Manuel Fermin Fonseca
Join Date: Nov 2014
Location: Valencia, Venezuela
Posts: 18
Rep Power: 12
manuelffonseca is on a distinguished road
using this

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

convertToMeters 0.1;

vertices
(
(0 0 0)
(1 0 0)
(0.70710678 0.70710678 0)
(0 0 0.1)
(1 0 0.1)
(0.70710678 0.70710678 0.1)
);

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

edges
(
arc 1 2 (0.8 0.6 0)
arc 4 5 (0.8 0.6 0.1)
);

boundary
(
paredmovil
{
type wall;
faces
(
(0 1 4 3)
);
}
paredfija
{
type wall;
faces
(
(1 2 5 4)
(0 3 5 2)
);
}
frontalyposterior
{
type empty;
faces
(
(0 1 2)
(3 4 5)
);
}
);

mergePatchPairs
(
);

// ************************************************** *********************** //

i got this

D:\Pruebas cfd\torta>checkmesh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
/* Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt *\
| Based on Windows porting (2.0.x v4) by Symscape: http://www.symscape.com |
\*---------------------------------------------------------------------------*/
Build : 2.1-88b2f2ae3a0b
Exec : checkmesh
Date : Jan 20 2017
Time : 22:27:33
Host : "Lg"
PID : 1280
Case : D:/Pruebas cfd/torta
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMas
ter
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0



--> FOAM FATAL ERROR:
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

From function Time::findInstance(const fileName&, const word&, const IOobjec
t::readOption, const word&)
in file db/Time/findInstance.C at line 188.

FOAM exiting
manuelffonseca is offline   Reply With Quote

Old   January 22, 2017, 21:38
Default
  #6
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

I suspect your blockMesh did not finish properly. Looking at the blockMeshDict, the hex block is not properly defined. You need to have 8 vertices (if you are trying to get wedges, then you can have repeated vertices), but you have only 6. As a result, your blockMesh would have terminated with errors and consequently you have no mesh that checkMesh can find.

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   January 23, 2017, 09:21
Default sure
  #7
New Member
 
Manuel Fermin Fonseca
Join Date: Nov 2014
Location: Valencia, Venezuela
Posts: 18
Rep Power: 12
manuelffonseca is on a distinguished road
You right thanks for answer, i dont know how to build mesh with wedges.

Quote:
Originally Posted by Antimony View Post
Hi,

I suspect your blockMesh did not finish properly. Looking at the blockMeshDict, the hex block is not properly defined. You need to have 8 vertices (if you are trying to get wedges, then you can have repeated vertices), but you have only 6. As a result, your blockMesh would have terminated with errors and consequently you have no mesh that checkMesh can find.

Hope this helps.

Cheers,
Antimony
manuelffonseca is offline   Reply With Quote

Old   January 23, 2017, 21:04
Default
  #8
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

Look at section 5.3.3 in this link: http://cfd.direct/openfoam/user-guide/blockMesh/

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   January 25, 2017, 14:13
Default mesh an arc
  #9
New Member
 
Manuel Fermin Fonseca
Join Date: Nov 2014
Location: Valencia, Venezuela
Posts: 18
Rep Power: 12
manuelffonseca is on a distinguished road
Thanks you sr, it mean if i need an arc as a section cake, i need to build an wedge plus an arc. ill try with it. its the reason the indy professor of the spoken tutorial buils a pipe using a splitter circle in salome.

Quote:
Originally Posted by Antimony View Post
Hi,

Look at section 5.3.3 in this link: http://cfd.direct/openfoam/user-guide/blockMesh/

Cheers,
Antimony
manuelffonseca is offline   Reply With Quote

Old   January 26, 2017, 21:48
Default
  #10
New Member
 
Manuel Fermin Fonseca
Join Date: Nov 2014
Location: Valencia, Venezuela
Posts: 18
Rep Power: 12
manuelffonseca is on a distinguished road
Solved it

I can see the circle's section, but the checkmesh fail.

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

convertToMeters 0.1;

vertices
(
(0 0 0)
(0.5 0 0)
(1 0 0)
(0.5 0.5 0)
(0.707 0.707 0)
(0 0 0.1)
(0.5 0 0.1)
(1 0 0.1)
(0.5 0.5 0.1)
(0.707 0.707 0.1)
);

blocks
(
hex (0 1 3 3 5 6 8 8) (20 20 1) simpleGrading (1 1 1)
hex (1 2 4 3 6 7 9 8) (20 20 1) simpleGrading (1 1 1)
);

edges
(
arc 2 4 (0.858 0.514 0)
arc 7 9 (0.858 0.514 0.1)
);

boundary
(
paredmovil
{
type wall;
faces
(
(0 1 6 5)
(1 2 7 6)
);
}
paredfija
{
type wall;
faces
(
(0 5 8 3)
(3 8 9 4)
(2 4 9 7)
);
}
frontalyposterior
{
type empty;
faces
(
(0 1 3 3)
(5 6 8 8)
(1 2 4 3)
(6 7 9 8)
);
}
);

mergePatchPairs
(
);

// ************************************************** *********************** //







Quote:
Originally Posted by Antimony View Post
Hi,

Look at section 5.3.3 in this link: http://cfd.direct/openfoam/user-guide/blockMesh/

Cheers,
Antimony
manuelffonseca is offline   Reply With Quote

Reply


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
ill defined primitive entry 'boundary' francisco.angel OpenFOAM Pre-Processing 16 September 8, 2022 07:11
[blockMesh] joining two cylinders sergiopb91 OpenFOAM Meshing & Mesh Conversion 1 August 29, 2016 16:41
settlingFoam unstable? bendel_boy OpenFOAM Running, Solving & CFD 38 July 8, 2016 06:07
[snappyHexMesh] snappyHexMesh and cyclic boundaries Ruli OpenFOAM Meshing & Mesh Conversion 2 December 9, 2013 07:51
weird error during blockMesh SePe OpenFOAM 1 October 25, 2010 11:31


All times are GMT -4. The time now is 15:21.