CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

New dynamic mesh rule with symbol lookup error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2017, 22:42
Default New dynamic mesh rule with symbol lookup error (Solved)
  #1
New Member
 
Jue Wang
Join Date: Apr 2014
Posts: 23
Rep Power: 12
Joe Wang is on a distinguished road
Hi, Foamers,
I just touched the openfoam programing. I tried to create a new dynamic mesh rule but came across difficulties at the first step.

The development is based on OpenFOAM-extend-4.0.
I tried the followings:
1. I created myMovingBodyTopoFvMesh based on movingBodyFvMesh without any changes but the name and successfully complied (wmake libso) it. I added dynamicFvMeshLibs ("libmyMovingBodyTopoFvMesh.so") to constant/dynamicMeshDict of the case in tutorial and it ran well.

2. Then I created a new meshmotion rule, i.e. mylinearOscillation based on linearOscillation, and successfully compiled (wmake libso) it (no errors show up). Then I changed the linearOscillation to mylinearOscillation in the constant/dynamicMeshDict of the tutorial. But the new mylinearOscillation was not recognized.

3. To solve the problem in 2, I tried the following:
1) I copied the whole solidBodyMotion folder, which contains the linearOscillation folder, as mysolidBodyMotion. I renamed every folders and files and did relevant changes in the Make/files and options. Then they were compiled (wmake libso) successfully.
2) I updated solidBodyMotionFunction with mysolidBodyMotionFunction in the myMovingBodyTopoFvMesh files. I also changed relevant files, including the directory in Make/options. myMovingBodyTopoFvMesh was successfully compiled (wmake libso) then.
3) I made relevant changes in the constant/dynamicMeshDict and ran the tutorial. It gave an error: icoDyMSimpleFoam: symbol lookup error: /home/civil/foam/civil-4.0/lib/linux64GccDPOpt/libmyMovingBodyTopoFvMesh.so: undefined symbol: _ZN4Foam25mysolidBodyMotionFunction3NewERKNS_10dic tionaryERKNS_4TimeE

Does anyone know how to fix it? Really appreciate.

BTW, when I changed the Make/options file, I know how to change the EXE_INC part. But how about the LIB_LIBS part?
When I made the following changes:
EXE_INC = \
-I$(WM_PROJECT_USER_DIR)/src/dynamicMesh/meshMotion/mysolidBodyMotion/lnInclude
LIB_LIBS = \
-lmysolidBodyMotion
the LIB_LIBS change was not recognized. I'm not sure if it's the key problem. But I also noticed I can even delete the LIB_LIBS part and the compilation still worked.

It was really hard for me. Hope anyone could offer me some advice. Thanks.

Joe

Last edited by Joe Wang; October 24, 2017 at 21:07.
Joe Wang is offline   Reply With Quote

Old   October 24, 2017, 21:09
Default
  #2
New Member
 
Jue Wang
Join Date: Apr 2014
Posts: 23
Rep Power: 12
Joe Wang is on a distinguished road
I solved this problem by changing the Make/options file like
LIB_LIBS = \
-L $(FOAM_USER_LIBBIN) \
-lmysolidBodyMotion
and then it could be corrected built.
Joe Wang is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 46 March 6, 2022 13:21
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 06:35
CGNS Compiling Diego Main CFD Forum 17 December 21, 2014 01:40
Undeclared Identifier Errof UDF SteveGoat Fluent UDF and Scheme Programming 7 October 15, 2014 07:11
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25


All times are GMT -4. The time now is 19:34.