EzgiCFD |
January 31, 2022 13:38 |
CodeStream Error
Hello everyone,
I am trying to learn the codeStream term. I really need your help.
When I run codeStream boundary condition for U value, I faced an error. I am pasting my code and the error below.
Code:
eff_inlet
{
type fixedValue;
value #codeStream
{
codeInclude
#{
#include "fvCFD.H"
#};
codeOptions
#{
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
#};
codeLibs
#{
-lmeshTools \
-lfiniteVolume
#};
code
#{
const IOdictionary& d = static_cast<const IOdictionary&>(dict);
const fvMesh& mesh = refCast<const fvMesh>(d.db());
const label id = mesh.boundary().findPatchID("eff_inlet");
const fvPatch& patch = mesh.boundary()[id];
vectorField U(patch.size(), vector(0,0,0));
const scalar c = 0;
const scalar r = 0.025;
const scalar dir = -1;
forAll(U,i)
{
//const scalar x = patch.Cf()[i][0];
const scalar y = patch.Cf()[i][1];
const scalar z = patch.Cf()[i][2];
U[i] = vector(dir*(pow((z-c)/r,2)+pow((y-c)/r,2)-1.0),0,0);
}
writeEntry(os,"",U);
#};
};
Quote:
Using #codeStream at line 26 in file "/home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/0/U/boundaryField/eff_inlet"
Using #codeStream with "/home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_11b332455db3356f033d42dd4157134e39eb 0901.so"
Creating new library in "dynamicCode/_11b332455db3356f033d42dd4157134e39eb0901/platforms/linux64GccDPInt32Opt/lib/libcodeStream_11b332455db3356f033d42dd4157134e39eb 0901.so"
"/opt/openfoam9/etc/codeTemplates/dynamicCode/codeStreamTemplate.C" "/home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/dynamicCode/_11b332455db3356f033d42dd4157134e39eb0901/codeStreamTemplate.C"
Invoking "wmake -s libso /home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/dynamicCode/_11b332455db3356f033d42dd4157134e39eb0901"
wmake libso /home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/dynamicCode/_11b332455db3356f033d42dd4157134e39eb0901
ln: ./lnInclude
wmkdep: codeStreamTemplate.C
Ctoo: codeStreamTemplate.C
ld: /home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/dynamicCode/_11b332455db3356f033d42dd4157134e39eb0901/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_11b332455db3356f033d42dd4157134e39eb 0901.so
codeStream : dictionary:"/home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/0/U/boundaryField/eff_inlet" master-only-reading:0
on processor 0 have masterSize:885904 and localSize:885904
on processor 0 after waiting: have masterSize:885904 and localSize:885904
Opening cached dictionary:"/home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_11b332455db3356f033d42dd4157134e39eb 0901.so"
codeStream : dictionary:"/home/ezbudak/OpenFOAM/ezbudak-9/run/damBreak/0/U/boundaryField/eff_inlet" master-only-reading:0
Segmentation fault (core dumped)
|
I have read lots of posts which can be related to this error, but I couldn't find any solution. I will be grateful to anyone who can help.
|