CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   V2f turbulence model (https://www.cfd-online.com/Forums/openfoam-solving/58440-v2f-turbulence-model.html)

andi February 17, 2012 08:47

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)

lakeat February 17, 2012 11:01

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,

sandy February 17, 2012 20:06

:) I belive in you, lakeat ...

andi February 18, 2012 05:07

Thanks for the hint lakeat! I understand it a bit better now.

alberto March 11, 2012 06:17

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

Alhasan March 11, 2012 20:41

thanks for sharing :) :)

fivos March 14, 2012 16:57

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.

alberto March 14, 2012 17:39

Quote:

Originally Posted by fivos (Post 349497)
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.

I added a test-case to the bitbucket repository, which is what users with existing installation should use:

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.

fivos March 15, 2012 11:34

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.

alberto March 15, 2012 11:52

Quote:

Originally Posted by fivos (Post 349663)
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.

Simply do as follows:

  1. Execute:
    git clone https://bitbucket.org/albertop/durbi...avidsonv2f.git
  2. Enter the directory containing the code in a terminal and execute: wmake libso
  3. Enter the directory with the tutorial and simply run simpleFoam.
See how the model library is loaded at run-time directly from the controlDict, without any modification to the OpenFOAM main code.


Best,

fivos March 15, 2012 11:58

Yup, it worked! Thank you for sharing, your support and quick responses Alberto.

alberto March 15, 2012 12:00

You're welcome.

romif March 26, 2012 05:05

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

lakeat March 26, 2012 08:59

Quote:

Originally Posted by romif (Post 351453)
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

Many thanks!

fivos September 11, 2012 16:21

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,
                from DurbinLienKalitzinDavidsonV2f.C:52:
/home/fivos/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H: In static member function 'static Foam::autoPtr<Foam::incompressible::RASModel> Foam::incompressible::RASModel::adddictionaryConstructorToTable<RASModelType>::New(const Foam::volVectorField&, const Foam::surfaceScalarField&, Foam::transportModel&, const Foam::word&) [with RASModelType = Foam::incompressible::RASModels::DurbinLienKalitzinDavidsonV2f, Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>, Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]':
/home/fivos/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:134:1:  instantiated from 'Foam::incompressible::RASModel::adddictionaryConstructorToTable<RASModelType>::adddictionaryConstructorToTable(const Foam::word&) [with RASModelType = Foam::incompressible::RASModels::DurbinLienKalitzinDavidsonV2f]'
DurbinLienKalitzinDavidsonV2f.C:70:1:  instantiated from here
/home/fivos/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:122:9: error: cannot allocate an object of abstract type 'Foam::incompressible::RASModels::DurbinLienKalitzinDavidsonV2f'
DurbinLienKalitzinDavidsonV2f.H:47:1: note:  because the following virtual functions are pure within 'Foam::incompressible::RASModels::DurbinLienKalitzinDavidsonV2f':
/home/fivos/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H:208:37: note:    virtual Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::incompressible::turbulenceModel::divDevRhoReff(const Foam::volScalarField&, Foam::volVectorField&) const
/home/fivos/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:122:9: warning: control reaches end of non-void function
make: *** [Make/linux64Gcc45DPOpt/DurbinLienKalitzinDavidsonV2f.o] Error 1

Basically after searching a bit the problem is with divDevRhoReff which was recently introduced in OpenFoam 2.1.x, for treating variable density in e.g. VoF cases (see here: https://github.com/OpenFOAM/OpenFOAM...urbulenceModel)

A way to circumvent the building error is to add the following lines:
Code:

        virtual tmp<fvVectorMatrix> divDevRhoReff
        (
            const volScalarField& rho,
            volVectorField& U
        ) const;

in DurbinLienKalitzinDavidsonV2f.H, after

//- 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 :
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1175
    dlopen error : /home/fivos/OpenFOAM/fivos-2.1.x/platforms/linux64Gcc45DPOpt/lib/libDurbinLienKalitzinDavidsonV2f.so: undefined symbol: _ZNK4Foam14incompressible9RASModels29DurbinLienKalitzinDavidsonV2f13divDevRhoReffERKNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEERNS3_INS_6VectorIdEES4_S5_EE
--> FOAM Warning :
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
    could not load "libDurbinLienKalitzinDavidsonV2f.so"

and eventually

--> 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).

1/153 September 11, 2012 16:26

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

alberto September 11, 2012 17:32

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,

fivos September 12, 2012 03:41

@ 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.

alberto October 5, 2012 17:26

I updated the code on Bitbucket (Elbert Jeyapaul submitted the patch :-)).

Best,

