How to set up an own solver
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 |
try: wclean and then wmake
This is usually caused by the existing of the old .dep file. |
Thanks for the answer, but still the same...
|
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. |
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 |
1 Attachment(s)
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 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! |
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 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. |
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' Code:
linux64GccDPOpt/options:62: *** commands commence before first target. Stop. 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? |
Hi,
Post your Make/options. This time I can not guess what you have put there. |
Hi here you go, the make/options file:
Code:
EXE_INC = \ |
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 = \ |
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 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' |
In message #11 I have just copies your options without verifying paths (though it seems, you've copied path from previous messages). Yet, correct path for include compiler flag is
Code:
-I$(LIB_SRC)/meshTools/lnInclude |
Ok, now we come closer :D
Code:
injectorSolidParticleCloud.C: In member function ‘void Foam::injectorSolidParticleCloud::move(const dimensionedVector&)’: |
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. |
1 Attachment(s)
I will do so! Thanks for your answer and your help so far!
|
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! |
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&)’: |
All times are GMT -4. The time now is 12:52. |