CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Failed to compile sprayFoam solver clone (https://www.cfd-online.com/Forums/openfoam-programming-development/194016-failed-compile-sprayfoam-solver-clone.html)

blttkgl October 9, 2017 03:33

Failed to compile sprayFoam solver clone
 
Hey,

I want to create a sprayFoam solver clone and make modifications afterwards.

So I created $FOAM_USER_APPBIN/applications/solvers directory and copied to original solver into this directory.

Changed the .C filename to mysprayFoam and updated the Make/files to :

mysprayFoam.C

EXE = $(FOAM_USER_APPBIN)/mysprayFoam and did not make any other changes.

However when I try to compile the solver with wmake I get the following error:

g++ -std=c++0x -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 -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam4/src/meshTools/lnInclude -I. -I../reactingParcelFoam -I/opt/openfoam4/src/finiteVolume/lnInclude -I/opt/openfoam4/src/sampling/lnInclude -I/opt/openfoam4/src/TurbulenceModels/turbulenceModels/lnInclude -I/opt/openfoam4/src/TurbulenceModels/compressible/lnInclude -I/opt/openfoam4/src/lagrangian/basic/lnInclude -I/opt/openfoam4/src/lagrangian/intermediate/lnInclude -I/opt/openfoam4/src/lagrangian/spray/lnInclude -I/opt/openfoam4/src/lagrangian/distributionModels/lnInclude -I/opt/openfoam4/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam4/src/transportModels/compressible/lnInclude -I/opt/openfoam4/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam4/src/thermophysicalModels/properties/liquidProperties/lnInclude -I/opt/openfoam4/src/thermophysicalModels/properties/liquidMixtureProperties/lnInclude -I/opt/openfoam4/src/thermophysicalModels/properties/solidProperties/lnInclude -I/opt/openfoam4/src/thermophysicalModels/properties/solidMixtureProperties/lnInclude -I/opt/openfoam4/src/thermophysicalModels/thermophysicalFunctions/lnInclude -I/opt/openfoam4/src/thermophysicalModels/reactionThermo/lnInclude -I/opt/openfoam4/src/thermophysicalModels/SLGThermo/lnInclude -I/opt/openfoam4/src/thermophysicalModels/chemistryModel/lnInclude -I/opt/openfoam4/src/thermophysicalModels/radiation/lnInclude -I/opt/openfoam4/src/ODE/lnInclude -I/opt/openfoam4/src/regionModels/regionModel/lnInclude -I/opt/openfoam4/src/regionModels/surfaceFilmModels/lnInclude -I/opt/openfoam4/src/combustionModels/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c mysprayFoam.C -o Make/linux64GccDPInt32Opt/mysprayFoam.o
/opt/openfoam4/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/mysprayFoam.o' failed

mysprayFoam.C:54:33: fatal error: createFieldRefs.H: No such file or directory
compilation terminated.


Do i need to change the Make/options folder too? I don't understand why it cannot find createFieldRefs.H.

Best,

Bulut

blttkgl October 9, 2017 04:04

For anyone who'll face the same problem, it is because sprayFoam solver reads some portions of its source code from reactingParcelFoam, which is defined in the options file as:

-I../reactingParcelFoam \

Just add the following and it will compile:

-I$(FOAM_APP)/solvers/lagrangian/reactingParcelFoam \


Bulut


All times are GMT -4. The time now is 05:17.