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

CodedFixedValue Issue when Creating .so file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 24, 2021, 04:56
Default CodedFixedValue Issue when Creating .so file
  #1
New Member
 
Leo
Join Date: Jul 2020
Posts: 4
Rep Power: 5
Croustidinho is on a distinguished road
Hi all,

I am new to OpenFoam, and I have a problem with the implementation of the boundary condition.

The model I am trying to implement is composed of two rotating bicycle wheels. In order to model the rotation of the wheels, I wrote a customised boundary condition using CodedFixedValue. Here is the following code implemented in the U file of the 0 folder :

code

#{
const vectorField& Cf = patch().Cf();
vectorField& field = *this;

const scalar x_av = 0.370607;
const scalar z_av = 0.478752;
const scalar R = 0.36;
const scalar V = 18;

forAll(Cf, faceI)
{
field[faceI] = vector(-V*(boundaryPatch.Cf()[faceI].z()-z_av)/R, 0, -V*(boundaryPatch.Cf()[faceI].x()-x_av)/R);
}

#};

The problem is that, when I run the simulation, the following error appears :

Could not load "/home/vcourreges/OpenFOAM/OpenFOAM-v2006/ALTEN/6_OpenFoam_Party/2roues/dynamicCode/platforms/linux64Gcc63DPInt32Opt/lib/libMyRotatingWheels_668403437a803347164f91e9228000 d23f90980a.so"
/home/vcourreges/OpenFOAM/OpenFOAM-v2006/ALTEN/6_OpenFoam_Party/2roues/dynamicCode/platforms/linux64Gcc63DPInt32Opt/lib/libMyRotatingWheels_668403437a803347164f91e9228000 d23f90980a.so: cannot open shared object file: No such file or directory
Invoking wmake libso /home/vcourreges/OpenFOAM/OpenFOAM-v2006/ALTEN/6_OpenFoam_Party/2roues/dynamicCode/MyRotatingWheels
wmake libso /home/vcourreges/OpenFOAM/OpenFOAM-v2006/ALTEN/6_OpenFoam_Party/2roues/dynamicCode/MyRotatingWheels
/opt/OpenFOAM/OpenFOAM-v2006/wmake/wmake: line 624: make: command not found
/opt/OpenFOAM/OpenFOAM-v2006/wmake/wmake: line 627: make: command not found
wmake error: file 'Make/linux64Gcc63DPInt32Opt/sourceFiles' could not be created in /home/vcourreges/OpenFOAM/OpenFOAM-v2006/ALTEN/6_OpenFoam_Party/2roues/dynamicCode/MyRotatingWheels


--> FOAM FATAL IO ERROR:
Failed wmake "dynamicCode/MyRotatingWheels/platforms/linux64Gcc63DPInt32Opt/lib/libMyRotatingWheels_668403437a803347164f91e9228000 d23f90980a.so"


file: /home/vcourreges/OpenFOAM/OpenFOAM-v2006/ALTEN/6_OpenFoam_Party/2roues/0/U.boundaryField.RoueAVV9 at line 57 to 83.

From void Foam::codedBase::createLibrary(Foam::dynamicCode&, const Foam::dynamicCodeContext&) const
in file db/dynamicLibrary/codedBase/codedBase.C at line 237.

FOAM exiting

After a few hours trying to figure out the problem, the only things I can tell about this error is that the .so file associated with the customised boundary file cannot be loaded, and maybe because OF does not acces to the .C and .H files of the src folder (I am not sure at all about that).

Thank you for your help, I hope I have given enough information to enable you to find a solution !

Kind regards
Croustidinho 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
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 14:30
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 18:13
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 05:18


All times are GMT -4. The time now is 07:55.