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

CodeStream Error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2022, 13:38
Default CodeStream Error
  #1
New Member
 
Join Date: Sep 2021
Posts: 3
Rep Power: 4
EzgiCFD is on a distinguished road
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.

Last edited by EzgiCFD; February 1, 2022 at 05:49.
EzgiCFD 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
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries NickG OpenFOAM Installation 3 December 30, 2019 00:21
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 09:00
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 01:51.