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

pimpleFoam solver error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 4, 2023, 12:41
Default pimpleFoam solver error
  #1
Member
 
Join Date: Aug 2012
Posts: 40
Rep Power: 13
cesarjets is on a distinguished road
I've trying to run this tutorial but I keep getting this error with solver I believe:

--> FOAM FATAL IO ERROR:
wrong token type - expected string, found on line 54 the word 'fieldFunctionObjects'

not sure how to fix it? any help will be appreciated. Thanks



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

application pimpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 2000;

deltaT 1;

writeControl timeStep;

writeInterval 200;

purgeWrite 1;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

graphFormat raw;

functions
{
turbulenceFields
{
type turbulenceFields;
libs (fieldFunctionObjects);
writeControl writeTime;
fields (R nuTilda k epsilon omega L);
}

surfaces
{
type surfaces;
surfaceFormat boundaryData;
formatOptions
{
//// Optionally specify write options
//boundaryData
//{
// header true; // write as OpenFOAM object
// format binary; // write binary or ascii
// compression false; // compress after writing
//}
}
writeControl writeTime;
interpolationScheme cell;
fields
(
U
turbulenceProperties:R
turbulenceProperties:nuTilda
turbulenceProperties:L
);
surfaces
{
inlet
{
type patch;
patches (inlet);
interpolate false;
}
}
}
}


// ************************************************** *********************** //


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

solvers
{
U
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}

"(k|epsilon|R|nuTilda)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
}
}

PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
equations
{
U 0.5;
k 0.7;
epsilon 0.7;
R 0.7;
nuTilda 0.7;
}
}


// ************************************************** *********************** //
cesarjets is offline   Reply With Quote

Old   July 4, 2023, 13:34
Default
  #2
Member
 
s1291's Avatar
 
Join Date: Aug 2017
Location: Algeria
Posts: 98
Rep Power: 8
s1291 is on a distinguished road
Make sure to use OpenFOAM ESI versions (e.g. v2306) . I believe you are getting this error because you are using OpenFOAM Foundation version such as v10 (even though the headers of the files imply that the case is prepared for OpenFOAM v2306).

Anyway, you can make it work for both versions by using this syntax:

Code:
turbulenceFields
{
   type turbulenceFields;
   libs ("libfieldFunctionObjects.so"); // this will work for both versions
   writeControl writeTime;
   fields (R nuTilda k epsilon omega L);
}
__________________
"When in doubt, use brute force." -- Ken Thompson
s1291 is offline   Reply With Quote

Old   July 4, 2023, 13:52
Default
  #3
Member
 
Join Date: Aug 2012
Posts: 40
Rep Power: 13
cesarjets is on a distinguished road
Thanks for your help. I used the syntax you recommend but now I'm getting this error:


From function void Foam:imensionedField<Type, GeoMesh>:perator=(const Foam:imensionedField<Type, GeoMesh>&) [with Type = double; GeoMesh = Foam::volMesh]
in file /apps/easybuild/software/tinkercliffs-rome/OpenFOAM/9-foss-2021a/OpenFOAM-9/src/OpenFOAM/lnInclude/DimensionedField.C at line 535.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam:imensionedField<double, Foam::volMesh>:perator=(Foam:imensionedField<d ouble, Foam::volMesh> const&) at ??:?
#3 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>:perator==(Foam::tmp<Foam::Geometr icField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#4 void Foam::functionObjects::turbulenceFields:rocessFi eld<double>(Foam::word const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5 Foam::functionObjects::turbulenceFields::execute() at ??:?
#6 Foam::functionObjects::timeControl::execute() at timeControlFunctionObject.C:?
#7 Foam::functionObjectList::start() at ??:?
#8 Foam::Time::run() const at ??:?
#9 ? at ??:?
#10 __libc_start_main in "/lib64/libc.so.6"
#11 ? at ??:?
Aborted (core dumped)
cesarjets is offline   Reply With Quote

Old   July 4, 2023, 15:33
Default
  #4
Member
 
s1291's Avatar
 
Join Date: Aug 2017
Location: Algeria
Posts: 98
Rep Power: 8
s1291 is on a distinguished road
To increase your chance of solving the issue, please follow these guidelines:

1) Please provide details about your setup, including your case and the turbulence model you are using.

2) When sharing error messages, make sure to provide the full message and not just a portion of it.

3) To ensure readability, please use code tags in your post.

Thank you.
__________________
"When in doubt, use brute force." -- Ken Thompson
s1291 is offline   Reply With Quote

Reply


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
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 07:43
long error when using make-install SU2_AD. tomp1993 SU2 Installation 3 March 17, 2018 06:25
Mesquite - Adaptive mesh refinement / coarsening? philippose OpenFOAM Running, Solving & CFD 94 January 27, 2016 09:40
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 17:38


All times are GMT -4. The time now is 01:52.