CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

V2f turbulence model

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2012, 08:47
Default
  #41
New Member
 
Andreas
Join Date: Apr 2011
Posts: 2
Rep Power: 0
andi is on a distinguished road
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)
andi is offline   Reply With Quote

Old   February 17, 2012, 11:01
Default
  #42
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
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,
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   February 17, 2012, 20:06
Default
  #43
Senior Member
 
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18
sandy is on a distinguished road
I belive in you, lakeat ...
sandy is offline   Reply With Quote

Old   February 18, 2012, 05:07
Default
  #44
New Member
 
Andreas
Join Date: Apr 2011
Posts: 2
Rep Power: 0
andi is on a distinguished road
Thanks for the hint lakeat! I understand it a bit better now.
andi is offline   Reply With Quote

Old   March 11, 2012, 06:17
Default
  #45
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
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
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

Last edited by alberto; March 14, 2012 at 17:40. Reason: Removed link to github repository.
alberto is offline   Reply With Quote

Old   March 11, 2012, 20:41
Default
  #46
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
thanks for sharing
Alhasan is offline   Reply With Quote

Old   March 14, 2012, 16:57
Default
  #47
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
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:rintStack(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:perator+(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:perator+<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:urbinLienKalitzi nDavidsonV2f::T() const in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libincompressibleRASModels.so"
#5 Foam::incompressible::RASModels:urbinLienKalitzi nDavidsonV2f:urbinLienKalitzinDavidsonV2f(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:ur 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.
fivos is offline   Reply With Quote

Old   March 14, 2012, 17:39
Default
  #48
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by fivos View Post
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:rintStack(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:perator+(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:perator+<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:urbinLienKalitzi nDavidsonV2f::T() const in "/home/fivos/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64Gcc45DPOpt/lib/libincompressibleRASModels.so"
#5 Foam::incompressible::RASModels:urbinLienKalitzi nDavidsonV2f:urbinLienKalitzinDavidsonV2f(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:ur 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.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   March 15, 2012, 11:34
Default
  #49
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
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.
fivos is offline   Reply With Quote

Old   March 15, 2012, 11:52
Default
  #50
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by fivos View Post
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,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   March 15, 2012, 11:58
Default
  #51
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Yup, it worked! Thank you for sharing, your support and quick responses Alberto.
fivos is offline   Reply With Quote

Old   March 15, 2012, 12:00
Default
  #52
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
You're welcome.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   March 26, 2012, 05:05
Default
  #53
New Member
 
Roman
Join Date: Mar 2009
Location: Belarus
Posts: 6
Rep Power: 17
romif is on a distinguished road
Hello Foamers

Maybe it will be interesting for somebody these models: V2F model with realizable conditions V2F.tar.gz (it's practically the same as above with only modified conditions for T and L), original V2F V2F_original.tar.gz and zetaF with Davidson correction zeta_F.tar.gz. All models implemented in OF 1.6.

Good Luck
mgg likes this.
romif is offline   Reply With Quote

Old   March 26, 2012, 08:59
Default
  #54
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Quote:
Originally Posted by romif View Post
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!
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   September 11, 2012, 16:21
Default
  #55
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
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).
fivos is offline   Reply With Quote

Old   September 11, 2012, 16:26
Default
  #56
Member
 
dw
Join Date: Jul 2012
Posts: 32
Rep Power: 13
1/153 is on a distinguished road
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

Last edited by 1/153; September 11, 2012 at 17:50.
1/153 is offline   Reply With Quote

Old   September 11, 2012, 17:32
Default
  #57
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
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,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 12, 2012, 03:41
Default
  #58
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
@ 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.
fivos is offline   Reply With Quote

Old   October 5, 2012, 17:26
Default
  #59
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I updated the code on Bitbucket (Elbert Jeyapaul submitted the patch :-)).

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   October 6, 2012, 09:12
Default
  #60
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
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.
fivos is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing model constants in k-e turbulence model Sunil CFX 3 October 3, 2006 12:12
turbulence model greg FLUENT 3 August 26, 2006 11:07
v2-f model of turbulence abdellah FLUENT 2 February 27, 2005 00:49
HELP! TURBULENCE k-e OR k-omega TURBULENCE MODEL? Mirek Kabacinski FLUENT 5 August 24, 2003 22:31
k-w turbulence model allan Main CFD Forum 4 February 20, 2002 13:05


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