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

[Other] #codeStream error: fvCFD.H: No such file or directory

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2022, 15:05
Default #codeStream error: fvCFD.H: No such file or directory
  #1
New Member
 
lyb
Join Date: Nov 2022
Posts: 3
Rep Power: 3
lyb99 is on a distinguished road
Hi Foamers! I am using #codeStream for my initial and boundary condition. Here is an excerpt of the 0/q:
Code:
internalField   #codeStream
{
    codeInclude
    #{
		#include "fvCFD.H"
		#include "fvMesh.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());
     	volscalarField alpha(mesh.nCells(), 0.);
     
     	forAll (alpha, i)
     	{
	     const scalar y = mesh.C()[i][1];
	     alpha[i] = y;
     	}
     
     	writeEntry(os, "", alpha);

    #};

};
Then when I try to solve this case with a solver which I wrote, I get this error message about fvCFD.H not existing.

Code:
Create time

Create mesh for time = 0

Reading physicalProperties

Reading field q

Using #codeStream at line 18 in file "/home/openfoam/run/fourgyres/0/q"
Using #codeStream with "/home/openfoam/run/fourgyres/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_5afc64c4de7b05b26548eb961278d42f0428417d.so"
Invoking "wmake -s libso /home/openfoam/run/fourgyres/dynamicCode/_5afc64c4de7b05b26548eb961278d42f0428417d"
wmake libso /home/openfoam/run/fourgyres/dynamicCode/_5afc64c4de7b05b26548eb961278d42f0428417d
    Ctoo: codeStreamTemplate.C
/home/openfoam/run/fourgyres/0/q/#codeStream:22:10: fatal error: fvCFD.H: No such file or directory
compilation terminated.
make: *** [/opt/openfoam10/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/codeStreamTemplate.o] Error 1
Any help will be much appreciated. Thank you!
lyb99 is offline   Reply With Quote

Reply

Tags
boundary condition, codestream, mesh


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
Using PengRobinsonGas EoS with sprayFoam Jabo OpenFOAM Running, Solving & CFD 35 April 29, 2022 15:35
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 09:07
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59


All times are GMT -4. The time now is 23:57.