|
[Sponsors] |
|
September 7, 2015, 06:34 |
How to set up an own solver
|
#1 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Hi,
I wanted to follow this manual to customize a simpleFoam solver. I followed it as far as possible, but as soon as enter wmake I receive this: Code:
make: *** No rule to make target `simpleFoam.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop. In my folders is no simpleFoam.dep file. I am using OpenFoam 2.4 on Ubuntu 14.04. Did someone experienced that already? Thanks Gerrit |
|
September 7, 2015, 06:54 |
|
#2 |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 13 |
try: wclean and then wmake
This is usually caused by the existing of the old .dep file. |
|
September 7, 2015, 06:58 |
|
#3 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Thanks for the answer, but still the same...
|
|
September 7, 2015, 08:39 |
|
#4 |
Senior Member
|
Hi,
Since usually "I wanted to follow this manual to customize a simpleFoam solver" and the error after means "I missed certain step", my guess will be: your Make/files file still contains simpleFoam.C but you have renamed this file to something more suitable for your purposes (my_neat_little_simple_foam_derivative.C for example). And answering your second question: yes, several times. Use forum search and you will find similar questions asked and answered. |
|
September 7, 2015, 09:05 |
|
#5 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Hi Alex,
you were somehow right! Although I checked my procedure several times, I missed to change the header of the files file... Thanks anyway! Edit: If someone is interested in using simpleFoam with temperatures as a tutorial, this might help: http://www.cloudpyme.eu/wp-content/u...on4-Slides.pdf Last edited by Gerrit; September 8, 2015 at 03:25. Reason: Insert link |
|
September 12, 2015, 10:24 |
|
#6 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Hi,
for my project I need something to track particles, but solve as well as turbulent case. I found a guideline for a combination of simpleFoam and the Lagrangian solidParicle. http://www.tfd.chalmers.se/~hani/kur...tonPersson.pdf I am trying this now for some days, but I cannot build the solver and hope to find some help here. After wmake I receive the following: Code:
Making dependency list for source file injectorSolidParticle.C could not open file cyclicAMIPolyPatch.H for source file injectorSolidParticle.C due to No such file or directory could not open file meshTools.H for source file injectorSolidParticle.C due to No such file or directory Making dependency list for source file injectorSolidParticleIO.C could not open file cyclicAMIPolyPatch.H for source file injectorSolidParticleIO.C due to No such file or directory could not open file meshTools.H for source file injectorSolidParticleIO.C due to No such file or directory Making dependency list for source file injectorSolidParticleCloud.C could not open file cyclicAMIPolyPatch.H for source file injectorSolidParticleCloud.C due to No such file or directory could not open file meshTools.H for source file injectorSolidParticleCloud.C due to No such file or directory Making dependency list for source file injectorSolidParticleFoam.C could not open file cyclicAMILduInterface.H for source file injectorSolidParticleFoam.C due to No such file or directory could not open file cyclicAMIPolyPatch.H for source file injectorSolidParticleFoam.C due to No such file or directory could not open file fvIOoptionList.H for source file injectorSolidParticleFoam.C due to No such file or directory could not open file meshTools.H for source file injectorSolidParticleFoam.C due to No such file or directory could not open file createFvOptions.H for source file injectorSolidParticleFoam.C due to No such file or directory SOURCE=injectorSolidParticle.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam240/src/turbulenceModels -I/opt/openfoam240/src/turbulenceModels/incompressible/RAS/RASModel -I/opt/openfoam240/src/transportModels -I/opt/openfoam240/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam240/src/finiteVolume/lnInclude -I/opt/openfoam240/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/openfoam240/src/OpenFOAM/lnInclude -I/opt/openfoam240/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/injectorSolidParticle.o In file included from /opt/openfoam240/src/lagrangian/basic/lnInclude/Cloud.H:342:0, from injectorSolidParticleCloud.H:40, from injectorSolidParticle.C:26: /opt/openfoam240/src/lagrangian/basic/lnInclude/Cloud.C:34:32: fatal error: cyclicAMIPolyPatch.H: No such file or directory #include "cyclicAMIPolyPatch.H" ^ compilation terminated. make: *** [Make/linux64GccDPOpt/injectorSolidParticle.o] Error 1 Furthermore it becomes really weird as none of the scripts in my folder call that file.... Can someone give a hint how/where to start? Thank you! |
|
September 12, 2015, 16:25 |
|
#7 |
Senior Member
|
Hi,
Since it is Håkan Nilsson's course I would propose that code is for foam-extend and could compile under OpenFOAM with certain corrections. Since the error is caused by cyclicAMIPolyPatch.H, you can try to use Code:
alexey at daphne in src$ pwd /Users/alexey/OpenFOAM/OpenFOAM-2.4.x/src alexey at daphne in src$ find . -name 'cyclicAMIPolyPatch.H' ./meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H ./meshTools/lnInclude/cyclicAMIPolyPatch.H Then if you try to build the code you have attached to the message, you need to add also "-I$(LIB_SRC)/fvOptions/lnInclude" and "-I$(LIB_SRC)/sampling/lnInclude" for Make/options file. After these additions there is only problem at line 103 of injectorSolidParticleCloud.C, and it look like messed up comment. Overall code in the archive looks quite strange in the places with errors. Last edited by alexeym; September 14, 2015 at 13:41. |
|
September 14, 2015, 08:29 |
|
#8 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Hi Alex,
thank you so much for your answer! I did what you told me to! The search for cyclicAMIPolyPatch.H gave the following. Looks like yours in my opinion. Code:
gerrit@gerrit-HP-Pavilion-dv7-Notebook-PC:/opt/openfoam240/src$ find . -name 'cyclicAMIPolyPatch.H' ./meshTools/lnInclude/cyclicAMIPolyPatch.H ./meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H Code:
linux64GccDPOpt/options:62: *** commands commence before first target. Stop. wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created in /home/gerrit/OpenFOAM/gerrit-2.4.0/applications/solvers/injectorSolidParticleFoam Thanks again! Edit: Generally, how can I look in such cases for errors? Take the make/files file and check all listed files by hand? |
|
September 14, 2015, 09:09 |
|
#9 |
Senior Member
|
Hi,
Post your Make/options. This time I can not guess what you have put there. |
|
September 14, 2015, 10:49 |
|
#10 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Hi here you go, the make/options file:
Code:
EXE_INC = \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude -I$(LIB_SRC)/meshTool/lnInclude -I$(LIB_SRC)/fvOptions/lnInclude -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -lincompressibleRASModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -llagrangian \ -lincompressibleTurbulenceModel |
|
September 14, 2015, 10:57 |
|
#11 |
Senior Member
|
Well, as you can see there are \ symbols at the end of certain lines. They are there for purpose - https://www.gnu.org/software/make/ma...ing-Lines.html.
Your addition does not contain \ before new lines, so make (since wmake is just a wrapper around make) is quite unhappy about your addition. Make it: Code:
EXE_INC = \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/meshTool/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -lincompressibleRASModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -llagrangian \ -lincompressibleTurbulenceModel |
|
September 14, 2015, 13:15 |
|
#12 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Ok. I did not know that! Thanks for the input! Now my message after wclean and wmake is again:
Code:
Making dependency list for source file injectorSolidParticle.C could not open file cyclicAMIPolyPatch.H for source file injectorSolidParticle.C due to No such file or directory could not open file meshTools.H for source file injectorSolidParticle.C due to No such file or directory Making dependency list for source file injectorSolidParticleIO.C could not open file cyclicAMIPolyPatch.H for source file injectorSolidParticleIO.C due to No such file or directory could not open file meshTools.H for source file injectorSolidParticleIO.C due to No such file or directory Making dependency list for source file injectorSolidParticleCloud.C could not open file cyclicAMIPolyPatch.H for source file injectorSolidParticleCloud.C due to No such file or directory could not open file meshTools.H for source file injectorSolidParticleCloud.C due to No such file or directory Making dependency list for source file injectorSolidParticleFoam.C could not open file cyclicAMILduInterface.H for source file injectorSolidParticleFoam.C due to No such file or directory could not open file cyclicAMIPolyPatch.H for source file injectorSolidParticleFoam.C due to No such file or directory could not open file cellSet.H for source file injectorSolidParticleFoam.C due to No such file or directory could not open file AMIPatchToPatchInterpolation.H for source file injectorSolidParticleFoam.C due to No such file or directory could not open file meshTools.H for source file injectorSolidParticleFoam.C due to No such file or directory SOURCE=injectorSolidParticle.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam240/src/turbulenceModels -I/opt/openfoam240/src/turbulenceModels/incompressible/RAS/RASModel -I/opt/openfoam240/src/transportModels -I/opt/openfoam240/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam240/src/finiteVolume/lnInclude -I/opt/openfoam240/src/lagrangian/basic/lnInclude -I/opt/openfoam240/src/meshTool/lnInclude -I/opt/openfoam240/src/fvOptions/lnInclude -I/opt/openfoam240/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam240/src/OpenFOAM/lnInclude -I/opt/openfoam240/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/injectorSolidParticle.o In file included from /opt/openfoam240/src/lagrangian/basic/lnInclude/Cloud.H:342:0, from injectorSolidParticleCloud.H:40, from injectorSolidParticle.C:26: /opt/openfoam240/src/lagrangian/basic/lnInclude/Cloud.C:34:32: fatal error: cyclicAMIPolyPatch.H: No such file or directory #include "cyclicAMIPolyPatch.H" ^ compilation terminated. Can I somehow repair that? I guess it's only a link missing The strange part is still that I do not use that file. When I search in my folder (injectorSolidParticleFoam) for it I do not get an answer, meaning it is not used in any of the files... (I searched with the command below) Code:
find . -name 'cyclicAMIPolyPatch.H' |
|
September 15, 2015, 02:27 |
|
#14 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Ok, now we come closer
Code:
injectorSolidParticleCloud.C: In member function ‘void Foam::injectorSolidParticleCloud::move(const dimensionedVector&)’: injectorSolidParticleCloud.C:101:78: error: no matching function for call to ‘Foam::injectorSolidParticle::injectorSolidParticle(Foam::injectorSolidParticleCloud&, Foam::vector&, Foam::label&, Foam::scalar&, Foam::vector&)’ injectorSolidParticle*ptr= new injectorSolidParticle(*this,pos,cellI,d,vel); ^ injectorSolidParticleCloud.C:101:78: note: candidates are: In file included from injectorSolidParticleCloud.H:41:0, from injectorSolidParticleCloud.C:26: injectorSolidParticle.H:131:9: note: Foam::injectorSolidParticle::injectorSolidParticle(const Foam::polyMesh&, Foam::Istream&, bool) injectorSolidParticle ^ injectorSolidParticle.H:131:9: note: candidate expects 3 arguments, 5 provided In file included from injectorSolidParticle.H:259:0, from injectorSolidParticleCloud.H:41, from injectorSolidParticleCloud.C:26: injectorSolidParticleI.H:45:8: note: Foam::injectorSolidParticle::injectorSolidParticle(const Foam::polyMesh&, const vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const vector&) inline Foam::injectorSolidParticle::injectorSolidParticle ^ injectorSolidParticleI.H:45:8: note: candidate expects 7 arguments, 5 provided In file included from injectorSolidParticleCloud.H:41:0, from injectorSolidParticleCloud.C:26: injectorSolidParticle.H:58:7: note: Foam::injectorSolidParticle::injectorSolidParticle(const Foam::injectorSolidParticle&) class injectorSolidParticle ^ injectorSolidParticle.H:58:7: note: candidate expects 1 argument, 5 provided make: *** [Make/linux64GccDPOpt/injectorSolidParticleCloud.o] Error 1 |
|
September 15, 2015, 03:09 |
|
#15 |
Senior Member
|
Hi,
The error is self-explanatory: the number of parameters you have passed to constructor is wrong. Since the tutorial you are referencing was created for OpenFOAM 1.7.x it is not surprising that constructors could be changed. Post your source code, maybe someone will find time to a) download it, b) try to compile it, c) find correct number of arguments to constructor, d) fix other errors, e) post solution here. Also on the page, where you have found PDF file with report, there are tutorials about C++ and OpenFOAM. Read them before posting questions, since programming using forum is slow and counter-productive. |
|
September 15, 2015, 03:18 |
|
#16 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
I will do so! Thanks for your answer and your help so far!
|
|
September 21, 2015, 05:54 |
|
#17 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 10 |
Hi,
I am still working on it and trying to understand the errors... Whatever, I found a page, where they do the same process just instead of simpleFoam with interFoam. As interFoam seems to be made for two phase flow, I am now a little bit confused, if I followed the correct idea... Would interFoam combined with solidParticle a better choice? Or is it as well depending on the particle size? Thanks! |
|
February 28, 2018, 12:21 |
|
#18 |
Senior Member
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10 |
I have prepared injectorSolidParticleFoam using this tutorial from chalmers. when I want " wmake " , this error happens; why?
Code:
injectorSolidParticleCloud.C: In member function ‘void Foam::injectorSolidParticleCloud::move(const dimensionedVector&)’: injectorSolidParticleCloud.C:88:77: error: no matching function for call to ‘Foam::injectorSolidParticle::injectorSolidParticle(Foam::injectorSolidParticleCloud&, Foam::vector&, Foam::label&, Foam::scalar&, Foam::vector&)’ injectorSolidParticle * ptr= new injectorSolidParticle(*this,pos,cellI,d,vel); ^ injectorSolidParticleCloud.C:88:77: note: candidates are: In file included from injectorSolidParticleCloud.H:41:0, from injectorSolidParticleCloud.C:26: injectorSolidParticle.H:142:9: note: Foam::injectorSolidParticle::injectorSolidParticle(const Foam::polyMesh&, Foam::Istream&, bool) injectorSolidParticle ^ injectorSolidParticle.H:142:9: note: candidate expects 3 arguments, 5 provided In file included from injectorSolidParticle.H:272:0, from injectorSolidParticleCloud.H:41, from injectorSolidParticleCloud.C:26: injectorSolidParticleI.H:45:8: note: Foam::injectorSolidParticle::injectorSolidParticle(const Foam::polyMesh&, const barycentric&, Foam::label, Foam::label, Foam::label, Foam::scalar, const vector&) inline Foam::injectorSolidParticle::injectorSolidParticle ^ injectorSolidParticleI.H:45:8: note: candidate expects 7 arguments, 5 provided In file included from injectorSolidParticleCloud.H:41:0, from injectorSolidParticleCloud.C:26: injectorSolidParticle.H:66:7: note: Foam::injectorSolidParticle::injectorSolidParticle(const Foam::injectorSolidParticle&) class injectorSolidParticle ^ injectorSolidParticle.H:66:7: note: candidate expects 1 argument, 5 provided injectorSolidParticle.H:66:7: note: Foam::injectorSolidParticle::injectorSolidParticle(Foam::injectorSolidParticle&&) injectorSolidParticle.H:66:7: note: candidate expects 1 argument, 5 provided make: *** [Make/linux64GccDPInt32Opt/injectorSolidParticleCloud.o] Error 1 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to set up a windtunnel in an OpenFOAM solver | TommiPLaiho | OpenFOAM Pre-Processing | 6 | November 17, 2014 06:56 |
simpleFoam: case only converges with most div schemes set to upwind | buffi | OpenFOAM Running, Solving & CFD | 7 | November 11, 2013 07:54 |
OpenCL linear solver for OpenFoam 1.7 (alpha) will come out very soon | qinmaple | OpenFOAM Announcements from Other Sources | 4 | August 10, 2012 11:00 |
Help with GNUPlot | Renato. | Main CFD Forum | 6 | June 6, 2007 19:51 |
How to set the two parameters of solver binterFoamb | luckyluke | OpenFOAM Running, Solving & CFD | 7 | June 3, 2005 06:33 |