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

Problem with compilation of new Boundary Conditions

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 20, 2012, 16:55
Default Problem with compilation of new Boundary Conditions
  #1
New Member
 
Arvind Bharathi
Join Date: Oct 2012
Posts: 6
Rep Power: 13
arvind3008 is on a distinguished road
Dear readers

I am new to Open foam, so please bear with me if the question is trivial. I am trying to create new BC based on advectiveFvPatchField and using rhoPimpleFoam solver.

Following standard procedure, I copied the solver files and advectiveFvPatchField.h and .C to a folder and tried to compile I am getting the following error:

Making dependency list for source file advectiveFvPatchField.C
Making dependency list for source file rhoPimpleFoam.C
SOURCE=rhoPimpleFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam211/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam211/src/finiteVolume/cfdTools -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/rhoPimpleFoam.o
SOURCE=advectiveFvPatchField.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam211/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam211/src/finiteVolume/cfdTools -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/advectiveFvPatchField.o
advectiveFvPatchField.C:38:1: error: redefinition of ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&)’
advectiveFvPatchField.C:38:1: error: ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&)’ previously declared here
advectiveFvPatchField.C:57:1: error: redefinition of ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::advectiveFvPatchField<Type1>&, const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&)’
advectiveFvPatchField.C:57:1: error: ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::advectiveFvPatchField<Type1>&, const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&)’ previously declared here
advectiveFvPatchField.C:74:1: error: redefinition of ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::dictionary&)’
advectiveFvPatchField.C:74:1: error: ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::dictionary&)’ previously declared here
advectiveFvPatchField.C:126:1: error: redefinition of ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::advectiveFvPatchField<Type1>&)’
advectiveFvPatchField.C:126:1: error: ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::advectiveFvPatchField<Type1>&)’ previously declared here
advectiveFvPatchField.C:140:1: error: redefinition of ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::advectiveFvPatchField<Type1>&, const Foam:imensionedField<Type, Foam::volMesh>&)’
advectiveFvPatchField.C:140:1: error: ‘Foam::advectiveFvPatchField<Type1>::advectiveFvPa tchField(const Foam::advectiveFvPatchField<Type1>&, const Foam:imensionedField<Type, Foam::volMesh>&)’ previously declared here
advectiveFvPatchField.C:158:1: error: redefinition of ‘Foam::tmp<Foam::Field<double> > Foam::advectiveFvPatchField<Type1>::advectionSpeed () const’
advectiveFvPatchField.C:158:1: error: ‘virtual Foam::tmp<Foam::Field<double> > Foam::advectiveFvPatchField<Type1>::advectionSpeed () const’ previously declared here
advectiveFvPatchField.C:188:6: error: redefinition of ‘void Foam::advectiveFvPatchField<Type1>::updateCoeffs() ’
advectiveFvPatchField.C:188:6: error: ‘virtual void Foam::advectiveFvPatchField<Type1>::updateCoeffs() ’ previously declared here
advectiveFvPatchField.C:303:6: error: redefinition of ‘void Foam::advectiveFvPatchField<Type1>::write(Foam::Os tream&) const’
advectiveFvPatchField.C:303:6: error: ‘virtual void Foam::advectiveFvPatchField<Type1>::write(Foam::Os tream&) const’ previously declared here
make: *** [Make/linux64GccDPOpt/advectiveFvPatchField.o] Error 1

I think the error has more to do with C++ template definitions. I tried reading up on it and tried a couple of things by changing the template type name etc... but nothing has worked so far. Any help would be appreciated. I have attached the relevant files.

This is my make file settings:
rhoPimpleFoam.C
advectiveFvPatchField.C
EXE = $(FOAM_USER_APPBIN)/myRhoPimpleFoam

Thank you
arvind3008
Attached Files
File Type: h advectiveFvPatchField.H (6.5 KB, 13 views)
File Type: c rhoPimpleFoam.C (2.9 KB, 7 views)
arvind3008 is offline   Reply With Quote

 

Tags
boundary coundition, compilation, errors


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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56
CG, BICGSTAB(2) : problem with matrix operation and boundary conditions moomba Main CFD Forum 2 February 17, 2010 03:37
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 01:54


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