|
[Sponsors] |
How to customize a library and link it to present case |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 29, 2022, 03:49 |
How to customize a library and link it to present case
|
#1 |
New Member
Mehdi Badri
Join Date: Apr 2013
Posts: 7
Rep Power: 13 |
Hi there,
I would genuinely appreciate it if you could help me on this issue: I am going to solve an FSI problem with a modified version of rigidBodyDynamics library. To start, I just copied its directory somewhere: Code:
cp -r $FOAM_SRC/rigidBodyDynamics $FOAM_RUN/MyrigidBodyDynamics Code:
LIB = $(FOAM_USER_LIBBIN)/libMyrigidBodyMeshMotion Now the question is how I can use this new library in my cases. When I set the constant/dynamicMeshDict as Code:
dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("path_to_the_lib/libMyrigidBodyDynamics.so"); motionSolver rigidBodyMotion; ... Code:
--> FOAM FATAL IO ERROR: (openfoam-2112) Unknown solver type rigidBodyMotion Valid solver types : 6(coded displacementInterpolation displacementLayeredMotion multiSolidBodyMotionSolver solidBody velocityDisplacement) |
|
June 29, 2022, 04:42 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
I must be missing something here, you want to load rigidBodyMotion from librigidBodyMeshMotion automatically required through your libMyrigidBodyDynamics ?
Did you actually add that as compile option somewhere (eg, LIB_LIBS) and it didn't work, or something else? Really confused here. |
|
June 29, 2022, 05:38 |
|
#3 |
Member
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4 |
Are yoou sure, that you used the correct libname? Because you have written you renamed the library to "libMyrigidBodyMeshMotion" but you are loading "libMyrigidBodyDynamics" ??
If this isnt the case I would try $(FOAM_USER_LIBBIN)/libMyrigidBodyMeshMotion.so But these are just guesses, never worked with that before |
|
June 29, 2022, 23:50 |
|
#4 | |
New Member
Mehdi Badri
Join Date: Apr 2013
Posts: 7
Rep Power: 13 |
Quote:
You are right! I had forgotten to compile libMyrigidBodyDynamics.so. Thus both the situation and my question were confusing. After getting the comments, I figured out what the problem was. Thanks. |
||
June 29, 2022, 23:58 |
|
#5 | |
New Member
Mehdi Badri
Join Date: Apr 2013
Posts: 7
Rep Power: 13 |
Quote:
|
||
Tags |
compile new library, fsi, openfoam, rigid body dynamics |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to link the path of a newly compiled library to another library in OpenFOAM | sourav8016 | OpenFOAM | 3 | December 28, 2023 17:21 |
Forcing a solver to use your custom library. | cdunn6754 | OpenFOAM Programming & Development | 0 | March 30, 2017 17:05 |
How to call FORTRAN files as UDF? | Ehsan-F | Fluent UDF and Scheme Programming | 6 | September 11, 2012 12:03 |
CFX 4.4: NAG Library Link to CFX subroutine... | Robin K | CFX | 2 | September 21, 2005 11:40 |
why can't link shared library? | wanghong | CFX | 1 | September 19, 2005 02:37 |