|
[Sponsors] |
Implementation of rpm as function of time in SRF module results in solver error |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 11, 2021, 13:29 |
Implementation of rpm as function of time in SRF module results in solver error
|
#1 |
New Member
HH
Join Date: Apr 2019
Posts: 17
Rep Power: 7 |
Hi,
I am trying to change the functionality of SRF in OF v1806 to input rpm as function of time. I created a new folder "varSRF" in src/finiteVolume/cfdtools/general/ After making the required changes, I added the destination for .C files in the src/finiteVolume/Make/files. The folder compiled without any errors However, when I made all the required changes to my solver and compiled it, I get the following error: OpenFOAM-v1806/build/linux64GccDPInt32Opt/applications/solvers/grooveAsperityFoam_generic_reversed_SRF_var/grooveAsperityFoam_generic_reversed_SRF_var.o: In function `main': grooveAsperityFoam_generic_reversed_SRF_var.C.te xt.startup+0x1690): undefined reference to `Foam::varSRF::varSRFModel::New(Foam::GeometricFie ld<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&)' grooveAsperityFoam_generic_reversed_SRF_var.C.te xt.startup+0x39e1): undefined reference to `Foam::varSRF::varSRFModel::New(Foam::GeometricFie ld<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&)' collect2: error: ld returned 1 exit status make: *** [/home/hharia/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/bin/grooveAsperityFoam_generic_reversed_SRF_var] Error 1 I have been struggling with this error related to autoPtr and suspect that this is associated with the additional lines in the createFields.H. I have read several of posts on this error and tried various things to resolve it. However, I have not been successful and currently stuck. I originally posted the question in the following thread: rpm as function of time in SRF model ? But i haven't received any answers for the same. Any help will be highly appreciated. Thanks in advance! Additional Information: OF version: v1806 Solver: It is a user defined solver built using PimpleFOAM as a reference (the solver has been tested with constant SRF speed and works. It crashes with this new modification for rpm as a function of time) Lines in createFields. H: autoPtr<varSRF::varSRFModel> varSRF ( varSRF::varSRFmodel::New(Urel) ); Modifications to original SRF functionality 1. Changed names from SRF to varSRF wherever relevant 2. Modified rpm.H to varrpm.H along with the following lines in the file Old: scalar rpm_; New: autoPtr<Function1<scalr>> rpm_; 3. Added appropriate header file Best, Hiral |
|
January 12, 2021, 08:42 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear Hiral,
its a long time ago that I was programming in FOAM but Code:
undefined reference to `Foam::varSRF::varSRFModel::New(Foam::GeometricFie ld<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&)' I guess that you did not include the new source (varSRF) file to the library you compiled and hence, in the library the solver loads, the reference is not available.
__________________
Keep foaming, Tobias Holzmann |
|
January 12, 2021, 09:42 |
Thanks Tobi
|
#3 |
New Member
HH
Join Date: Apr 2019
Posts: 17
Rep Power: 7 |
Tobi,
Thanks for your reply. Really appreciate your help. I had been going through the log file I created while compiling the varSRF functionality and realized that varSRFNew.C was not included in Make/files. I also added EXE_LIBS to the options file with -lfiniteVolume The functionality and the solver compiled without errors. However, I am not sure if adding EXE_LIBS made any difference or not. I also tried updating the post earlier after I discovered this error but couldn't find a way to reach the post when under moderator review. Thank you for the help. P.S. Your blogs and book on pimpleFoam have been very helpful in my solver development activity. Best, Hiral |
|
Tags |
autoptr, compilation error, rpm, srf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building OpenFOAM1.7.0 from source | ata | OpenFOAM Installation | 46 | March 6, 2022 14:21 |
Undeclared Identifier Errof UDF | SteveGoat | Fluent UDF and Scheme Programming | 7 | October 15, 2014 08:11 |
Errors in UDF | shashank312 | Fluent UDF and Scheme Programming | 6 | May 30, 2013 21:30 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 19:44 |
checking the system setup and Qt version | vivek070176 | OpenFOAM Installation | 22 | June 1, 2010 13:34 |