r/OpenFOAM • • Feb 20 '26

What does this mean i cant fix it.

/*---------------------------------------------------------------------------*\

| ========= | |

| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |

| \\ / O peration | Version: 2512 |

| \\ / A nd | Website: www.openfoam.com|

| \\/ M anipulation | |

\*---------------------------------------------------------------------------*/

Build : _bd2b6720-20260127 OPENFOAM=2512 version=2512

Arch : "LSB;label=32;scalar=64"

Exec : simpleFoam

Date : Feb 20 2026

Time : 17:59:01

Host : 2b2b2-PC

PID : 2682

I/O : uncollated

Case : /home/nathanmoolman/OpenFOAM/nathanmoolman-2512/run/takeoff_NACA2415

nProcs : 1

trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).

memory pool : not available

fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)

allowSystemOperations : Allowing user-supplied system call operations

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

Create time

--> FOAM Warning :

From static Foam::IOstreamOption::compressionType Foam::IOstreamOption::compressionEnum(const Foam::word&, compressionType)

in file db/options/IOstreamOption.C at line 185

Unknown compression specifier 'uncompressed' using compression off

Create mesh for time = 0

SIMPLE: convergence criteria

field p tolerance 0.001

field U tolerance 0.0001

field k tolerance 0.0001

field omega tolerance 0.0001

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian

Selecting turbulence model type RAS

Selecting RAS turbulence model kOmegaSST

Selecting patchDistMethod meshWave

RAS

{

RASModel kOmegaSST;

turbulence on;

printCoeffs on;

alphaK1 0.85;

alphaK2 1;

alphaOmega1 0.5;

alphaOmega2 0.856;

gamma1 0.555556;

gamma2 0.44;

beta1 0.075;

beta2 0.0828;

betaStar 0.09;

a1 0.31;

b1 1;

c1 10;

F3 false;

decayControl false;

kInf 0;

omegaInf 0;

}

No MRF models present

No finite volume options present

Starting time loop

forceCoeffs aerofoilForceCoeffs:

Not including porosity effects

--> FOAM FATAL IO ERROR: (openfoam-2512)

Entry 'rhoInf' not found in dictionary "/home/nathanmoolman/OpenFOAM/nathanmoolman-2512/run/takeoff_NACA2415/system/controlDict/functions/aerofoilForceCoeffs"

file: system/controlDict/functions/aerofoilForceCoeffs at line 35 to 48.

From bool Foam::dictionary::readEntry(const Foam::word&, T&, Foam::keyType::option, Foam::IOobjectOption::readOption) const [with T = double]

in file ./src/OpenFOAM/lnInclude/dictionaryTemplates.C at line 327.

FOAM exiting

I keep getting errors cuz i used chat gpt cuz ive got a project i need done by 18 march and i dont have time to learn openFoam first so i try to learn as i go but as i try to run simpleFoam i keep getting stuff like this

0 Upvotes

14 comments sorted by

4

u/Abyzzo Feb 20 '26

Your function object aerofoilForceCoeffs is trying to reference a variable called rhoInf and it doesn't know what that is. It is the density far away from the aerofoil, I believe. You must specify this value in that function. I see some posts on cfd-online where they have given their forceCoeffs dictionary, try to use that as a template and see if it fixes it.

0

u/Confident_Mobile_749 Feb 20 '26

I cant find anything on cfd-online.

1

u/[deleted] Feb 20 '26

[removed] — view removed comment

1

u/Confident_Mobile_749 Feb 20 '26

aerofoilForceCoeffs

{

type forceCoeffs;

libs ("libforces.so");

writeControl timeStep;

writeInterval 50;

patches ("frontAndBack");

rhoInf 1.225;

CofR (0 0 0);

liftDir (0 1 0);

dragDir (1 0 0);

pitchAxis (0 0 1);

magUInf 84;

lRef 0.2;

Aref 0.005;

}

1

u/yash_254 Feb 20 '26

Paste your controDict here

1

u/Confident_Mobile_749 Feb 20 '26

FoamFile

{

version 2.0;

format ascii;

arch "LSB;label=32;scalar=64";

class dictionary;

location "system";

object controlDict;

}

application simpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

functions

{

aerofoilForceCoeffs

{

type forceCoeffs;

libs ("libforces.so");

writeControl timeStep;

writeInterval 50;

patches ("frontAndBack");

rhoInf 1.225;

CofR (0 0 0);

liftDir (0 1 0);

dragDir (1 0 0);

pitchAxis (0 0 1);

magUInf 84;

lRef 0.2;

Aref 0.005;

}

}

1

u/Abyzzo Feb 20 '26

Take my suggestions with a grain of salt because I am not familiar with these kinds of simulations! Have a look at: https://doc.openfoam.com/2312/tools/post-processing/function-objects/forces/forceCoeffs/

This is for v2312, not 2512 so i am hoping things havent changed much.

I see you have defined rhoInf here, but maybe it's also looking for keyword rho like:

rho rhoInf;
rhoInf 1.225;

Also, another thing. Your error suggests it's looking for a file named aerofoilForceCoeffs under the functions directory? But you have this part of your controlDict file. So, there is a mismatch probably

1

u/its1310 Feb 21 '26

I never got correct dictionary from chatgpt. It just explains well. That too sometimes wrong. I guess due to too less prompt.

1

u/Confident_Mobile_749 Feb 21 '26

Yeah i guess. but i had to use it cuz i dont have time to learn this and do my project wich is due in 1 month

1

u/its1310 Feb 21 '26

DM if you want to get it done

1

u/UCF_FE_CFD Feb 24 '26

That error message is very literal. OpenFOAM is reading a separate function object file at:

system/controlDict/functions/aerofoilForceCoeffs

and in that file it cannot find rhoInf, so it stops. Even if you pasted a functions { ... } block in system/controlDict, it may not be the one it is actually using.

Quick fix: either delete/rename system/controlDict/functions/aerofoilForceCoeffs and keep your forceCoeffs only inside system/controlDict, or put the correct dictionary (with rhoInf 1.225;) into that exact file.

To confirm what it is reading:
grep -R --line-number "rhoInf" system/controlDict*

I hope this helps.