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

Problem compiling custom boundary condition as a library

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

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2014, 11:12
Post Problem compiling custom boundary condition as a library
  #1
Member
 
Vincent Leroy
Join Date: Jul 2012
Location: Rhode-Saint-Genèse, Belgium
Posts: 43
Rep Power: 14
leroyv is on a distinguished road
Dear OpenFOAM programmers,

I am learning how to write my own boundary conditions. This BC represents a mass source term at a reacting boundary. The velocity on the patch is non zero, orthogonal to the patch, and depends on the local density of the fluid and solid phase. I designed it after the oscillatingFixedValue and surfaceNormalFixedValue patches. The header and implementation files are attached.

When I try to compile the llibrary using the wmake libso command, wmake and GCC throw the following error messages (we have some French in there, sorry for that):
Code:
In file included from pyrolysisVelocityFvPatchField.C:26:0:
pyrolysisVelocityFvPatchField.H:243:1: erreur: ‘patch’ has not been declared
pyrolysisVelocityFvPatchField.H:243:1: erreur: expected constructor, destructor, or type conversion before ‘;’ token
pyrolysisVelocityFvPatchField.H:243:1: erreur: ‘patchMapper’ has not been declared
pyrolysisVelocityFvPatchField.H:243:1: erreur: expected constructor, destructor, or type conversion before ‘;’ token
pyrolysisVelocityFvPatchField.H:243:1: erreur: expected constructor, destructor, or type conversion before ‘;’ token
make: *** [Make/linux64GccDPOpt/pyrolysisVelocityFvPatchField.o] Erreur 1
Line 243 of pyrolysisVelocityFvPatchField.H is where we find the makePatchField macro. I double checked with other non templated BCs using this macro, and it seems to me like I'm using it correctly. I honestly don't have an idea of what is missing there, does anyone know what is wrong with my code? Any missing constructors or something? I had to remove a few things when I wrote the code, like the mapper methods; are they required?

Vincent
Attached Files
File Type: zip pyrolysisVelocity.zip (4.2 KB, 19 views)
leroyv is offline   Reply With Quote

Old   January 21, 2014, 11:39
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,

It seems that you forgot

Code:
#include "addToRunTimeSelectionTable.H"
And AFAIR usually makePatchTypeFIield macro is in implementation file (C).
leroyv likes this.
alexeym is offline   Reply With Quote

Old   January 21, 2014, 11:44
Smile Solved
  #3
Member
 
Vincent Leroy
Join Date: Jul 2012
Location: Rhode-Saint-Genèse, Belgium
Posts: 43
Rep Power: 14
leroyv is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

It seems that you forgot

Code:
#include "addToRunTimeSelectionTable.H"
And AFAIR usually makePatchTypeFIield macro is in implementation file (C).
Dear Alexey,

Thank you for your answer, it solved the compilation errors.
leroyv is offline   Reply With Quote

Reply

Tags
boundary condition, library, openfoam, patch

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
problem about pressure boundary condition at sharp corner yhaomin2007 OpenFOAM Running, Solving & CFD 1 January 19, 2016 10:24
Radiation interface hinca CFX 15 January 26, 2014 18:11
Pressure Boundary Condition Problem rbjet CFX 3 July 15, 2013 22:45
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 07:49
a problem with Boundary condition M Rad Main CFD Forum 12 November 27, 1998 13:49


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