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

problem in 'directMappedPatchBase'

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2013, 20:40
Default problem in 'directMappedPatchBase'
  #1
Member
 
hua1015's Avatar
 
Hua
Join Date: May 2012
Posts: 31
Rep Power: 13
hua1015 is on a distinguished road
Hi, foamers,
I want to create a 2D simulation just like the Openfoam-1.6-ext chtMultiRegionFoam using mixed coupled boundary condition.
After compiled successfully, but fail in my case.
here is the error:
--> FOAM FATAL ERROR:

patch type 'genericPatch' not type 'directMappedPatchBase'
for patch UP of field B in file "/home/junhuapan/OF_tutorials/i_c_mhd/0/fluid/B"

From function MixedBCoupledFvPatchScalarField::MixedBCoupledFvPa tchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)

in file coupledFvPatchFields/regionCoupleB/MixedBCoupledFvPatchScalarField.C at line 91.
hua1015 is offline   Reply With Quote

Old   November 21, 2013, 20:49
Default
  #2
Member
 
hua1015's Avatar
 
Hua
Join Date: May 2012
Posts: 31
Rep Power: 13
hua1015 is on a distinguished road
I have modify 'boundary' file,but the same problem.
Also I search in the forum for the same answer,some one say it may be the different OpenFOAM's edition problem.
my opinion is that maybe I should add my own 'boundary type' into OpenFOAM,
so the program will know it,and attach it.
I don't know whether my opinion is right and have not idea about adding a new boundary type.
Could anyone give your suggestions?
hua1015 is offline   Reply With Quote

Old   November 22, 2013, 07:19
Default
  #3
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
For adding a new boundary type, I suggest to copy the source code of one of the standard boundaries into a new folder under your control. Then you make the changes needed, create the makefile and compile it with a new title to $FOAM_USER_LIBBIN with "wmake libso". Then source the console anew or restart the console window. Afterwards you should be able to use the new boundary condition by including the newlibrary.so you created within the controlDict file.
Linse is offline   Reply With Quote

Old   November 22, 2013, 07:31
Default
  #4
Member
 
hua1015's Avatar
 
Hua
Join Date: May 2012
Posts: 31
Rep Power: 13
hua1015 is on a distinguished road
Thanks Bernhard.
I also find a similar way in the openfoamwiki.
HowTo Adding a new boundary condition
First look at groovyBC. If this isn't suitable, follow these steps below.
Choose a boundary condition that is close to the one you want - we'll call it originalFvPatchField.
Copy the directory contents to anywhere (say run/myCode).
Rename all the copied files to a new name (say customFvPatchField).
Search & replace all text in all the new files old name for new name (originalFvPatchField replaced with customFvPatchField)
Modify the code to suit your needs.
Create the directory structure: myCode/Make, and create files and options in it.
Put the relevant info into files:
Search for originalFvPatchField in finiteVolume/Make/files.
Copy the relevant entry (entries) into your myCode/Make/files
Rename the entries as necessary - rename it with your customFvPatchField naming (if there's an s on the end, keep it there).
Tell it what the new library name will be. Use $(FOAM_USER_LIBBIN) instead of $(FOAM_LIBBIN), and add lib to the front of the new name. It should look something like: LIB = $(FOAM_USER_LIBBIN)/libcustomPatchField
The options file should have EXE_INC (for any includes such as -I$(LIB_SRC)/finiteVolume/lnInclude for finiteVolume) and LIB_LIBS (for included libraries, such as -lfiniteVolume for finiteVolume). Look at other LIB_LIBS for examples.
$wmake libso
Add whatever new dictionary entries are needed to your initial conditions files, such as 0/U and 0/P files.
Add libs ( "libcustomFvPatchField.so" "libOpenFOAM.so" ) to controlDict
It should run now.
hua1015 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
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


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