CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Adding a BC for pointPatchField/tetPolyPatchField

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

LinkBack Thread Tools Display Modes
Old   July 1, 2013, 11:30
Default Adding a BC for pointPatchField/tetPolyPatchField
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 95
Rep Power: 9
hannes is on a distinguished road

I just came across some strange problem which I could not solve yet. Maybe someone has a hint for me:

I have created some user defined BC which I want to use in the "pointDisplacement" field of the fvMotionSolver as well as in the "motionU" field of the tetDecomposition motion solver. I therefore templated the class:

  template<class> class PatchField,
    class Mesh,
    class PointPatch,
  template<class>   class MatrixType
class FEMDisplacementPatchVectorField
    public FixedValuePointPatchField
Then I have instantiated the BC for the pointPatchField which works as expected:
FEMDisplacementPatchVectorField<pointPatchField, pointMesh, pointPatch, DummyMatrix> 

The same works also for the tetPolyPatchField (with either CELL_DECOMP or FACE_DECOMP defined):
FEMDisplacementPatchVectorField<tetPolyPatchField, tetPointMesh, tetPolyPatch, tetFemMatrix> 

makePointPatchTypeField(tetPolyPatchVectorField, FEMDisplacementTetPolyPatchVectorField);
The strange thing is: if I compile with "FACE_DECOMP", everything seems ok i.e. I can select the BC in the "motionU" file. But if I compile with "CELL_DECOMP", the code compiles well, but I cannot select the BC in the field file. My BC class is then not contained in the selection table.
As far as I understand, there should be nothing changed in my code except than defining the appropriate preprocessor symbol. Or do I miss something?

Thanks for any hint.

Best regards, Hannes
hannes is offline   Reply With Quote

Old   July 17, 2013, 09:39
Join Date: Sep 2012
Posts: 60
Rep Power: 5
achyutan is on a distinguished road
Hi hannes,

case 1 : if you have compiled your new boundary condition under openfoam src, then you have to include that executable/ .so file in controlDict of your case.

case 2 : if not as mentioned above, i.e. if you have compiled your b.c separately, you have to recompile your solver by including the new bc file in its header and changing files and options appropriately.

from what i understand based on ur post, case 1 is the solution. hope this helps..
achyutan is offline   Reply With Quote


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
Adding linear generation in InterFOAM voingiappone OpenFOAM Programming & Development 8 June 14, 2013 00:47
problem with Min/max rho tH3f0rC3 OpenFOAM 7 February 23, 2013 06:37
Boundary condition setting for adding gravity in simpleFoam norkistar OpenFOAM Programming & Development 2 February 15, 2013 20:06
car Cd drops after adding inlet and outlet? wh88 FLUENT 0 October 19, 2011 13:23
Help with chtMultiRegionFoam jbvw96 OpenFOAM Running, Solving & CFD 2 December 26, 2010 18:16

All times are GMT -4. The time now is 03:07.