fivos October 6, 2012 09:12

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.

maalan October 29, 2012 10:58

Hi, Alberto!!

First of all thanks for the code! It is useful for me as I work in aerodynamics. My question is: up to the moment I used to running both k-epsilon and k-omega models, and its respectives wall functions for k, epsilon and omega. In addition, I knew how to set up the k and epsilon values in my 0 folder by using the turbulentIntensityKineticEnergyInlet and turbulentMixingLengthDissipationRateInlet boundary conditions. How should I proceed with the v2f model?? the tutorial that comes with the code just set the values for the 4 unknowns...
hope you could help!

Best regards!
Antonio

maalan October 31, 2012 04:23

v2f for OF-1.6
 
Could anyone send to me the v2f code for OF-1.6??

Thanks in advance!

lakeat October 31, 2012 12:15

Hi Antonio,

I'll reply you here. I am not using 1.6-ext right now. But you can post your error message though. Compilation is not that difficult.

But I want to re-state, that I have never had this v2f model work for me (alberto's version and my own version and many others')
So those who have made the code really work, would you please post your results on a simple channel flow?? Because I really think that there is somthing wrong in the code.

maalan October 31, 2012 12:22

Ok!! Thank you for your prompt reply, lakeat!

The point is I have just the OF-1.6 and I am trying to compile the romif codes for such OpenFOAM release. I have set my Make/files and Make/options files as:

Make/files:
DurbinV2F.C
LIB = $(FOAM_USER_LIBBIN)/libmyIncompressibleRASModels

Make/options:
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude

LIB_LIBS = \
-lincompressibleTurbulenceModel \
-lfiniteVolume \
-lmeshTools \
-lcompressibleRASModels \
-lreactionThermophysicalModels \
-lspecie \
-lbasicThermophysicalModels \
-lgenericPatchFields

After doing wmake, the error which I get is (at the end of the compilation):

