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

Adding a BC for pointPatchField/tetPolyPatchField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2013, 11:30
Default Adding a BC for pointPatchField/tetPolyPatchField
  #1
Senior Member
 
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 123
Rep Power: 18
hannes is on a distinguished road
Hello,

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:

Code:
template
<
  template<class> class PatchField,
    class Mesh,
    class PointPatch,
  template<class>   class MatrixType
>
class FEMDisplacementPatchVectorField
:
    public FixedValuePointPatchField
    <
        PatchField,
        Mesh,
        PointPatch,
        MatrixType,
        vector
    >
{
....
};
Then I have instantiated the BC for the pointPatchField which works as expected:
Code:
typedef 
FEMDisplacementPatchVectorField<pointPatchField, pointMesh, pointPatch, DummyMatrix> 
FEMDisplacementPointPatchVectorField;

makePointPatchTypeField
(
    fixedValuePointPatchVectorField,
    FEMDisplacementPointPatchVectorField
);
The same works also for the tetPolyPatchField (with either CELL_DECOMP or FACE_DECOMP defined):
Code:
typedef 
FEMDisplacementPatchVectorField<tetPolyPatchField, tetPointMesh, tetPolyPatch, tetFemMatrix> 
FEMDisplacementTetPolyPatchVectorField;


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
Default
  #2
Member
 
Join Date: Sep 2012
Posts: 60
Rep Power: 13
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..
regards,
achyutan
achyutan 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
Boundary condition setting for adding gravity in simpleFoam norkistar OpenFOAM Programming & Development 3 June 15, 2022 04:20
problem with Min/max rho tH3f0rC3 OpenFOAM 8 July 31, 2019 09:48
Adding linear generation in InterFOAM voingiappone OpenFOAM Programming & Development 8 June 14, 2013 00:47
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 17:16


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