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

[blockMesh] BlockMeshdict error

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2020, 00:27
Post BlockMeshdict error
  #1
New Member
 
Prashant
Join Date: Sep 2019
Posts: 6
Rep Power: 7
Pacificdubey is on a distinguished road
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}

convertToMeters 1;

vertices
(
(0 0 0)
(0 9.998477e-03 -1.745241e-04)
(0 9.998477e-03 1.745241e-04)
(2.100000e+00 0 0)
(2.100000e+00 9.998477e-03 -1.745241e-04)
(2.100000e+00 9.998477e-03 1.745241e-04)
);

blocks
(

hex(0 1 2 0 3 4 5 3) (50 1 300) simpleGrading(0.2 1 10)
);

edges
(

arc 1 2 (0 100 0)
arc 4 5 (1 100 0)
);

boundary
(
axis
{
type empty;
faces
(
(0 3 3 0)
);
}

inlet
{
type patch;
faces
(
(0 0 2 1)
);
}

wall
{
type wall;
faces
(
(2 5 4 1)
);
}

outlet
{
type patch;
faces
(
(3 4 5 3)
);
}

front
{
type wedge;
faces
(
(0 3 5 2)
);
}

back
{
type wedge;
faces
(
(0 1 4 3)
);
}
);

mergePatchPairs
(
);
I dont what wrong here ,but i'm getting error which i dont know why??
--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 48 the punctuation token '('

file: /home/pacific/OpenFOAM/pacific-7/run/pipeflow/system/blockMeshDict.faces at line 48.

