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

FOAM FATAL IO ERROR: Wrong token type

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By francedisab

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2024, 05:08
Default FOAM FATAL IO ERROR: Wrong token type
  #1
New Member
 
Join Date: Jan 2024
Posts: 6
Rep Power: 2
francedisab is on a distinguished road
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!
francedisab is offline   Reply With Quote

Old   January 30, 2024, 05:25
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,067
Rep Power: 26
Yann will become famous soon enough
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.
If you have updated this parameter, make sure there is no syntax issue with it.

Regards,
Yann
Yann is offline   Reply With Quote

Old   January 30, 2024, 05:42
Post
  #3
New Member
 
Join Date: Jan 2024
Posts: 6
Rep Power: 2
francedisab is on a distinguished road
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?
francedisab is offline   Reply With Quote

Old   January 30, 2024, 05:47
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,067
Rep Power: 26
Yann will become famous soon enough
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);
You can have a look at the documentation for more details: https://doc.openfoam.com/2306/tools/...earWallFields/

Cheers,
Yann

Last edited by Yann; January 30, 2024 at 05:48. Reason: add info
Yann is offline   Reply With Quote

Old   January 30, 2024, 06:09
Post
  #5
New Member
 
Join Date: Jan 2024
Posts: 6
Rep Power: 2
francedisab is on a distinguished road
It's running! I'll check the link, it'll be very helpfull.
Thank you very much!


Cheers,
Francesca
Yann likes this.
francedisab is offline   Reply With Quote

Reply

Tags
line 0, simplefoam, wrong token type


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
convergence problem of steady 2D film cooling calculation using chtMultiRegionFoam ruanyg968tf OpenFOAM Running, Solving & CFD 1 April 10, 2024 02:23
Multiphase euler foam problem with velocity vector enthusiast OpenFOAM Running, Solving & CFD 1 January 20, 2023 03:54
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
inlet pressure is higher than outlet pressure for fan sivakumar OpenFOAM Pre-Processing 16 December 30, 2017 14:16
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 20:22.