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

Dynamic code Openfoam2206 WSL2

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2022, 03:07
Default Dynamic code Openfoam2206 WSL2
  #1
New Member
 
Huy Quang Dong
Join Date: Nov 2017
Posts: 19
Rep Power: 8
cunconbkhp is on a distinguished road
Hi foamers!

On my windows desktop, i'm using WSL2 (Windows Subsystem for Linux 2) for running ubuntu 22.04.1 LTS (code name : jammy).

After the installation of Openfoam2206, i've tested some tutorials and all the cases with Dynamic code did not work.

By example with the tutorial "multiphase/overInterDyMFoam/twoSimpleRotors".

Below is the output function with dynamic code (i didn't do any change) :

alphaVol
{
libs (utilityFunctionObjects);
type coded;
name alphaVolume;
writeControl timeStep;
writeInterval 10;

codeWrite
#{

const volScalarField& alpha =
mesh().lookupObject<volScalarField>("alpha.water") ;

Info<< "Alpha volume = " << alpha.weightedAverage(mesh().Vsc())
<< endl;

#};
}

When i run the tutorial, i had the following error :

Using dynamicCode for functionObject alphaVol at line 92 in "/mnt/d/twoSimpleRotors/system/controlDict.functions.alphaVol"
Could not load "/mnt/d/tCould not load "/mnt/d/twoSimpleRotorCould not load "/mnt/d/twoSimpleRotors/dynwoSimpleRotors/dynamicCode/plaamicCode/platforms/linux64GccDPInt32Opt/lib/libalphaVolumes/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libatforms/linux64GccDPInt32Opt/lib/libalphaVolume_4a024lphaVolume_4a02447a6_4a02447a6 0286e990b3a446b74d59547a60286e990b3a446b74d595c431 3b0286e990b3a446b74d595c4313b159c.so"
/mnt/d/twoSimpleRotors/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libalphaVolume_4a02447a60286e990b3a446b74d595c4313 b159c.so: cannot open shared object file: No such file or directory
159c.so"
/mnt/d/twoSimpleRotors/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libalphaVolume_4a02447a60286e990b3a446b74d595c4313 b159c.so: cannot open shared object file: No such file or directory
c4313b159c.so"
/mnt/d/twoSimpleRotors/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libalphaVolume_4a02447a60286e990b3a446b74d595c4313 b159c.so: cannot open shared object file: No such file or directory
Creating new library in "dynamicCode/alphaVolume/platforms/linux64GccDPInt32Opt/lib/libalphaVolume_4a02447a60286e990b3a446b74d595c4313 b159c.so"
Invoking wmake libso /mnt/d/twoSimpleRotors/dynamicCode/alphaVolume
wmake libso /mnt/d/twoSimpleRotors/dynamicCode/alphaVolume
[HC-2568-1:09302] 2 more processes have sent help message help-btl-vader.txt / cma-permission-denied
[HC-2568-1:09302] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
ln: ./lnInclude
dep: functionObjectTemplate.C
Ctoo: functionObjectTemplate.C
link: /mnt/d/twoSimpleRotors/dynamicCode/alphaVolume/../platforms/linux64GccDPInt32Opt/lib/libalphaVolume_4a02447a60286e990b3a446b74d595c4313 b159c.so

For some reasons, the "make" has not been done successfully. Did i miss something during the installation?

Many thanks for your help!
cunconbkhp is offline   Reply With Quote

Old   October 2, 2022, 22:05
Default
  #2
Member
 
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 13
LongGe is on a distinguished road
Does dynamic code not work after installing the additional dependencies?

$ sudo apt install bison flex m4 build-essential
LongGe is offline   Reply With Quote

Old   October 3, 2022, 06:43
Default
  #3
New Member
 
Huy Quang Dong
Join Date: Nov 2017
Posts: 19
Rep Power: 8
cunconbkhp is on a distinguished road
Hi Longe!

I've install the addiontal dependencies but nothign works. I've even reinstall Wsl 2, ubuntu and openfoam but i have the same problem.
cunconbkhp is offline   Reply With Quote

Old   October 3, 2022, 18:12
Default
  #4
Member
 
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 13
LongGe is on a distinguished road
Hi


It seems that the problem that is happening is a bit complicated. For example, what would happen if you build statically as follows?

$ cd dynamicCode/alphaVol
$ wmake libso

To create dynamicCode/alphaVol, run Allrun once.
LongGe is offline   Reply With Quote

Old   October 4, 2022, 09:35
Default
  #5
New Member
 
Huy Quang Dong
Join Date: Nov 2017
Posts: 19
Rep Power: 8
cunconbkhp is on a distinguished road
Hi LongGe!

The error gone always with your solution

Using dynamicCode for functionObject alphaVol at line 102 in "/mnt/d/twoSimpleRotors/system/controlDict.functions.alphaVol"
Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.00117647058824
Time = 0.00117647

However i can not find the output file in postProcessing folder???
cunconbkhp is offline   Reply With Quote

Old   October 4, 2022, 11:35
Default
  #6
New Member
 
Huy Quang Dong
Join Date: Nov 2017
Posts: 19
Rep Power: 8
cunconbkhp is on a distinguished road
Hi LongGe!

Everything is ok now. I've found the output in the log file.
I've forgotten the meaning of Info<< command.

Thanks for your help!
cunconbkhp is offline   Reply With Quote

Reply

Tags
dynamic code, openfoam 2206, ubuntu 22.04.1, wsl2


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
Dynamic contact angle issue: fluent UDF couldn't set the correct contact angle FelixJJ FLUENT 2 October 20, 2021 02:39
[isoAdvector] Issues with modification of IsoAdvector Code raunakbardia OpenFOAM Community Contributions 16 September 4, 2020 05:36
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 12:30
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56
What is the Better Way to Do CFD? John C. Chien Main CFD Forum 54 April 23, 2001 08:10


All times are GMT -4. The time now is 04:50.