CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

Changing the name of a boundary condition produces errors

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 27, 2010, 17:09
Default Changing the name of a boundary condition produces errors
  #1
Member
 
George Pichurov
Join Date: Jul 2010
Posts: 39
Rep Power: 7
jorkolino is on a distinguished road
Hi,

when I try to recompile a boundary condition from the OF sources by just changing its name as a parameter in the makePatchTypeFieldsTypedefs() and makePatchFIelds() functions, I get following errors when executing wmake libso :

error: expected initializer before '<' token.
error: expected initializer before '<' token.
error: expected initializer before '<' token.
................
error: 'mixedFvPatchScalarField' has not been declared
error: 'mixedFvPatchScalarFIeld' was not declared in this scope
...................
error: 'mixedFvPatchVectorFIeld' ...

The boundary condition otherwise compiles well when using the original name (in this case mixed). I tried replacing the name with many allowed names, including such that are present in OF (like fixedValue), with the same error message.
jorkolino is offline   Reply With Quote

Old   January 5, 2011, 22:25
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings George,

It's not advisable to change boundary conditions in the core libraries of OpenFOAM. It's best to create a new library for adding a new boundary condition.

Secondly, "mixedFvPatchScalarField" and "mixedFvPatchScalarFIeld" are Not the same thing, in the eyes of the compiler!! C/C++ is case sensitive, requiring the user to be very cautious of what he or she is doing! Same goes for CFD

For more information on how to add a new boundary condition, see this page in the unofficial wiki: HowTo Adding a new boundary condition

Best regards and good luck!
Bruno
wyldckat is offline   Reply With Quote

Old   January 6, 2011, 04:14
Default
  #3
Member
 
George Pichurov
Join Date: Jul 2010
Posts: 39
Rep Power: 7
jorkolino is on a distinguished road
Hi,

thanks for reply. I had a problem compiling my own library, the problem turned out to be that the file names did not follow a particular syntax: mainly that the name of the B.C. should be the same as the file name prefix before fvPtchField. I.e. if i want a B.C called mixedGeorge, then my file names shoud be mixedGeorgefvPatchField[s].C[H]. Just changing the file names helped to solve the issue. The word "...FIeld.." in my message above was just a typo in the forum.

Regards,
George
jorkolino is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
inlet velocity boundary condition murali CFX 5 August 3, 2012 08:56
Import problem ARC Open Source Meshers: Gmsh, Netgen, CGNS, ... 0 February 27, 2010 11:56
SymmetryPlane Boundary Condition raytracer OpenFOAM Running, Solving & CFD 0 July 11, 2008 17:04
Airfoil boundary condition Frank Main CFD Forum 1 April 21, 2008 18:36
Rotating interpolated boundary condition hani OpenFOAM Running, Solving & CFD 0 July 4, 2006 07:09


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