|
[Sponsors] |
January 30, 2024, 06:08 |
FOAM FATAL IO ERROR: Wrong token type
|
#1 |
New Member
Join Date: Jan 2024
Posts: 6
Rep Power: 2 |
Hello,
I'm running some simulations for my thesis with openfoam. I started with the motorbike file (simpleFoam simulation) and I changed geometry with mine. There are two different geometry files. I didn't find any problem with the snappyHexMesh command but now I'm trying to run the simulation and I have this error message: [4] --> FOAM FATAL IO ERROR: (openfoam-2212 patch=230612) [4] Wrong token type - expected word or string, found on line 0: punctuation '{' [4] [4] file: stream.functions.near.patches at line 0. [4] [4] From Foam::Istream& Foam:perator>>(Foam::Istream&, Foam::wordRe&) [4] in file primitives/strings/wordRe/wordRe.C at line 121. [4] FOAM parallel run exiting [4] [5] [5] [5] --> FOAM FATAL IO ERROR: (openfoam-2212 patch=230612) [5] Wrong token type - expected word or string, found on line 0: punctuation '{' [5] [5] file: stream.functions.near.patches at line 0. [5] [5] From Foam::Istream& Foam:perator>>(Foam::Istream&, Foam::wordRe&) [5] in file primitives/strings/wordRe/wordRe.C at line 121. [5] FOAM parallel run exiting [5] [0] [0] [0] --> FOAM FATAL IO ERROR: (openfoam-2212 patch=230612) [0] Wrong token type - expected word or string, found on line 32: punctuation '{' [0] [0] file: system/controlDict.functions.near.patches at line 32. [0] [0] From Foam::Istream& Foam:perator>>(Foam::Istream&, Foam::wordRe&) [0] in file primitives/strings/wordRe/wordRe.C at line 121. [0] FOAM parallel run exiting [0] [1] [1] [1] --> FOAM FATAL IO ERROR: (openfoam-2212 patch=230612) [1] Wrong token type - expected word or string, found on line 0: punctuation '{' [1] [1] file: stream.functions.near.patches at line 0. [1] [1] From Foam::Istream& Foam:perator>>(Foam::Istream&, Foam::wordRe&) [1] in file primitives/strings/wordRe/wordRe.C at line 121. [1] FOAM parallel run exiting [1] [2] [2] [2] --> FOAM FATAL IO ERROR: (openfoam-2212 patch=230612) [2] Wrong token type - expected word or string, found on line 0: punctuation '{' [2] [2] file: stream.functions.near.patches at line 0. [2] [2] From Foam::Istream& Foam:perator>>(Foam::Istream&, Foam::wordRe&) [2] in file primitives/strings/wordRe/wordRe.C at line 121. [2] FOAM parallel run exiting [2] [3] [3] [3] --> FOAM FATAL IO ERROR: (openfoam-2212 patch=230612) [3] Wrong token type - expected word or string, found on line 0: punctuation '{' [3] [3] file: stream.functions.near.patches at line 0. [3] [3] From Foam::Istream& Foam:perator>>(Foam::Istream&, Foam::wordRe&) [3] in file primitives/strings/wordRe/wordRe.C at line 121. [3] FOAM parallel run exiting I checked every file and I didn't find anything wrong for what i know. Where should I check? Hope someone can help me! Thank you! |
|
January 30, 2024, 06:25 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,222
Rep Power: 28 |
Hello,
Your error seems to be related to the function objects used in controlDict, and more specifically the patches parameter of the function near: Code:
[4] Wrong token type - expected word or string, found on line 0: punctuation '{' [4] [4] file: stream.functions.near.patches at line 0. Regards, Yann |
|
January 30, 2024, 06:42 |
|
#3 |
New Member
Join Date: Jan 2024
Posts: 6
Rep Power: 2 |
Thank you for your reply!
I think I found the mistake in system/wallBoundedStreamLines, where I define the near function. I wrote: near { type nearWallFields; libs (fieldFunctionObjects); writeControl writeTime; executeControl writeTime; fields ( (U UNear) ); patches ( { name wheelGroup; } { name alaanterioreGroup; } ); distance 0.001; } The problem should be with the brackets in patches, am I right? But what's the correct way to write it? |
|
January 30, 2024, 06:47 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,222
Rep Power: 28 |
This is it indeed, this is not the proper way to write it, you just need to give a list of patches or groups:
Code:
patches (wheelGroup alaanterioreGroup); Cheers, Yann Last edited by Yann; January 30, 2024 at 06:48. Reason: add info |
|
January 30, 2024, 07:09 |
|
#5 |
New Member
Join Date: Jan 2024
Posts: 6
Rep Power: 2 |
It's running! I'll check the link, it'll be very helpfull.
Thank you very much! Cheers, Francesca |
|
Tags |
line 0, simplefoam, wrong token type |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
convergence problem of steady 2D film cooling calculation using chtMultiRegionFoam | ruanyg968tf | OpenFOAM Running, Solving & CFD | 1 | April 10, 2024 03:23 |
Multiphase euler foam problem with velocity vector | enthusiast | OpenFOAM Running, Solving & CFD | 1 | January 20, 2023 04:54 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
inlet pressure is higher than outlet pressure for fan | sivakumar | OpenFOAM Pre-Processing | 16 | December 30, 2017 15:16 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |