CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Is there a way to access fvMesh of neighbor region from coupled pointPatch? (http://www.cfd-online.com/Forums/openfoam-programming-development/110634-there-way-access-fvmesh-neighbor-region-coupled-pointpatch.html)

alundilong December 16, 2012 22:55

Is there a way to access fvMesh of neighbor region from coupled pointPatch?
 
Hi,
I'm trying to couple interface points by moving the points at the interface which is shared by two regions simultaneously. (Actually, the shared nodes are two group of nodes, just share the locations)

since I'm moving the nodes, start from the pointPatch will be easier. Now my problems is I cannot access the neighbor region's fvMesh from pointPatch.

turbulentTemperatureCoupledBaffleFvPatchScalarFiel d.H is a good example of doing similar work, but it is on fvPatch level.

deepsterblue December 16, 2012 23:15

Its probably better to do this at a higher level, so that fluxes, etc are calculated correctly. You can do that via the mesh.movePoints member. Look at patchToPatchInterpolation to see how it can be done.

alundilong December 17, 2012 14:47

Quote:

Originally Posted by deepsterblue (Post 397829)
Its probably better to do this at a higher level, so that fluxes, etc are calculated correctly. You can do that via the mesh.movePoints member. Look at patchToPatchInterpolation to see how it can be done.

Thanks for your suggestion.

I make it happen by giving the regions names through boundary conditions which will be used to find out meshes in neighbour regions as
const dynamicFvMesh & locMesh = mesh.objectRegistry:: parent().lookupObject<dynamicFvMesh>(locRegionName _);
const dynamicFvMesh & nbrMesh = mesh.objectRegistry:: parent().lookupObject<dynamicFvMesh>(nbrRegionName _);

// update boundary patches

vectorField:: operator=(sd);//locPatch

const_cast<dynamicMultiRegionPointPatchCoupled&>
(
nbrField
).vectorField:: operator=(sd);//nbrPatch

// sd is the moving distance of those shared nodes

the test shows it works nice, and the local region's node locations are updated, but I found the node's location is not updated at all in the neighbour region.


All times are GMT -4. The time now is 17:16.