CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   blockmesh arc, no curves, no arc, only straight lines (http://www.cfd-online.com/Forums/openfoam-meshing/73426-blockmesh-arc-no-curves-no-arc-only-straight-lines.html)

heavy_user March 8, 2010 11:56

blockmesh arc, no curves, no arc, only straight lines
 
1 Attachment(s)
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
(
);

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


pg22 March 22, 2010 06:58

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.

psk July 27, 2013 05:11

Draw the geometry in blockmesh
 
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$


All times are GMT -4. The time now is 17:47.