|
[Sponsors] |
undefined reference to `Foam::MomentumTransportModel...' |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 26, 2020, 16:03 |
undefined reference to `Foam::MomentumTransportModel...'
|
#1 | |
New Member
Farzad Ahamdi
Join Date: Feb 2012
Location: Iran
Posts: 4
Rep Power: 14 |
Hello everyone
I was trying to use the code provided at 'https://doi.org/10.3390/pr7080542' to implement the smoothed CSF. The code was developed based on OpenFOAM6 and I modified it to be compatible with OpenFOAM8. In the end, I got the following error: Quote:
Thanks, Farzad |
||
December 28, 2020, 06:02 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Seams the linker does not find some libraries (files which the ending .so)
probably you forgot something in the file Make/options |
|
December 28, 2020, 15:54 |
|
#3 |
New Member
Farzad Ahamdi
Join Date: Feb 2012
Location: Iran
Posts: 4
Rep Power: 14 |
Thanks Dear Michael, I will look into this.
|
|
August 26, 2023, 14:42 |
My solution
|
#4 | |
New Member
Matthias Lang
Join Date: Jun 2023
Posts: 6
Rep Power: 3 |
Hello everyone,
Although this thread is nearly 3 years old, I've encountered a very similar (if not identical) issue. After much effort, I've managed to find the solution. I hope that by sharing this, others won't have to go through weeks of frustration like I did. Let me begin by describing my specific problem before delving into the solution I discovered below: I needed to make modifications to a method within the 'multiphaseInterSystem' class. To achieve this, I duplicated the 'multiphaseSystem' class folder, which inherits from 'multiphaseInterSystem'. I then renamed this duplicated class to 'myMultiphaseSystem' and adjusted the 'Make/files' and 'Make/options' accordingly. I systematically replaced all instances of 'multiphaseSystem' with 'myMultiphaseSystem' using the command "sed -i s/multiphaseSystem/myMultiphaseSystem/g *". The compilation of the library proceeded without errors or issues. I proceeded to duplicate the 'icoReactingMultiphaseInterFoam' solver. I replaced all instances of 'multiphaseSystem' with 'myMultiphaseSystem' (again using the "sed" command from above), added my custom library to 'Make/options', and made necessary modifications to 'Make/files'. However, upon compiling this application, I encountered the following error: Quote:
Contrary to my expectations, the error wasn't directly tied to the library I was modifying. (I believe it's connected to the Runtime Selection Model (RTS) PLEASE correct me if I'm wrong. I am unfamiliar with this subject). As indicated by the error message, the problem involves a "constructor table." Now, let me share the solution: I found that the file "compressibleMultiPhaseTurbulenceModels.C," located one subdirectory above the class I duplicated ("multiphaseSystem"), contained instances of the term 'multiphaseSystem'. I identified this using the 'grep' command in Linux. Therefore, I duplicated the "compressibleMultiPhaseTurbulenceModels" file, replaced all occurrences of 'multiphaseSystem' with 'myMultiphaseSystem' (using jet again the sed command as mentioned above), adjusted the 'Make/files' and options accordingly, and compiled this library. Upon replacing the old 'compressibleMultiPhaseTurbulenceModels' library with the updated version, the problem was resolved, and the error messages vanished. I hope this explanation proves helpful to someone grappling with a similar issue. I'd greatly appreciate it if someone could provide a more detailed explanation of what exactly I did here to solve the problem. While I suspect it involves the RTS, I'm not entirely certain. Wishing you all the best with your OpenFOAM projects. Best regards, Matthias |
||
Tags |
compile solver, interfoam, openfoam6, openfoam8 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding Libraries to OpenFOAM | MCrossover97 | OpenFOAM Programming & Development | 10 | February 23, 2024 03:34 |
can not complie fluentDataToFoam in OF2.1.1 | hewei | OpenFOAM Pre-Processing | 20 | September 8, 2018 10:19 |
LiencubiclowRemodel | nzy102 | OpenFOAM Bugs | 14 | January 10, 2012 09:53 |
compile error about FJMPI | chiven | OpenFOAM Installation | 11 | March 31, 2010 07:27 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |