|
[Sponsors] |
"Missing" files when implementing OpenFOAM dictionaries referenced in custom solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 2, 2018, 17:58 |
"Missing" files when implementing OpenFOAM dictionaries referenced in custom solver
|
#1 |
New Member
Mark De Luca
Join Date: Oct 2018
Posts: 1
Rep Power: 0 |
Hi everyone,
I’ve inherited some code as part of my PhD project. The code is written in c++ and includes various OpenFOAM files to define the gas models that are implemented within it. Required to build the code is OpenFOAM 2.1.1, which is installed in my $HOME/OpenFOAM directory. The CMakeLists.txt for generating the Makefile details lines that include some key libraries required. Code:
if($ENV{WM_PROJECT_VERSION} STREQUAL "2.1.1") include_directories($ENV{FOAM_SRC}/OpenFOAM/lnInclude $ENV{FOAM_SRC}/finiteVolume/lnInclude $ENV{FOAM_SRC}/thermophysicalModels/reactionThermo/lnInclude $ENV{FOAM_SRC}/OSspecific/POSIX/lnInclude $ENV{FOAM_SRC}/thermophysicalModels/specie/lnInclude) Code:
alias of211='source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=6 WM_MPLIB=SYSTEMOPENMPI WM_COMPILER=Gcc48' Code:
--> FOAM FATAL ERROR in Foam::findEtcFiles() : could not find mandatory file 'cellModels' free(): invalid pointer Aborted (core dumped) Code:
Foam::fileNameList Foam::findEtcFiles ( const fileName& name, bool mandatory, bool findFirst ) { searchDir = getEnv("WM_PROJECT_DIR"); if (isDir(searchDir)) { fileName fullName = searchDir/"etc"/name; if (isFile(fullName)) { results.append(fullName); if (findFirst) { return results; } } } } Code:
mark@hp-mark732:~$ env | grep 'WM_PROJECT_DIR' WM_PROJECT_DIR=/home/mark/OpenFOAM/OpenFOAM-2.1.1 mark@hp-mark732:~$ ls $WM_PROJECT_DIR/etc bashrc cellModels codeTemplates config controlDict cshrc thermoData Has the environment been set correctly to detect this file, or is there something else needed to be done? Any help would be much appreciated. I have used OpenFOAM a few years back as part of my undergrad, but it’s not really my main area of focus, so I feel I’m a bit out of my depth. As some additional information, the executable programs aren’t ran using any of the OpenFOAM solvers (such as ‘icoFoam’ etc), they are built with the ‘make’ command that compiles all the source code, and are ran from the terminal window (./someFile) , or can be executed through an IDE (I’m using the terminal currently to help with debugging). On a basic level, the code simulates various aero engine configurations to give performance data, with the OpenFOAM dictionaries being used to model the gas properties of the working fluid as it passes through stages of the engine. The operating system being used is Ubuntu 18.04. Again, many thanks for reading what’s quite a lengthy post. If I haven’t been clear on anything, let me know and I’ll try clear it up. Thanks, Mark. Last edited by markdeluca; December 3, 2018 at 07:53. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |
Trying to compile custom solver "turbineALSource" in OpenFOAM 2.2 | mohsen.boojari | OpenFOAM Programming & Development | 1 | April 16, 2016 17:35 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 04:01 |
OpenFOAM Training in Europe and USA | hjasak | OpenFOAM | 0 | August 8, 2008 06:33 |