From function Foam::Istream& Foam:perator>>(Foam::Istream&, Foam::word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting
Pacificdubey is offline   Reply With Quote

Old   February 8, 2020, 13:31
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


I just reshaped a bit. I think there are some missing spaces. For me it is working perfectly now.
Attached Files
File Type: zip blockMeshDict.zip (630 Bytes, 14 views)
simrego is offline   Reply With Quote

Old   June 3, 2021, 15:32
Default Help please
  #3
New Member
 
Outside US and Canada
Join Date: Apr 2020
Posts: 11
Rep Power: 6
Rabeyia Manzoor Illahi is on a distinguished road
My code is here, getting error in meshing, please if someone can help.

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

scale 1;

// Front/back locations
zmin -0.5;
zmax 0.5;

vertices #codeStream
{
codeInclude
#{
#include "pointField.H"
#};

code
#{
// sin(45), cos(45)
const scalar sqrt05 = sqrt(0.5);

pointField points
({
/* 0*/ {0.5, 0, $zmin},
/* 1*/ {1, 0, $zmin},
/* 2*/ {3, 0, $zmin},
/* 3*/ {3, sqrt05, $zmin},
/* 4*/ {sqrt05, sqrt05, $zmin},
/* 5*/ {sqrt05/2, sqrt05/2, $zmin},
/* 6*/ {3, 2, $zmin},
/* 7*/ {sqrt05, 2, $zmin},
/* 8*/ {0, 2, $zmin},
/* 9*/ {0, 1, $zmin},
/*10*/ {0, 0.5, $zmin},
/*11*/ {-0.5, 0, $zmin},
/*12*/ {-1, 0, $zmin},
/*13*/ {-2, 0, $zmin},
/*14*/ {-2, sqrt05, $zmin},
/*15*/ {-sqrt05, sqrt05, $zmin},
/*16*/ {-sqrt05/2, sqrt05/2, $zmin},
/*17*/ {-2, 2, $zmin},
/*18*/ {-sqrt05, 2, $zmin},
/*19*/ {3, sqrt05/2, $zmin},
/*20*/ {3.125, 0, $zmin},
/*21*/ {3.125, sqrt05/4, $zmin},
/*22*/ {3.125, sqrt05/2, $zmin},
/*23*/ {3.125, 2, $zmin},
/*24*/ {5.875, 0, $zmin},
/*25*/ {5.875, sqrt05/4, $zmin},
/*26*/ {5.875, sqrt05/2, $zmin},
/*27*/ {5.875, 2, $zmin},
/*28*/ {6, 0, $zmin},
/*29*/ {6, sqrt05/2, $zmin},
/*30*/ {6, 2, $zmin},
/*31*/ {10, 0, $zmin},
/*32*/ {10, 2, $zmin}
/*33 {0.5, 0, $zmax},
/*34*{1, 0, $zmax},
/*35* {3, 0, $zmax},
/*36* {3, sqrt05, $zmax},
/*37* {sqrt05, sqrt05, $zmax},
/*38* {sqrt05/2, sqrt05/2, $zmax},
/*39* {3, 2, $zmax},
/*40* {sqrt05, 2, $zmax},
/*41* {0, 2, $zmax},
/*42* {0, 1, $zmax},
/*43* {0, 0.5, $zmax},
/*44* {-0.5, 0, $zmax},
/*45* {-1, 0, $zmax},
/*46* {-2, 0, $zmax},
/*47* {-2, sqrt05, $zmax},
/*48* {-sqrt05, sqrt05, $zmax},
/*49* {-sqrt05/2, sqrt05/2, $zmax},
/*50* {-2, 2, $zmax},
/*51* {-sqrt05, 2, $zmax},
/*52* {3, sqrt05/2, $zmax},
/*53* {3.125, 0, $zmax},
/*54* {3.125, sqrt05/4, $zmax},
/*55* {3.125, sqrt05/2, $zmax},
/*56* {3.125, 2, $zmax},
/*57* {5.875, 0, $zmax},
/*58* {5.875, sqrt05/4, $zmax},
/*59* {5.875, sqrt05/2, $zmax},
/*60* {5.875, 2, $zmax},
/*61* {6, 0, $zmax},
/*62* {6, sqrt05/2, $zmax},
/*63* {6, 2, $zmax},
/*64* {10, 0, $zmax},
/*65*//* {10, 2, $zmax}*/

});

// Duplicate z points for zmax
const label sz = points.size();
points.resize(2*sz);
for (label i = 0; i < sz; ++i)
{
const point& pt = points[i];
points[i + sz] = point(pt.x(), pt.y(), $zmax);
}

os << points;
#};
};


blocks
(
hex (5 4 9 10 38 37 42 43) (10 10 1) simpleGrading (1 1 1)
hex (0 1 4 5 33 34 37 38) (10 10 1) simpleGrading (1 1 1)
hex (1 2 3 4 34 35 36 37) (80 10 1) simpleGrading (1 1 1)
hex (4 3 6 7 37 36 39 40) (80 20 1) simpleGrading (1 1 1)
hex (9 4 7 8 42 37 40 41) (10 20 1) simpleGrading (1 1 1)
hex (15 16 10 9 48 47 43 42) (10 10 1) simpleGrading (1 1 1)
hex (12 11 16 15 45 44 47 48) (10 10 1) simpleGrading (1 1 1)
hex (13 12 15 14 46 45 48 47) (20 10 1) simpleGrading (1 1 1)
hex (14 15 18 17 47 48 51 50) (20 20 1) simpleGrading (1 1 1)
hex (15 9 8 18 48 42 41 51) (10 20 1) simpleGrading (1 1 1)
hex (20 22 19 2 53 55 52 35) (10 10 1) simpleGrading (1 1 1)
hex (22 23 6 19 55 56 39 52) (10 10 1) simpleGrading (1 1 1)
hex (25 26 22 21 58 59 55 54) (10 10 1) simpleGrading (1 1 1)
hex (28 29 26 24 61 62 59 57) (10 20 1) simpleGrading (1 1 1)
hex (26 27 23 22 59 60 56 55) (10 20 1) simpleGrading (1 1 1)
hex (29 30 27 26 62 63 60 59) (10 10 1) simpleGrading (1 1 1)
hex (31 32 30 28 64 65 63 61) (10 10 1) simpleGrading (1 1 1)
);

edges
(
// Inner cylinder
arc 0 5 origin (0 0 $zmin)
arc 5 10 origin (0 0 $zmin)
arc 1 4 origin (0 0 $zmin)
arc 4 9 origin (0 0 $zmin)
arc 33 38 origin (0 0 $zmax)
arc 38 43 origin (0 0 $zmax)
arc 34 37 origin (0 0 $zmax)
arc 37 42 origin (0 0 $zmax)
// Intermediate cylinder
arc 11 16 origin (0 0 $zmin)
arc 16 10 origin (0 0 $zmin)
arc 12 15 origin (0 0 $zmin)
arc 15 9 origin (0 0 $zmin)
arc 44 47 origin (0 0 $zmax)
arc 47 43 origin (0 0 $zmax)
arc 45 48 origin (0 0 $zmax)
arc 48 42 origin (0 0 $zmax)
);

boundary
(
down
{
type patch;
faces
(
(0 1 34 33)
(1 2 35 34)
(12 11 44 45)
(13 12 45 46)
(2 20 53 35)
(24 28 61 57)
(28 31 64 61)
);
}
outlet
{
type patch;
faces
(
(31 32 65 64)
);
}
up
{
type symmetry;
faces
(
(7 8 41 49)
(6 7 40 39)
(8 18 51 41)
(18 17 50 51)
(23 6 39 56)
(27 23 56 60)
(30 27 60 63)
(32 30 63 65)
);
}
inlet
{
type patch;
faces
(
(14 13 46 47)
(17 14 47 50)
);
}
cylinder
{
type wall;
faces
(
(10 5 38 43)
(5 0 33 38)
(16 10 43 47)
(11 16 47 44)
);
}
plate
{
type wall;
faces
(
(25 24 57 58)
(21 25 58 54)
(20 21 54 53)
);
}

);

mergePatchPairs
(
);

// ************************************************** *********************** //
Rabeyia Manzoor Illahi is offline   Reply With Quote

Reply

Tags
blockmeshdict, blockmeshdict block mesh, meshing, openfoam

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] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 09:00
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 07:28.