|
[Sponsors] |
November 21, 2013, 20:40 |
problem in 'directMappedPatchBase'
|
#1 |
Member
Hua
Join Date: May 2012
Posts: 31
Rep Power: 13 |
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. |
|
November 21, 2013, 20:49 |
|
#2 |
Member
Hua
Join Date: May 2012
Posts: 31
Rep Power: 13 |
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? |
|
November 22, 2013, 07:19 |
|
#3 |
Senior Member
|
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.
|
|
November 22, 2013, 07:31 |
|
#4 |
Member
Hua
Join Date: May 2012
Posts: 31
Rep Power: 13 |
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. |
|
|
|
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 |