CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   cyclic boundary conditions for FSI (https://www.cfd-online.com/Forums/openfoam-programming-development/116302-cyclic-boundary-conditions-fsi.html)

kanuk April 16, 2013 17:52

cyclic boundary conditions for FSI
 
1 Attachment(s)
Hi All,

I've found out that the current 1.6-ext doesn't support cyclic boundary conditions for adaptive mesh motion (i.e. FSI). As such, I've spent a bit of time trying to figure out how to get around this issue....

At this point, I'm stuck and would really appreciate any insight into my problem. I *think* I'm fairly close, and have based my library off of what's found in src/tetDecompositionFiniteElement. Allwmake runs fine, no complaints.

However, when I include the relevant libs in my controlDict I get the following error:

Code:

...
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning :
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 86
    could not load /home/dave/OpenFOAM/dave-1.6-ext/lib/linux64Gcc46DPOpt/libfaceDecompTetCyclic.so: undefined symbol: _ZTIN4Foam28cyclicTetPolyPatchFaceDecompE
--> FOAM Warning :
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 86
    could not load /home/dave/OpenFOAM/dave-1.6-ext/lib/linux64Gcc46DPOpt/libcellDecompTetCyclic.so: undefined symbol: _ZTVN4Foam28cyclicTetPolyPatchCellDecompE
Create dynamic mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: laplaceFaceDecomposition


--> FOAM FATAL ERROR:
Unknown faceTetPolyPatchFaceDecomp type cyclic.  Valid faceTetPolyPatchFaceDecomp types are :

7
(
wall
processor
wedge
patch
empty
ggi
symmetryPlane
)


    From function faceTetPolyPatchFaceDecomp::New(const polyPatch&, const tetPolyBoundaryMeshFaceDecomp&)
    in file tetPolyMeshFaceDecomp/tetPolyPatches/faceTetPolyPatch/newFaceTetPolyPatchFaceDecomp.C at line 59.

FOAM exiting

Attached is what I have as of now, take a look if you want. I've been learning c++ the past while to make sense of it all, so I'm sure there's something I'm missing. Hopefully it's not too far off....

Cheers,
Dave

ngj April 17, 2013 03:55

Hi David,

In the beginning of your run, it tells you the following:

Quote:

--> FOAM Warning : From function dlLibraryTable::open(const fileName& functionLibName) in file db/dlLibraryTable/dlLibraryTable.C at line 86 could not load /home/dave/OpenFOAM/dave-1.6-ext/lib/linux64Gcc46DPOpt/libfaceDecompTetCyclic.so: undefined symbol: _ZTIN4Foam28cyclicTetPolyPatchFaceDecompE

--> FOAM Warning : From function dlLibraryTable::open(const fileName& functionLibName) in file db/dlLibraryTable/dlLibraryTable.C at line 86 could not load /home/dave/OpenFOAM/dave-1.6-ext/lib/linux64Gcc46DPOpt/libcellDecompTetCyclic.so: undefined symbol: _ZTVN4Foam28cyclicTetPolyPatchCellDecompE
So there seems to be an incompatibility problem with the additional libraries and the solver you are using. If you can get it working, I would be very much interested, as I am facing similar problems; that is periodic domains and mesh motion. I thought I had a robust (and explicit) approach, but it is producing really bad mesh quality:( Therefore, I have decided to start looking at an implicit implementation of the cyclic boundary condition for the tetFem-framework.

Kind regards

Niels

kanuk April 17, 2013 16:02

Thanks Niels for your input.

After checking, I indeed did find the undefined symbols in my user libbin:

Code:

$ nm -u $FOAM_USER_LIBBIN/libCyclicBC* | grep cyclic
                U _ZN4Foam15cyclicPolyPatch8typeNameE
                U _ZTIN4Foam15cyclicPolyPatchE
                U _ZTIN4Foam28cyclicTetPolyPatchCellDecompE
                U _ZTVN4Foam28cyclicTetPolyPatchCellDecompE
                U _ZN4Foam15cyclicPolyPatch8typeNameE
                U _ZTIN4Foam15cyclicPolyPatchE
                U _ZTIN4Foam28cyclicTetPolyPatchFaceDecompE
                U _ZTVN4Foam28cyclicTetPolyPatchFaceDecompE

However, upon checking if there were any problems with the standard libfaceDecompFiniteElement.so library, I also found the following, related to the processor type BC:

Code:

$nm -u $FOAM_LIBBIN/libfaceDecompFiniteElement.so | grep processor
                U _ZN4Foam18processorPolyPatch8typeNameE
                U _ZTIN4Foam18processorPolyPatchE

So, maybe I've based my cyclic BC on a base class that already isn't compatible? If so, I'm not sure how to move forwards with this....

ngj April 18, 2013 01:30

Hi David,

I will give your code a try myself later today (if the time allows), so could you tell me, what solver you have been using?

I have a vague feeling of the reason for your problems, but it is too vague for me to put in words:)

Kind regards

Niels

ngj April 18, 2013 04:55

Hi David,

I can reproduce the error, if I am using moveDynamicMesh.

On the other hand, if I use a small tool for mesh motion, which I made myself, then it does recognise your cyclic boundary condition and subsequently crashes with another error:(

I have tried looking around and changing the include-statements and the linking properties of moveDynamicMesh.C and Make/options, though, I have not been able to isolate the problem. Though, if I were you, I would start to add a lot of include-statements related to the tetFem-framework to the solver, which you are using and test, whether this resolves your problem.

I can unfortunately not share my successful code with you, as it hinges on a large internal development project.

Kind regards

Niels

ngj April 19, 2013 03:36

Hi David,

It occurred to me that my include statements in the project development could be helpful. Below are those related to the 1.6-ext release; all includes related to the project have been removed:

Code:

#include "addToRunTimeSelectionTable.H"
#include <algorithm>
#include "autoPtr.H"
# include <cassert>
#include "cellSet.H"
#include "cellZone.H"
#include "coordinateSystem.H"
#include "cyclicFvPatch.H"
#include "displacementFvMotionSolver.H"
#include "dynamicFvMesh.H"
#include "edgeInterpolationScheme.H"
#include "elementFields.H"
#include "faceTetPolyPatchFaceDecomp.H"
#include "faCFD.H"
#include "faMesh.H"
#include "fieldTypes.H"
#include "fixedValueFvPatchFields.H"
#include "fixedValuePointPatchFields.H"
#include "fixedValueTetPolyPatchFields.H"
#include "fvCFD.H"
#include "fvcMeshPhi.H"
#include "fvMesh.H"
#include "fvMeshSubset.H"
#include "fvPatchField.H"
#include "fvPatchFieldMapper.H"
#include "fvPatchFields.H"
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_multiroots.h>
#include <gsl/gsl_vector.h>
#include "hydrodynamicProperties.H"
#include "incompressible/RAS/RASModel/RASModel.H"
#include "interpolateXY.H"
#include "IOdictionary.H"
#include "IOList.H"
#include "lduMatrix.H"
#include "mapPolyMesh.H"
#include "mathematicalConstants.H"
#include "mixedFvPatchFields.H"
#include "motionDiff.H"
#include "objectRegistry.H"
#include "pointPatchFields.H"
#include "polyMesh.H"
#include "regIOobject.H"
#include "runTimeSelectionTables.H"
#include "scalarSquareMatrix.H"
#include "SortableList.H"
#include "subCycle.H"
#include "surfaceFields.H"
#include "Switch.H"
#include "tetDecompositionMotionSolver.H"
#include "tetFec.H"
#include "tetFem.H"
#include "tetFemMatrices.H"
#include "tetFemMatrix.H"
#include "tetPointFields.H"
#include "tetPolyMesh.H"
#include "tetPolyMeshMapper.H"
#include "tetPolyPatchFields.H"
#include "Time.H"
#include "Tuple2.H"
#include "uniformDimensionedFields.H"
#include "volFields.H"
#include "wallFvPatch.H"
#include "wallPolyPatch.H"

Have a nice weekend

Niels

kanuk April 19, 2013 14:54

Hi Niels,

Thanks for providing your included header files!

Unfortunately though, after including them in my solver (icoFsiFoam) I still end up with the same error as stated previously.

And, without a more verbose error message (and my limited c++ experience) it may take awhile to find where the problem is...

Regardless, I'm still looking into it. Will let you know if I come up with anything.
Cheers
Dave

kanuk April 25, 2013 14:29

1 Attachment(s)
It's a shot in the dark, but here's a newer version of the cyclic BC. Basically I replaced a few member functions from the processor type BC with the ones needed for the cyclic type BC, and with some changing of class names, it still compiles fine.

Unfortunately though, I still get the same error message about undefined symbols. I was hoping it worked for your case though, Niels...

Like I said, likely this is a no. But maybe worth a try.

Attachment 21149

ngj May 3, 2013 03:28

Hi David,

I am sorry that I have not answered before, though, I have been busy and will also be so in the coming time, thus I do not think that I will have time to take a look on the code.

Good luck,

Niels

hxaxtma March 7, 2014 03:44

I am struggling with the same case, need to use cyclicGgi BCs, you got any solution on that?

Jiricbeng April 25, 2014 02:52

Do you have an example for cyclic BC of a rotating segment of rotor domain, just an example..


All times are GMT -4. The time now is 20:04.