|
[Sponsors] |
wrong token type - expected word, found on line 80 the punctuation token '(' |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 17, 2019, 12:01 |
wrong token type - expected word, found on line 80 the punctuation token '('
|
#1 |
New Member
Sri harsha Revu
Join Date: Apr 2019
Posts: 4
Rep Power: 7 |
Hello,
I am trying to create 2 blocks in a wedge of 5 deg, wedge radius of 7 mm and width of 5 mm. I have written my blockMeshDict when i am running this in openFoam 6 i am getting an error like this wrong token type - expected word, found on line 80 the punctuation token '(' . I have attached my blockMeshDict zip file, please help me i got stuck with this from a week. I have 2 questions to you guys 1. Do the trailing spaces in blockMeshDict file causes any problem? 2. How should i define a interface boundary condition in case of multiple blocks? Thanks a lot. Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 6.0; format binary; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.001; w_rmin 0; // In y direction w_rmax 7; n_rmin 0; n_rmax 0.3; xmin 0; xmax 5; theta 5; //delta_x 6E-3; //delta_y 6E-3; //xcells #calc "($xmax-$xmin)/$delta_x"; //n_ycells #calc "($n_rmax-$n_rmin)/$delta_y"; //w_ycells #calc "($w_rmax-$w_rmin)/$delta_y"; vertices ( //Block 0 (0 0 0) //0 (0 #calc "$n_rmax*cos($theta/2.0)" #calc "$n_rmax*sin($theta/2.0)") //1 (0 #calc "$n_rmax*cos($theta/2.0)" #calc "-$n_rmax*sin($theta/2.0)") //2 ($xmax 0 0) //3 ($xmax #calc "$n_rmax*cos($theta/2.0)" #calc "$n_rmax*sin($theta/2.0)") //4 ($xmax #calc "$n_rmax*cos($theta/2.0)" #calc "$n_rmax*sin($theta/2.0)") //5 //Block 1 (0 #calc "$n_rmax*cos($theta/2.0)" #calc "$n_rmax*sin($theta/2.0)") //6 (0 #calc "$n_rmax*cos($theta/2.0)" #calc "-$n_rmax*sin($theta/2.0)") //7 ($xmax #calc "$n_rmax*cos($theta/2.0)" #calc "$n_rmax*sin($theta/2.0)") //8 ($xmax #calc "$n_rmax*cos($theta/2.0)" #calc "$n_rmax*sin($theta/2.0)") //9 ($xmax #calc "$w_rmax*cos($theta/2.0)" #calc "$w_rmax*sin($theta/2.0)") //10 ($xmax #calc "$w_rmax*cos($theta/2.0)" #calc "-$w_rmax*sin($theta/2.0)") //11 (0 #calc "$w_rmax*cos($theta/2.0)" #calc "$w_rmax*sin($theta/2.0)") //12 (0 #calc "$w_rmax*cos($theta/2.0)" #calc "-$w_rmax*sin($theta/2.0)") //13 ); blocks ( hex (0 3 5 2 0 3 4 1) (100 100 1) simpleGrading(1 1 1) //block 0 hex (9 11 13 7 8 10 12 6) (100 100 1) simpleGrading(1 1 1) //blcok 1 ); edges ( ); boundary ( front { type wedge; faces ( (3 0 5 2) (9 7 13 11) ) } back { type wedge; faces ( (4 1 0 3) (10 12 6 8) ); } inlet { type wall; faces ( (0 1 2 0) (6 12 13 7) ); } outlet { type wall; faces ( (3 5 4 3) (9 11 10 8) ); } wedgewall { type wall; faces ( (10 11 13 12) ); } needlwall1 { type wall; faces ( (4 1 2 5) ); } needlwall2 { type wall; faces ( (8 6 7 9) ); } axis { type symmetry; faces ( (0 3 3 0) ); } ); mergePatchPairs ( (needlwall1 needlwall2) ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Last edited by hasha; May 18, 2019 at 02:19. |
|
May 17, 2019, 13:39 |
|
#2 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Just a hint
Ensure to leave an empty space before every $-sign in order to avoid the combination of signs to be interpreted as whole. For instance: *$ - > * $ /$ -> / $ +$ -> + $ -$ -> - $ ($ -> ( $ Except for: "$ .... this should be fine. |
|
May 17, 2019, 14:12 |
|
#3 |
New Member
Sri harsha Revu
Join Date: Apr 2019
Posts: 4
Rep Power: 7 |
Hello guin,
Thanks for writing back, I have done the same as you said but the error was same. please find the modified blockMeshDict and error reported. The error it was showing at line 80 but i dont find any extra parenthesis there(highlighted line 80) . could you please help me out. Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 6.0; format binary; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.001; w_rmin 0; // In y direction w_rmax 7; n_rmin 0; n_rmax 0.3; xmin 0; xmax 5; theta 5; //delta_x 6E-3; //delta_y 6E-3; //xcells #calc "($xmax-$xmin)/$delta_x"; //n_ycells #calc "($n_rmax-$n_rmin)/$delta_y"; //w_ycells #calc "($w_rmax-$w_rmin)/$delta_y"; vertices ( //Block 0 (0 0 0) //0 (0 #calc "$n_rmax*cos( $theta/2.0)" #calc "$n_rmax*sin( $theta/2.0)") //1 (0 #calc "$n_rmax*cos( $theta/2.0)" #calc "- $n_rmax*sin( $theta/2.0)") //2 ( $xmax 0 0) //3 ( $xmax #calc "$n_rmax*cos( $theta/2.0)" #calc "$n_rmax*sin( $theta/2.0)") //4 ( $xmax #calc "$n_rmax*cos( $theta/2.0)" #calc "- $n_rmax*sin( $theta/2.0)") //5 //Block 1 (0 #calc "$n_rmax*cos( $theta/2.0)" #calc "$n_rmax*sin( $theta/2.0)") //6 (0 #calc "$n_rmax*cos( $theta/2.0)" #calc "- $n_rmax*sin( $theta/2.0)") //7 ( $xmax #calc "$n_rmax*cos( $theta/2.0)" #calc "$n_rmax*sin( $theta/2.0)") //8 ( $xmax #calc "$n_rmax*cos( $theta/2.0)" #calc "- $n_rmax*sin( $theta/2.0)") //9 ( $xmax #calc "$w_rmax*cos( $theta/2.0)" #calc "$w_rmax*sin( $theta/2.0)") //10 ( $xmax #calc "$w_rmax*cos( $theta/2.0)" #calc "- $w_rmax*sin( $theta/2.0)") //11 (0 #calc "$w_rmax*cos( $theta/2.0)" #calc "$w_rmax*sin( $theta/2.0)") //12 (0 #calc "$w_rmax*cos( $theta/2.0)" #calc "- $w_rmax*sin( $theta/2.0)") //13 ); blocks ( hex (0 3 5 2 0 3 4 1) (100 100 1) simpleGrading(1 1 1) //block 0 hex (9 11 13 7 8 10 12 6) (100 100 1) simpleGrading(1 1 1) //blcok 1 ); edges ( ); boundary ( front { type wedge; faces ( (3 0 5 2) (9 7 13 11) ) } back { type wedge; faces ( (4 1 0 3) (10 12 6 8) ); } inlet { type wall; faces ( (0 1 2 0) (6 12 13 7) ); } outlet { type wall; faces ( (3 5 4 3) (9 11 10 8) ); } wedgewall { type wall; faces ( (10 11 13 12) ); } needlwall1 { type wall; faces ( (4 1 2 5) ); } needlwall2 { type wall; faces ( (8 6 7 9) ); } axis { type symmetry; faces ( (0 3 3 0) ); } ); mergePatchPairs ( (needlwall1 needlwall2) ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
--> FOAM FATAL IO ERROR: wrong token type - expected word, found on line 80 the punctuation token '(' file: /home/harsha/Desktop/test_blockmesh/system/blockMeshDict.faces at line 80. From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::word&) in file primitives/strings/word/wordIO.C at line 74. FOAM exiting |
|
May 17, 2019, 17:19 |
|
#4 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
The error is due to a a missing semicolon at line 74 right at the end of "faces"-list, from "front" patch.
Nevertheless, you will get further errors. Take a look at the order of the points for the generation of the hex-blocks https://cfd.direct/openfoam/user-guide/v6-blockMesh/ Best, |
|
May 18, 2019, 05:40 |
|
#5 |
New Member
Sri harsha Revu
Join Date: Apr 2019
Posts: 4
Rep Power: 7 |
I have checked the blocks the numbering is righthanded every where in the block i even changed it to another style but the error wont change. some body help me , is it a bug why it is showing a wrong token type - expected word, found on line 71 the punctuation token '(' .
Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 6.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.001; w_rmin 0; // In y direction w_rmax 7; n_rmin 0; n_rmax 0.3; xmin 0; xmax 5; theta 5; //delta_x 6E-3; //delta_y 6E-3; //xcells #calc "($xmax-$xmin)/$delta_x"; //n_ycells #calc "($n_rmax-$n_rmin)/$delta_y"; //w_ycells #calc "($w_rmax-$w_rmin)/$delta_y"; vertices ( //Block 0 (0 0 0) //0 (0 #calc "$n_rmax*cos( $theta/2.0)" #calc "$n_rmax*sin( $theta/2.0)") //1 (0 #calc "$n_rmax*cos( $theta/2.0)" #calc "- $n_rmax*sin( $theta/2.0)") //2 ( $xmax 0 0) //3 ( $xmax #calc "$n_rmax*cos( $theta/2.0)" #calc "$n_rmax*sin( $theta/2.0)") //4 ( $xmax #calc "$n_rmax*cos( $theta/2.0)" #calc "- $n_rmax*sin( $theta/2.0)") //5 //Block 1 (0 #calc "$n_rmax*cos( $theta/2.0)" #calc "$n_rmax*sin( $theta/2.0)") //6 (0 #calc "$n_rmax*cos( $theta/2.0)" #calc "- $n_rmax*sin( $theta/2.0)") //7 ( $xmax #calc "$n_rmax*cos( $theta/2.0)" #calc "$n_rmax*sin( $theta/2.0)") //8 ( $xmax #calc "$n_rmax*cos( $theta/2.0)" #calc "- $n_rmax*sin( $theta/2.0)") //9 ( $xmax #calc "$w_rmax*cos( $theta/2.0)" #calc "$w_rmax*sin( $theta/2.0)") //10 ( $xmax #calc "$w_rmax*cos( $theta/2.0)" #calc "- $w_rmax*sin( $theta/2.0)") //11 (0 #calc "$w_rmax*cos( $theta/2.0)" #calc "$w_rmax*sin( $theta/2.0)") //12 (0 #calc "$w_rmax*cos( $theta/2.0)" #calc "- $w_rmax*sin( $theta/2.0)") //13 ); blocks ( hex (0 2 1 0 3 5 4 3) (100 100 1) simpleGrading(1 1 1) //block 0 hex (7 13 12 6 9 11 10 8) (100 100 1) simpleGrading(1 1 1) //blcok 1 ); edges ( ); boundary ( frontAndBack { type wedge; faces ( (3 0 5 2) (9 7 13 11) (4 1 0 3) (10 12 6 8) ); } /*back { type wedge; faces ( (4 1 0 3) (10 12 6 8) ); } */ inlet { type wall; faces ( (0 1 2 0) (6 12 13 7) ); } outlet { type wall; faces ( (3 5 4 3) (9 11 10 8) ); } wedgewall { type wall; faces ( (10 11 13 12) ) } needlwall1 { type wall; faces ( (4 1 2 5) ); } needlwall2 { type wall; faces ( (8 6 7 9) ); } axis { type symmetry; faces ( (0 3 3 0) ); } ); mergePatchPairs ( (needlwall1 needlwall2) ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |
|
March 31, 2022, 07:53 |
|
#6 |
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5 |
Hello hasha,
did you find the solution? |
|
Tags |
blockmeshdict, openfaom-6 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MPI error in parallel application | usv001 | OpenFOAM Programming & Development | 2 | September 14, 2017 12:30 |
[snappyHexMesh] Problem with Sanpper, surface still Rough | Zephiro88 | OpenFOAM Meshing & Mesh Conversion | 7 | November 5, 2014 13:05 |
Regarding FoamX running Kindly help out | hariya03 | OpenFOAM Pre-Processing | 0 | April 18, 2008 05:26 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |