|
[Sponsors] |
July 5, 2023, 03:39 |
codeStream error while executing
|
#1 |
New Member
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3 |
Hello,
I am currently trying to run a simulation RAS k-epsilon, so I define a k dictionary using codeStream because I want to have a particular turbulent intensity profile in my domain (both at inlet and internal field) that comes from an experiment. There is my code : Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 10 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class volScalarField; location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField { type nonuniform; value #codeStream { codeInclude #{ #include "fvCFD.H" #}; codeOptions #{ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude #}; //libs needed to visualize boundary conditions in paraview codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast<const IOdictionary&>(dict.parent().parent()); const fvMesh& mesh = refCast<const fvMesh>(d.db()); const scalar Vrel = 15.42; const scalar Iconst = 0.212; scalarField k(mesh.nCells(), 0.); forAll(k,i) { //const scalar x = mesh.C()[i][0]; //cell centers of the patch //const scalar y = mesh.C()[i][1]; const scalar z = mesh.C()[i][2]; if (z >= 0.5) { k[i] = 3/2*pow(Vrel*0.763*pow(z,0.113)*Iconst*pow(z,-0.227),2); } else { k[i] = 3/2*pow(Vrel*0.763*pow(z,0.113)*0.25,2); } } writeEntry(os,"", k); #}; }; } boundaryField { inlet { type fixedvalue; value #codeStream { codeInclude #{ #include "fvCFD.H" #}; codeOptions #{ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude #}; //libs needed to visualize boundary conditions in paraview codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast<const IOdictionary&> ( dict.parent().parent() ); const fvMesh& mesh = refCast<const fvMesh>(d.db()); const scalar Vrel = 15.42; const scalar Iconst = 0.212; scalarField k(mesh.nCells(), 0.); forAll(k,i) { //const scalar x = mesh.C()[i][0]; //cell centers of the patch //const scalar y = mesh.C()[i][1]; const scalar z = mesh.C()[i][2]; if (z >= 0.5) { k[i] = 3/2*pow(Vrel*0.763*pow(z,0.113)*Iconst*pow(z,-0.227),2); } else { k[i] = 3/2*pow(Vrel*0.763*pow(z,0.113)*0.25,2); } } writeEntry(os,"", k); #}; }; } water_surface { type atmEpsilonWallFunction; value uniform 0.01; } outlet { type zeroGradient; } walls { type zeroGradient; } ship { type zeroGradient; } } // ************************************************************************* // Code:
Time = 0s Using #codeStream at line 21 in file "/home/OpenFOAM/run/nodiscnohole/0/k/internalField" Using #codeStream with "/home/OpenFOAM/run/nodiscnohole/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_23a0d398c3a7832a27cebf619e5246f9d1ba5a30.so" codeStream : dictionary:"/home/OpenFOAM/run/nodiscnohole/0/k/internalField" master-only-reading:0 #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 ? in "/lib64/libc.so.6" #3 __dynamic_cast in "/share/apps/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-sxbf4jq6ghmoybsjlpqz2dm2qbbxzfyn/lib64/libstdc++.so.6" #4 codeStream_23a0d398c3a7832a27cebf619e5246f9d1ba5a30addr2line: DWARF error: can't find .debug_ranges section. at ??:? #5 Foam::functionEntries::codeStream::run(Foam::dictionary const&, Foam::Istream&) at ??:? #6 Foam::functionEntries::codeStream::execute(Foam::dictionary const&, Foam::primitiveEntry&, Foam::Istream&) at ??:? #7 Foam::functionEntry::execute(Foam::word const&, Foam::dictionary const&, Foam::primitiveEntry&, Foam::Istream&) at ??:? #8 Foam::primitiveEntry::expandFunction(Foam::functionName const&, Foam::dictionary const&, Foam::Istream&) at ??:? #9 Foam::primitiveEntry::append(Foam::token const&, Foam::dictionary const&, Foam::Istream&) at ??:? #10 Foam::primitiveEntry::read(Foam::dictionary const&, Foam::Istream&) at ??:? #11 Foam::primitiveEntry::readEntry(Foam::dictionary const&, Foam::Istream&) at ??:? #12 Foam::primitiveEntry::primitiveEntry(Foam::keyType const&, Foam::dictionary const&, Foam::Istream&) at ??:? #13 Foam::entry::New(Foam::dictionary&, Foam::Istream&) at ??:? #14 Foam::dictionary::read(Foam::Istream&, bool) at ??:? #15 Foam::dictionary::dictionary(Foam::fileName const&, Foam::dictionary const&, Foam::Istream&) at ??:? #16 Foam::dictionaryEntry::dictionaryEntry(Foam::keyType const&, Foam::dictionary const&, Foam::Istream&) at ??:? #17 Foam::entry::New(Foam::dictionary&, Foam::Istream&) at ??:? #18 Foam::dictionary::read(Foam::Istream&, bool) at ??:? #19 Foam::operator>>(Foam::Istream&, Foam::dictionary&) at ??:? #20 Foam::IOdictionary::readData(Foam::Istream&) at ??:? #21 Foam::fileOperations::uncollatedFileOperation::read(Foam::regIOobject&, bool, Foam::IOstream::streamFormat, Foam::word const&) const at ??:? #22 Foam::regIOobject::readHeaderOk(Foam::IOstream::streamFormat, Foam::word const&) at ??:? #23 Foam::localIOdictionary::localIOdictionary(Foam::IOobject const&, Foam::word const&) at ??:? #24 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields() at ??:? #25 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) at ??:? #26 ? at ??:? #27 ? at ??:? #28 __libc_start_main in "/lib64/libc.so.6" #29 ? at ??:? Segmentation fault (core dumped) Can anyone help on that please? |
|
July 17, 2023, 06:22 |
|
#2 |
New Member
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3 |
I only have this problem when I apply a particular profile for k, but there is no problem to do it with U. Have any idea to explain why ?
|
|
Tags |
codestream, error, k-epsilon |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with codeStream in chtMultiregionFoam case | Chris T | OpenFOAM Running, Solving & CFD | 1 | February 20, 2024 15:59 |
codeStream cannot perform | mill | OpenFOAM | 2 | July 11, 2022 00:28 |
CodeStream Error | EzgiCFD | OpenFOAM Running, Solving & CFD | 0 | January 31, 2022 14:38 |
Postprocess: sampleDict works but creates no output folder | shock77 | OpenFOAM Post-Processing | 14 | November 15, 2021 09:27 |
PROBLEMS DEFINING A LIST USING #CODESTREAM !! Help please !! | angatri_14 | OpenFOAM Programming & Development | 1 | August 21, 2020 18:16 |