Make/linux64GccDPOpt/DurbinV2F.o: In function `Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::magSqr<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<Foam ::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> > const&)':
DurbinV2F.C:(.text._ZN4Foam6magSqrINS_10SymmTensor IdEENS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14G eometricFieldIdT0_T1_EEEERKNS5_INS6_IT_S7_S8_EEEE[Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::magSqr<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<Foam ::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> > const&)]+0x144): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
Make/linux64GccDPOpt/DurbinV2F.o:(.data.rel.ro._ZTVN4Foam14incompressib le9RASModels9DurbinV2FE[vtable for Foam::incompressible::RASModels::DurbinV2F]+0x70): undefined reference to `Foam::incompressible::RASModel::printCoeffs()'
Make/linux64GccDPOpt/DurbinV2F.o:(.data.rel.ro._ZTVN4Foam14incompressib le9RASModels9DurbinV2FE[vtable for Foam::incompressible::RASModels::DurbinV2F]+0x78): undefined reference to `Foam::incompressible::RASModel::yPlus(int, double) const'
Make/linux64GccDPOpt/DurbinV2F.o:(.data.rel.ro._ZTIN4Foam14incompressib le9RASModels9DurbinV2FE[typeinfo for Foam::incompressible::RASModels::DurbinV2F]+0x10): undefined reference to `typeinfo for Foam::incompressible::RASModel'
Make/linux64GccDPOpt/DurbinV2F.o:(.data.rel.ro._ZTIN4Foam11wallFvPatchE[typeinfo for Foam::wallFvPatch]+0x10): undefined reference to `typeinfo for Foam::fvPatch'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1

Thank you for your help!
Best,
Antonio

1/153 October 31, 2012 12:39

Okay, these cannot be fixed in one reply, Would you mind send you v2f code to me, I'll compile here and send it back to you.

DANIEL_DOT_WEI_AT_ND_DOT_EDU

1/153 October 31, 2012 13:20

It works here, not sure why you cant make it. I suggest you under
/turbulenceModels/incompressible/RAS folder,
do a "wclean", and "wmake libso" again

maalan October 31, 2012 13:57

Ok, I have done it: wclean and then wmake libso in the RAS folder, and the the same inside the V2F folder, and I got the next error:

[antonio@gauss0 V2F]$ wmake libso
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file DurbinV2F.C
SOURCE=DurbinV2F.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/transportModels -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/specie/lnInclude -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/reactionThermo/lnInclude -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/basic/lnInclude -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I. -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/antonio/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/DurbinV2F.o
/usr/bin/ld: cannot find -lgenericPatchFields
collect2: ld returned 1 exit status
make: *** [/home/antonio/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmyIncompressibleRASModels.so] Error 1

Maybe this one is easier to understand!

1/153 October 31, 2012 14:04

I dont know where did you get this Make/options file
Quote:

Make/options:
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude

LIB_LIBS = \
-lincompressibleTurbulenceModel \
-lfiniteVolume \
-lmeshTools \
-lcompressibleRASModels \
-lreactionThermophysicalModels \
-lspecie \
-lbasicThermophysicalModels \
-lgenericPatchFields
So, link to genericPatchFields is for Official OF version, so delete it and use the ext version's.

I might be wrong, because the ext version on my computer is not the latest one, just do a double check.

maalan October 31, 2012 14:14

Ok! Thank you very much, daniel! I was trying to compile it in the cluster... Now, I will try the same with the OF-1.6 release in my PC later. Otherwise I will compile the OF-1.6-ext and I will try again. I will tell you in a short time.

sandy November 5, 2012 22:00

V2-f version for OF-1.6
 
1 Attachment(s)
Hi, I have no new version about V2-f for OF-1.6, and just explicitly give the coefficent values of DurbinV2's version in order to avoid a lookup file, you know. Attachment is it. Who need it?

s.m September 21, 2013 03:16

hi all
is v2f a low re number turbulence model?
thank you :)

Alhasan September 21, 2013 04:27

From my knowledge No :)
 
Hey,

From my knowledge and from the Durbin's papers i have read, it is for only high reynolds number since they are interested in heat transfer at stagnation point, the benifit from durbins model is it is very good at stagnation point for high reynolds number !!!
never come across a paper with low re and flow close to the wall for aerofoil or impinging-jet (the only stuff i know lol)
k-kl- is a good low Re i from my knowledge

and still i am a student of life so senior member please correct me if i am wrong
and btw the above model attached is a good v2f model but for some reason i am not fully able to validate all experiments with it, im cent percent sure it needs some corrections :)

Best Regards,
Hasan K.J
:)

makayasa January 12, 2016 18:41

Foam warning after running paraFoam
 
Hi all,
after running paraFoam, in the terminal to get a message like this

From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : /home/yasa/OpenFOAM/yasa-2.3.0/platforms/linuxGccDPOpt/lib/libmyIncompressibleRASModels.so: undefined symbol: _ZTIN4Foam14incompressible8RASModelE

FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libmyIncompressibleRASModels.so"

How to fix it? Please help, this is my final assignment

hamide January 13, 2016 10:35

error in v2f
 
hello friends
i'm new in openfoam
i wanna model turbulence flow with v2f model. in the tutorial there isn't any example for this model. i copied one of k-epsilon tutorials and changed it's B.C to what i want. but i faced to an error!!!!
should i add any thing to fvSolution file? is it necessary to change other things?

the error is shown below:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.0-5be49240882f
Exec : pisoFoam
Date : Jan 13 2016
Time : 18:31:56
Host : "hamide-HP-ProBook-4530s"
PID : 4096
Case : /home/hamide/run/tutorials/incompressible/pisoFoam/ras/aaaaV2f
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 turbulence model type RASModel
Selecting RAS turbulence model v2f
bounding v2, min: 0 max: 0.0625 average: 0.0625
v2fCoeffs
{
Cmu 0.22;
CmuKEps 0.09;
C1 1.4;
C2 0.3;
CL 0.23;
Ceta 70;
Ceps2 1.9;
sigmaK 1;
sigmaEps 1.3;
}


Starting time loop

Time = 5e-05

Courant Number mean: 0.0003125 max: 0.529571
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 7.05865e-06, No Iterations 7
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 9.57628e-06, No Iterations 7
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.098608, No Iterations 539
time step continuity errors : sum local = 6.163e-05, global = -8.17162e-07, cumulative = -8.17162e-07
DICPCG: Solving for p, Initial residual = 0.0235598, Final residual = 9.65185e-07, No Iterations 582
time step continuity errors : sum local = 1.48876e-06, global = -1.1141e-10, cumulative = -8.17274e-07
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#6 Foam::incompressible::RASModels::v2f::correct() in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#7
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/pisoFoam"
#8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/pisoFoam"
Floating point exception (core dumped)



would you please help me?
:(

dneves January 15, 2018 07:19

do anyone knows why v2-f should not be used in Eulerian multiphase problems
 
Hi everyone

I am a little puzzled because the https://www.cfd-online.com/Wiki/V2-f_models

sais that v2-f turbulence model should not be applied to solve eulerian multifase problems.

Why is that?...?

I am testing a multifase problem (sea waves breaking) and it works fine...I don't understant why should I not use it.

Can anyone enlight me?

Best regards


All times are GMT -4. The time now is 13:01.