simpleFoam erorr in openFOAM: FOAM FATAL ERROR: (openfoam-2206) cannot find file

Hi everyone,

I am running a case of natural ventilation in a simple building (8x8x3 m) with the window open. I create it as an outdoor case inside a wind tunnel. I am only using the default setting of snappy hexMesh. For the solution, I use the Butterly steady incompressible receipt with the RAS turbulence model.

I am only writing the case in Butterfly, then trying to run it directly in OpenFOAM terminal. The case seems to run fine when I execute blockMesh and snappyHexMesh. However, after executing simpleFoam, I got the following error.

box (17.0 KB)

→ FOAM FATAL ERROR: (openfoam-2206)
cannot find file “/mnt/c/Users/astri/butterfly/boxexplode_45/2/p”

From virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 540.

FOAM exiting

I have no idea what happened. I’ve already tried different settings, but it always the same error message occurs every time I execute simpleFoam. If I run the case directly in Butterfly, it works, and the solution could run. However, I really need to be able to run the case in OpenFOAM since I am planning to run a larger case, and thus need longer computational time for the solution.

Could anyone share thoughts, please? @minggangyin @devang @TheodorosGalanos would you please give any advice? Much appreciated.

Thank you very much.

box (17.0 KB)

@astrianin Butterfly used blueCFD for running CFD simulation. And BlueCFD is the window version of OpenFOAM. As for your question,you should run OpenFOAM by BlueCFD.

You should copy P file frome 0 folder to 2 folder.

1 Like

Hi @minggangyin thank you very much for your response. I’ve run Butterfly in BlueCFD terminal and I got the same error as in openFOAM. I copy the p file from 0 to 2 folder as you suggested, but another error message appear.:

Cannot open include file “C:/Users/asar7758/butterfly/boxexplode_45/2/initialConditions” while reading dictionary “C:/Users/asar7758/butterfly/boxexplode_45/2/p”

file: C:/Users/asar7758/butterfly/boxexplode_45/3/p at line 21.

From function static bool Foam::functionEntries::includeEntry::execute(Foam::dictionary&, Foam::Istream&)
in file db/dictionary/functionEntries/includeEntry/includeEntry.C at line 151.

FOAM exiting

Do you have any other suggestions? Have you experienced the same problem? If not, would you mind sharing a script that has already been tested and could run successfully? Because I always encounter this error. I don’t know why.

Thank you very much.
Best regards.

Finally, it’s resolved. I copy all of the files from the 0 folder and the simpleFoam could run. Thank you very much @minggangyin !!

Hi @minggangyin , when I open blue cfd-core 2020 and folder ofuser-of8 inside that, there are just 2 folders: platforms and pTestCare. Without run folder! And that, there are 5 folders inside the folder pTestCase (0, constant, processor0, professor 1, and system)! You have written here that file p should be copied from 0 folder to 2 folder, but I can’t see folder2 here…

The folder is basic setting not with the simulation.You should run Allrun file to get the simuation result. It is the basic workflow of OpenFOAM. You can learn this on Youtube Channel.