Extrality / NACA_simulation

Python scripts to run resolution of the Reynolds-Averaged-Navier-Stokes equations over NACA 4 and 5 digits airfoils.
Open Data Commons Open Database License v1.0
17 stars 7 forks source link

blockMesh error! #1

Closed Gxinhu closed 1 year ago

Gxinhu commented 1 year ago

Hello there, the paper is quiet interesting, thanks for your work.

I try to use this code to generate data, I meet the following error in this line https://github.com/Extrality/NACA_simulation/blob/dd5ff9ff4f4adda2386822061dbdca57a4ffee9c/simulation_generator.py#L456.

/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 9-b456138dc4bc
Exec   : blockMesh
Date   : Nov 30 2022
Time   : 12:35:51
Host   : "d7724d503c56"
PID    : 263408
I/O    : uncollated
Case   : /workspace/OpenFOAM/NACA_simulation/Simulations/airFoil2D_SST_62.4_5_4_4_12
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

Reading "blockMeshDict"

Creating block mesh from
    "system/blockMeshDict"

--> FOAM FATAL IO ERROR:
Illegal dictionary entry or environment variable name "domain.xMax"
Valid dictionary entries are
4
(
checkBlockFaceOrientation
scale
domain
aerofoil
)

file: /workspace/OpenFOAM/NACA_simulation/Simulations/airFoil2D_SST_62.4_5_4_4_12/system/blockMeshDict from line 17 to line 68.

    From function bool Foam::primitiveEntry::expandVariable(const Foam::variable&, const Foam::dictionary&)
    in file db/dictionary/primitiveEntry/primitiveEntry.C at line 92.

FOAM exiting

If you have any solution, please tell me.

FlorentExtrality commented 1 year ago

Hi! Sorry for the delay, there are two branches of OpenFOAM, the ESI branch and the Foundation branch. Versions of OpenFOAM inside the ESI branch are named with the year and month of release (e.g. OpenFOAM v2206 for June 2022). In contrast, versions in the Foundation branch are designated with an integer (e.g. OpenFOAM 9).

None of them is better than the other, each has its own features but there can be incompatibilities (especially in the syntax of the different dictionaries) between them. It looks like you are using OpenFOAM 9 from the Foundation branch, try installing OpenFOAM v2112 (v2206 should work too) from the ESI branch (https://www.openfoam.com/), it should solve the error.

Thank you!

EDIT: Actually v2206 leads to an error on the force coefficients plot generation in the python code due to a slight inconsistency in syntax between v2112 and v2206

Gxinhu commented 1 year ago

Thank you very much. I change to v2112, the code is running smoothly.