CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Dynamic code Openfoam2206 WSL2 (https://www.cfd-online.com/Forums/openfoam/245375-dynamic-code-openfoam2206-wsl2.html)

cunconbkhp October 2, 2022 03:07

Dynamic code Openfoam2206 WSL2
 
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!

LongGe October 2, 2022 22:05

Does dynamic code not work after installing the additional dependencies?

$ sudo apt install bison flex m4 build-essential

cunconbkhp October 3, 2022 06:43

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.

LongGe October 3, 2022 18:12

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.

cunconbkhp October 4, 2022 09:35

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 October 4, 2022 11:35

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!


All times are GMT -4. The time now is 06:28.