I am trying to couple an overset case in OpenFOAM using the solver overPimpleDyMFoam.
The error message I am receiving is:
--> FOAM FATAL ERROR: (openfoam-2012 patch=210414)
request for pointVectorField pointDisplacement from objectRegistry region0 failed
available objects of type pointVectorField are 0()
From const Type& Foam::objectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh>]
in file /usr/src/packages/BUILD/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 463.
FOAM aborting
I am guessing that the error is preCICE related, but since I am using preCICE 2.2.0 and OpenFOAM-v2012 the version should not be the issue (using the correct version was the solution in the topics mentioned above).
Maybe someone could give me a hint where to look for. If you need files, please let me know.
Addition: It seems, that the issue is not solver-related. At first I was trying overPimpleDyMFoam, but now I am getting the same behaviour with pimpleFoam.
There is no coupling partner included, since the problem is initialization-related.
The overset without PreCICE case is running in OpenFOAM, but please do not expect useful result data.
@JulianSchl could you please rebuild the OpenFOAM adapter in debug mode and upload the solver log file again? It may give us more insights on what fields are available. I see a few special features in your case, so you are probably in uncharted waters at the moment, but we may be able to easily fix this.
I understand now that the problem is really that the mesh motion solver (you are using multiSolidBodyMotionSolver does not define pointDisplacement in the same way as e.g. displacementLaplacian. Therefore, the adapter does not know how to read displacements in this class context.
Since you are trying to use overset, do you also need to use multiSolidBodyMotionSolver? If yes, then you would also need to modify our Displacement.C accordingly.
As far as I know, overset should work with displacementLaplacian (check again Derek Risseeuw’s master’s thesis for details, he had a moving flap there).
Yes, you need to adjust the code in order to use the multiSolidBodyMotionSolver mesh motion solver. If you really need it and want to develop it: any contributions in this direction are very welcome and we could certainly offer some help if you open up a PR
Hi everyone,
great news! @louisgag found a solution to make this overset case work with preCICE!
Explanation of the problem:
At first, there was the attempt to use the multiSolidBodyMotionSolver instead of the solidBodyDisplacementLaplacianFvMotionSolver, since we want to steer the movement of the background mesh and the overset mesh seperatly. It turned out, that preCICE doesn’t support the multiSolidBodyMotionSolver, so we had to come up with another solution. The solidBodyDisplacementLaplacianFvMotionSolver has the problem, that it cannot handle movement in different zones, so in our case, it just rotates the whole domain.
Solution:
The solution is to split up the dynamicMeshDict into two parts which are handled in seperate by the solidBodyMotionSolver and the displacementLaplacianFvMotionSolver respectiveley.
Now the displacement can be handled by preCICE and OpenFOAM takes care of the solidBodyMotion (in our full case we are also coupling the solidBodyMotion manually).
To better understand the approach please see this thread and the code listed below: