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

Wrong token type error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2021, 10:35
Default Wrong token type error
  #1
New Member
 
Tommaso Negosanti
Join Date: Oct 2021
Posts: 7
Rep Power: 4
tommynego95 is on a distinguished road
Hi all,

I' m currently studying a 2D section of a motorbike for my final thesis project.
While trying to run the solver pimpleFoam the simulation do not start and openFoam report this error:
Quote:
Build : 9-a0f1846504f2
Exec : pimpleFoam
Date : Oct 23 2021
Time : 16:11:48
Host : "tommy-Laptop"
PID : 21713
I/O : uncollated
Case : /home/tommy/Università/OpenFoamCases/SezioneMoto2D
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: No convergence criteria found


PIMPLE: Operating solver in transient mode with 1 outer corrector
PIMPLE: Operating solver in PISO mode


Reading field p



--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar, found on line 20 the word 'uniform'

file: /home/tommy/Università/OpenFoamCases/SezioneMoto2D/0/p/boundaryField/outlet/value at line 20.

From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&)
in file lnInclude/Scalar.C at line 101.

FOAM exiting
.

Now, i triple checked that the boundary conditions on my /0/p file where correct but i post it here since it seems that the cause of the problem is located there.
Line 20 is the line where internalField value is set.

p file (i removed the header for the sake of clarity)
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "17877";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform $internalField;
}

walls
{
type zeroGradient;
}

front_back
{
type empty;
}

symmetry
{
type symmetryPlane;
}
}

// ************************************************** *********************** //
I have literally no clue on how to solve this problem.
Can anybody help me? Could it be related to something extern of the p file?
tommynego95 is offline   Reply With Quote

Old   October 23, 2021, 12:47
Default
  #2
Member
 
s1291's Avatar
 
Join Date: Aug 2017
Location: Algeria
Posts: 98
Rep Power: 8
s1291 is on a distinguished road
Because internalField also contains the word uniform, You are using that word twice.

Change this:
Code:
outlet
{
     type fixedValue;
     value uniform $internalField;
}
To:

Code:
outlet
{
    type fixedValue;
    value  $internalField;
}
s1291 is offline   Reply With Quote

Old   October 23, 2021, 14:42
Default
  #3
New Member
 
Tommaso Negosanti
Join Date: Oct 2021
Posts: 7
Rep Power: 4
tommynego95 is on a distinguished road
Wow, now i feel like a stupid.
Now the simulation work like a charm.

Thanks a lot!
tommynego95 is offline   Reply With Quote

Reply

Tags
expected scalar, fatal error, problem


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
Pressure outlet boundary condition rolando OpenFOAM Running, Solving & CFD 62 September 18, 2017 06:45
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
checking the system setup and Qt version vivek070176 OpenFOAM Installation 22 June 1, 2010 12:34
user subroutine error CFDUSER CFX 2 December 9, 2006 06:31


All times are GMT -4. The time now is 00:40.