CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Error compiling your own solver

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By t.teschner

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2021, 20:09
Default Error compiling your own solver
  #1
New Member
 
Elena Espana
Join Date: Aug 2021
Location: Texas
Posts: 19
Rep Power: 4
reespanau is on a distinguished road
I have a solver that compiles in OpenFOAM v1812 but I am trying to compile it in OpenFOAM v8 and it does not work. I wrote it to create a mesh using STL files. Any suggestions. Below you can find the compilation error and I also attached the tool. Thank you All the best.

Making dependency list for source file findBed2dTo3d.C
could not open file triSurface.H for source file findBed2dTo3d.C due to No such file or directory
could not open file triSurfaceFields.H for source file findBed2dTo3d.C due to No such file or directory
could not open file triSurfaceFieldsFwd.H for source file findBed2dTo3d.C due to No such file or directory
could not open file labelledTri.H for source file findBed2dTo3d.C due to No such file or directory
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam8/src/finiteVolume/lnInclude -I/opt/openfoam8/src/meshTools/lnInclude -I/opt/openfoam8/src/surfMesh/lnInclude -I/opt/openfoam8/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam8/src/OpenFOAM/lnInclude -I/opt/openfoam8/src/OSspecific/POSIX/lnInclude -fPIC -c findBed2dTo3d.C -o Make/linux64GccDPInt32Opt/findBed2dTo3d.o
findBed2dTo3d.C:35:10: fatal error: triSurface.H: No such file or directory
#include "triSurface.H"
^~~~~~~~~~~~~~
compilation terminated.
/opt/openfoam8/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/findBed2dTo3d.o' failed
make: *** [Make/linux64GccDPInt32Opt/findBed2dTo3d.o] Error 1


findBed2dTo3d_rosa.zip
reespanau is offline   Reply With Quote

Old   August 17, 2021, 02:00
Default
  #2
Senior Member
 
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 204
Rep Power: 16
t.teschner is on a distinguished road
Well, the error just says that g++ doesn't know where these files are located (and you can tell g++ where they are through the -I flag in your options file. In the EXE_INC, you could try to add the relevant directory, i.e. place -I$(LIB_SRC)/triSurface/triSurfaceFields on your last line and escape the line before with \ so that you have:

Code:
EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/surfMesh/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude \
    -I$(LIB_SRC)/triSurface/triSurfaceFields
I would have though the lnInclude of surfMesh would have taken care of that, but maybe something changed. There are small differences between ESI (v1812) and cfd-direct (v8), this might be one of them. I'm not familiar with v8 but the above may work

There is also a better place to post such questions here on the forum, if the above doesn't solve your issue, you probably get a response quite quickly there.
fportela and reespanau like this.
t.teschner 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
Duplicate library entries when running a solver with custom library francescomarra OpenFOAM Programming & Development 3 May 17, 2022 08:37
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
Divergence problem Smaras FLUENT 13 February 21, 2013 05:03
3d vof Smaras FLUENT 2 February 19, 2013 06:58
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


All times are GMT -4. The time now is 08:48.