Hi everyone,
I'm also trying to implement the V2F model in OF 2.0. I've 'copied' and compiled a turbulence model and I've tried the same procedure on the code from this forum. I figure it doesn't work because of the different versions - I get errors like: candidate expects 3 arguments, 4 provided, candidate expects 1 argument, 4 provided k0_, epsilon0_ and ‘epsilonSmall_’ was not declared in this scope I'm new to OF and I don't know C++ (but I do understand the structure a bit) and I'm not sure where to look first. Any hint on how I can get this to work would be appreciated! Or also any reason to stop trying as well. Thank you! Andi By the way - a good guide on how to implement your own turbulence model can be found here (PDF): http://www.google.com/url?sa=t&rct=j&q=%20turbulence%20model%20openfoam& source=web&cd=5&ved=0CEMQFjAE&url=http%3A%2F%2Fwww .tfd.chalmers.se%2F~hani%2Fkurser%2FOS_CFD%2Fimple mentTurbulenceModel.pdf&ei=iUw-T7-JJ8Wv8gO_x-CLCA&usg=AFQjCNEXLAXtns-0PXC-fHdNx8y5eiAA8g&cad=rja And an explanation of how to get the V2F model working on older OF versions in Chinese (with google translate): http://translate.google.com/translat...26prmd%3Dimvns Alhasan - I think you're missing a \ in your option file on line 10 (just read through the links - I'm afraid you wont get much further than I did though) |
Hi guys, I advice you use google a little bit more.
For example, when you google those keywords that are missing in version 2.0 you will find that they are from former versions, and then you will find they just moved them to a new class, and what you need to do is simply do the corresponding modifications. Cheers, |
:) I belive in you, lakeat ...
|
Thanks for the hint lakeat! I understand it a bit better now.
|
A student in our group (Yangxiang Shi) ported the v2f model to OpenFOAM 2.1.x. You can download it from here: https://bitbucket.org/albertop/durbi...zindavidsonv2f
|
thanks for sharing :) :)
|
Hi to everyone,
Before I start I have to thank both Alberto and his student for releasing the v2f turbulence model for OpenFOAM. Now, I have tried, mainly because of curiosity, to compile it and use it, in the test case Alberto provided in the github : https://github.com/AlbertoPa/OpenFOA...zinDavidsonV2f. I chose to use the integrated version, so I changed the file file in the directory .../incompressible/RAS/Make, by adding : DurbinLienKalitzinDavidsonV2f/DurbinLienKalitzinDavidsonV2f.C As far as I have seen no change is required for the options file. The DurbinLienKalitzinDavidsonV2f folder is located in the RAS folder and contains: DurbinLienKalitzinDavidsonV2f.C DurbinLienKalitzinDavidsonV2f.H DurbinLienKalitzinDavidsonV2fSetWallDissipation.H I am able to compile it, but when I try to run the test case I get a fatal error saying the LHS and RHS of + have different dimensions. The complete error is: fivos@fivos-desktop:~/OpenFOAM/fivos-2.1.x/run/diffuser$ simpleFoam /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.1.x-72f00f722216 Exec : simpleFoam Date : Mar 14 2012 Time : 23:43:26 Host : "fivos-desktop" PID : 7228 Case : /home/fivos/OpenFOAM/fivos-2.1.x/run/diffuser nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting RAS turbulence model DurbinLienKalitzinDavidsonV2f --> FOAM FATAL ERROR: LHS and RHS of + have different dimensions dimensions : [0 2 -2 0 0 0 0] + [0 2 -3 0 0 0 0] From function operator+(const dimensionSet&, const dimensionSet&) in file dimensionSet/dimensionSet.C at line 514. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so" #2 Foam::operator+(Foam::dimensionSet const&, Foam::dimensionSet const&) in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so" #3 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator+<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensioned<double> const&) in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libincompressibleRASModels.so" #4 Foam::incompressible::RASModels::DurbinLienKalitzi nDavidsonV2f::T() const in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libincompressibleRASModels.so" #5 Foam::incompressible::RASModels::DurbinLienKalitzi nDavidsonV2f::DurbinLienKalitzinDavidsonV2f(Foam:: GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&, Foam::word const&) in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libincompressibleRASModels.so" #6 Foam::incompressible::RASModel::adddictionaryConst ructorToTable<Foam::incompressible::RASModels::Dur binLienKalitzinDavidsonV2f>::New(Foam::GeometricFi eld<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libincompressibleRASModels.so" #7 Foam::incompressible::RASModel::New(Foam::Geometri cField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libincompressibleRASModels.so" #8 main in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/bin/simpleFoam" #9 __libc_start_main in "/lib/libc.so.6" #10 _start in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/bin/simpleFoam" Aborted Anyone else got that? Any ideas? Thanks in advance. |
Quote:
https://bitbucket.org/albertop/durbi...zindavidsonv2f To avoid any further confusion, I remove the link to github. It is there only to submit code to OpenCFD, and it does not make sense for regular users to rely on a forked version. |
Dear Alberto,
Thank you for your answer. I don' t have much experience in modifying OpenFoam (I have used the standard solvers in several cases though), so it is practicaly my first time trying to add something out of the box in the standard OpenFoam installation, thus I would like you to bear with me, If possible. I have tried downloading from bitbucket.org, but I don't exactly understand how the v2f model should be installed: - First of all the DurbinLienKalitzinDavidsonV2f folder, containing the Make folder and the ***.C and the two ***.H files, has to be placed inside the .../src/turbulenceModels/incompressible/RAS folder right? - Is any other modification required to the Make folder located in the .../RAS folder ? How OpenFoam is supposed to enter the DurbinLienKalitzinDavidsonV2f folder if no other modification is made? I am asking these because I have downloaded the DurbinLienKalitzinDavidsonV2f folder (from bitbucket) and placed it into the RAS directory, without changing anything else. However after compilation no new library is generated in the $FOAM_USER_LIBBIN directory. Since I don' t have the libDurbinLienKalitzinDavidsonV2f.so it is pointless to run the test case as it wont work. Alberto are you sure that the problem with the LHS and RHS dimensions is because I have downloaded the github version? Because I dont think there was any significant difference between the source files. Have you made any other modifications to your OpenFoam 2.1.x or are you using the standard version? Thanks in advance and sorry for any incnvenience. |
Quote:
Best, |
Yup, it worked! Thank you for sharing, your support and quick responses Alberto.
|
You're welcome.
|
3 Attachment(s)
Hello Foamers
Maybe it will be interesting for somebody these models: V2F model with realizable conditions Attachment 12132 (it's practically the same as above with only modified conditions for T and L), original V2F Attachment 12133 and zetaF with Davidson correction Attachment 12134. All models implemented in OF 1.6. Good Luck |
Quote:
|
Hi all,
I am resurrecting this old thread because today I have found that the new version of OpenFoam 2.1.x is incompatible with the v2f code (or at least is in my case). I have downloaded today the updated openFoam through git hub, compiled it and afterwards tried to build the libDurbinLienKalitzinDavidsonV2f.so, necessary for running the tutorial case (or any other case with the v2f model). Unfortunately, building the library results to the following errors: Code:
In file included from DurbinLienKalitzinDavidsonV2f.H:28:0, A way to circumvent the building error is to add the following lines: Code:
virtual tmp<fvVectorMatrix> divDevRhoReff //- Return the source term for the momentum equation virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; It needs to be declared there even if it is not used (or at least I understand something like that from my limited C++ on pure virtual functions). After doing so the library is build. The problem now is that when solving a v2f case (with the lib ("libDurbinLienKalitzinDavidsonV2f.so"); in the controlDict) I get the following warnings: Code:
--> FOAM Warning : --> FOAM FATAL ERROR: Unknown RASModel type DurbinLienKalitzinDavidsonV2f To sum up it tells me that it does not find any DurbinLienKalitzinDavidsonV2f model. So I have to ask two things: 1) Has anyone else this issue, or is it just mine? 2) Has anyone any idea for how to fix this? This is not imperative; as far as I seen here (http://www.openfoam.org/mantisbt/view.php?id=468) the v2f model might come up with the new OpenFoam version. Any ideas/comments are appreciated. Thanks in advance (and again thanks Alberto and his team for his contribution). |
The code has no problem to compile.
I think you need to do a search and "replace all" concerning DurbinLienKalitzinDavidsonV2f. Make sure all the file names consistent in all files including Make/files and all other .H files. v2f is a decent model and there is lots room for improvement. Edit ---------- Why not try to put the code in src/turb folder |
Hi fivos,
unfortunately, the code *has* problems to compile with OpenFOAM 2.1.x I assume because of recent changes in the code. I will fix it and commit the corrected code as soon as possible. Updates will be committed here: https://bitbucket.org/albertop/durbi...zindavidsonv2f Best, |
@ 1/153:
I had no problem compiling/running the v2f model with the older version of OpenFoam 2.1.x. It seems that after the new modifications of the OpenFoam structure the problem started. The v2f source is located of course at : .../OpenFOAM-2.1.x/src/turbulenceModels/incompressible/RAS/DurbinLienKalitzinDavidsonV2f @ alberto: Thank you for your prompt answer. It' s good to know that its not an issue of my OpenFoam compilation that v2f does not work. I am looking forward for the new code whenever it is ready. Thanks again Alberto. |
I updated the code on Bitbucket (Elbert Jeyapaul submitted the patch :-)).
Best, |
I confirm that the new implementation of v2f model works with the most recent (as of today) OpenFOAM 2.1.x build.
Thank you Alberto, keep it up. |
All times are GMT -4. The time now is 06:09. |