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

Implementing v2f turbulence model in 2.1.x - GName not declared error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2014, 07:06
Default Implementing v2f turbulence model in 2.1.x - GName not declared error
  #1
Member
 
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 17
Thangam is on a distinguished road
hi,

Im trying to implement the v2f model in version 2.1.x but without any success.

steps followed:

1) Downloaded the v2f.C and v2f.H files from https://github.com/OpenFOAM/OpenFOAM-2.2.x

2) created a new folder in my /src/turbulenceModels/incompressible/RAS/v2f

3) created a Make folder with files & options:

Files:
Code:
v2f.C
LIB = $(FOAM_USER_LIBBIN)/libmyincompressibleRASModels
options:
Code:
EXE_INC = \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude
LIB_LIBS =
4) used the command 'wmake libso'

but resulted in the following error:

Code:
wmakeLnInclude: linking include files to ./lnInclude
SOURCE=v2f.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  
-DNoRepository -ftemplate-depth-100 -I/home/thangam/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels 
-I/home/thangam/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude -I/home/thangam/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude 
-I/home/thangam/OpenFOAM/OpenFOAM-2.1.x/src/transportModels -I/home/thangam/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I.
 -I/home/thangam/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/thangam/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude 
  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/v2f.o
v2f.C: In member function ‘virtual void Foam::incompressible::RASModels::v2f::correct()’:
v2f.C:367:34: error: ‘GName’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/v2f.o] Error 1
‘GName’ was not declared in this scope is the error. Any ideas where im going wrong?


Thanks.
Thangam is offline   Reply With Quote

Old   January 12, 2014, 08:28
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
From 2.2.2's $FOAM_SRC/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H:

Code:
inline word GName() const
{
    return word(type() + ":G");
}
also IIRC in 2.1.x it should be type() + ".G"
alexeym is offline   Reply With Quote

Old   January 12, 2014, 22:13
Default
  #3
Member
 
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 17
Thangam is on a distinguished road
Quote:
Originally Posted by alexeym View Post
From 2.2.2's $FOAM_SRC/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H:

Code:
inline word GName() const
{
    return word(type() + ":G");
}
also IIRC in 2.1.x it should be type() + ".G"
Hi Alexey,

Thanks for the suggestion. Do you suggest to include the code you have mentioned in my 2.1.x ~/turbulenceModel.H as it is in 2.2.x ? (because you have replaced :G to .G) ? Any idea why this function is included in the 2.2.x and not the 2.1.x?
Thangam is offline   Reply With Quote

Old   January 13, 2014, 02:49
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Quote:
Originally Posted by Thangam View Post
Hi Alexey,

Thanks for the suggestion. Do you suggest to include the code you have mentioned in my 2.1.x ~/turbulenceModel.H as it is in 2.2.x ? (because you have replaced :G to .G) ? Any idea why this function is included in the 2.2.x and not the 2.1.x?
Hi,

You've got several options, two of them are:

1. Replace call to GName() with "RASModel::G" (I've just checked the naming in 2.1.0's kEpsilon.C).

2. Add GName method into turbulenceModel class (turbulenceModel.H) like
Code:
inline word GName() const
{
   return word("RASModel::G");
}
I think string "RASModel::G" was changed to call to GName() for the ease of future renaming of G field.
alexeym 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
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries NickG OpenFOAM Installation 3 December 30, 2019 01:21
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 08:43
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 19:00
OpenFOAM install on Ubuntu Natty 11.04 bkubicek OpenFOAM 13 May 26, 2011 06:48
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23


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