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

OF 2.1.1 error in compiling modified solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2014, 11:58
Default OF 2.1.1 error in compiling modified solver
  #1
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12
anuragm is on a distinguished road
Hi everyone

I made some changes to a solver and while trying to compile it, I get the following error. The solver I am modifying is multiphaseEulerFoam. I have posted the exact changes in this thread.

Code:
+ wmakeLnInclude interfacialModels
wmakeLnInclude: linking include files to interfacialModels/lnInclude
+ wmake libso multiphaseSystem
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file phaseModel/phaseModel.C
Making dependency list for source file diameterModels/diameterModel/diameterModel.C
Making dependency list for source file diameterModels/diameterModel/newDiameterModel.C
Making dependency list for source file diameterModels/constantDiameter/constantDiameter.C
Making dependency list for source file diameterModels/isothermalDiameter/isothermalDiameter.C
Making dependency list for source file alphaContactAngle/alphaContactAngleFvPatchScalarField.C
Making dependency list for source file multiphaseSystem.C
SOURCE=phaseModel/phaseModel.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I../phaseModel/lnInclude -I../interfacialModels/lnInclude -IalphaContactAngle -I/home/misra/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/misra/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/lnInclude -I/home/misra/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/interfaceProperties/lnInclude -I/home/misra/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/phaseModel.o
In file included from /home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/Field.H:360:0,
                 from /home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/DimensionedField.H:42,
                 from /home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricField.H:44,
                 from /home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
                 from /home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricFields.H:34,
                 from /home/misra/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude/volFields.H:37,
                 from phaseModel/phaseModel.H:38,
                 from phaseModel/phaseModel.C:26:
/home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/Field.C: In member function ‘void Foam::Field<Type>::operator=(const Foam::VectorSpace<Form, Cmpt, nCmpt>&)’:
/home/misra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/Field.C:680:42: warning: typedef ‘VSType’ locally defined but not used [-Wunused-local-typedefs]
     typedef VectorSpace<Form,Cmpt,nCmpt> VSType;
                                          ^
phaseModel/phaseModel.C: In constructor ‘Foam::phaseModel::phaseModel(const Foam::word&, const Foam::dictionary&, const Foam::fvMesh&)’:
phaseModel/phaseModel.C:46:13: error: ‘groupName’ is not a member of ‘Foam::IOobject’
             IOobject::groupName("alpha", phaseName),
             ^
phaseModel/phaseModel.C:84:13: error: ‘groupName’ is not a member of ‘Foam::IOobject’
             IOobject::groupName("U", phaseName),
             ^
phaseModel/phaseModel.C:96:13: error: ‘groupName’ is not a member of ‘Foam::IOobject’
             IOobject::groupName("DDtU", phaseName),
             ^
phaseModel/phaseModel.C:107:13: error: ‘groupName’ is not a member of ‘Foam::IOobject’
             IOobject::groupName("phiAlpha", phaseName),
             ^
phaseModel/phaseModel.C:115:26: error: ‘groupName’ is not a member of ‘Foam::IOobject’
     const word phiName = IOobject::groupName("phi", name_);
                          ^
make: *** [Make/linux64GccDPOpt/phaseModel.o] Error 1
Can someone please help me in identifying the error.
anuragm is offline   Reply With Quote

Old   November 26, 2014, 12:45
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
Hi,

in 2.1.1 there's no IOobject::groupName method in IOobject class (basically what the error tells you). Here's code from 2.3.0:

Code:
template<class Name>
inline Foam::word Foam::IOobject::groupName(Name name, const word& group)
{
    if (group != word::null)
    {
        return name + ('.' + group);
    }
    else
    {
        return name;
    }
}
So you can change all your calls to IOobject::groupName to the expressions above, "emulating" the method. I.e.

Code:
IOobject::groupName("alpha", phaseName)
should become

Code:
"alpha" + ('.' + phaseName)
maybe you'll also need brackets.
alexeym is offline   Reply With Quote

Old   November 28, 2014, 10:37
Default
  #3
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12
anuragm is on a distinguished road
Hi Alexey,

Thanks for the reply. I dont understand how it could be a problem with the definition of classes because this is a standard OpenFOAM solver. I just modified it to use RAS (k-epsilon) model instead of LES. No other changes were made. Do you think it could be because of a missing library in the Make/files ?

I will try your solution as well to see if that works.

Regards,
Anurag
anuragm is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 10:52
Error while compiling modified icoFoam: "cannot find lthermophysicalModels" DuarteMagalhaes OpenFOAM Running, Solving & CFD 6 June 15, 2014 15:03
Problem with compiling new solver palazi88 OpenFOAM Programming & Development 2 December 24, 2013 20:52
Error while compiling solver umar82088 OpenFOAM Programming & Development 3 July 8, 2013 03:23
Error in compiling a modified solver immortality OpenFOAM Running, Solving & CFD 3 March 29, 2013 01:29


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