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

GGIInterpolation

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

Like Tree3Likes
  • 1 Post By hjasak
  • 2 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2009, 05:18
Default GGIInterpolation
  #1
Member
 
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 99
Rep Power: 17
r2d2 is on a distinguished road
Hi All,
I am trying to use the GGI interpolation tools to do a better job at interpolating scalar/vector fields inbetween two non-conformal patches.
I am stuck with the syntax.

Before I did,( e.g in a two mesh case setup).

label label1 = mesh1.boundaryMesh().findPatchID("patch1");
vectorField &Up1 = U1.boundaryField()[label1];

label label2 = mesh2.boundaryMesh().findPatchID("patch2");
vectorField &Up2 = U2.boundaryField()[label2];

patchToPatchInterpolation p1_to_p2
(
mesh1.boundaryMesh()[label1],
mesh2.boundaryMesh()[label2]
);

vectorField Uinterp_p1_to_P2 = p1_to_p2.faceInterpolate(Up1);
...etc (say compare with Up2...and do other stuff)


What would be the equivalent using GGIInterpolation?

It doesn´t seem to like:

GGIInterpolation p1_to_p2
(
mesh1.boundaryMesh()[label1],
mesh2.boundaryMesh()[label2]
);

vectorField Uinterp_p1_to_P2 = p1_to_p2.masterToSlave(Up1);

Thanks
Radu
r2d2 is offline   Reply With Quote

Old   January 5, 2011, 17:05
Default GGIInterpolation
  #2
New Member
 
Brent Craven
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 21
Rep Power: 17
brent_craven is on a distinguished road
Hi Radu,
Did you ever get this to work? I am trying to do something similar.

Thanks!
brent_craven is offline   Reply With Quote

Old   January 7, 2011, 07:20
Default
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,904
Rep Power: 33
hjasak will become famous soon enough
Hello Radu,

Just like in PatchToPatch, GGI has also got 2 levels:
- a template level, with the patch type as argument (capital letters)
- a typedef for patches

This allows me to do the interpolation either between stand-alone patches (which are face lists) or between boundary patches (which are slices). Thus, if you do:

ggiInterpolation p1_to_p2
(
mesh1.boundaryMesh()[label1],
mesh2.boundaryMesh()[label2]
);

vectorField Uinterp_p1_to_P2 = p1_to_p2.masterToSlave(Up1);

it will work. Watch out for lowercase.

Hrv
hua1015 likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 7, 2011, 09:19
Default
  #4
New Member
 
Brent Craven
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 21
Rep Power: 17
brent_craven is on a distinguished road
Thanks for the reply - that is quite useful. Thanks, Hrv!

Brent
brent_craven is offline   Reply With Quote

Old   January 11, 2011, 00:15
Default ggiInterpolation Problem
  #5
New Member
 
Brent Craven
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 21
Rep Power: 17
brent_craven is on a distinguished road
Hi Hrv,
There is something wrong here. In 1.6-ext I am implementing GGI interpolation (as you suggest above) in a boundary condition as follows:

const fvMesh& neighbourMesh = db().lookupObject<fvMesh>("Mesh2");
const label& neightbourPatchID = neighbourMesh.boundaryMesh().findPatchID("iPatch") ;

const fvMesh& thisMesh = db().lookupObject<fvMesh>("Mesh1");
const label& thisPatchID = thisMesh.boundaryMesh().findPatchID("iPatch");

ggiInterpolation neighbourToThisPatch
(
neighbourMesh.boundaryMesh()[neightbourPatchID],
thisMesh.boundaryMesh()[thisPatchID]
);


Note that if I replace "ggiInterpolation" with "patchToPatchInterpolation" it works.

I have also tried the templated form of "GGIInterpolation" with no more success. For example:

GGIInterpolation<polyPatch,polyPatch> neighbourToThisPatch
(
neighbourMesh.boundaryMesh()[neightbourPatchID],
thisMesh.boundaryMesh()[thisPatchID]
);


Note that this also works if I replace "GGIInterpolation" with "PatchToPatchInterpolation"
brent_craven is offline   Reply With Quote

Old   January 11, 2011, 04:27
Default
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,904
Rep Power: 33
hjasak will become famous soon enough
You are missing half of the arguments of the constructor - have a look at GGIInterpolation.H:

//- Construct from components
GGIInterpolation
(
const MasterPatch& masterPatch,
const SlavePatch& slavePatch,
const tensorField& forwardT,
const tensorField& reverseT,
const vectorField& forwardSep,
const scalar masterFaceNonOverlapFaceTol = 0.0,
const scalar slaveFaceNonOverlapFaceTol = 0.0,
const bool rescaleGGIWeightingFactors = true,
const quickReject reject = AABB
);

or the way ggiPolyPatch does it:

// Create interpolation for zones
patchToPatchPtr_ =
new ggiZoneInterpolation
(
zone()(),
shadow().zone()(),
forwardT(),
reverseT(),
shadow().separation(), // Slave-to-master separation. Bug fix
0, // Non-overlapping face tolerances
0, // HJ, 24/Oct/2008
true, // Rescale weighting factors. Bug fix, MB.
ggiInterpolation::AABB
);

I would have thought this is an obvious place to look (find-grep?).

Hrv
elvis and hua1015 like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 14, 2011, 05:44
Default
  #7
Member
 
Join Date: Oct 2011
Posts: 37
Rep Power: 14
Peter Müller is on a distinguished road
Hello together

I try to instantiate an object of the class ggiZoneInterpolation. Until now I created a new polyPatch, called mpPolyPatch, derived from polyPatch. Inside of this mpPolyPatch I created an algorithm which is able to generate a structured mesh inside of the surrounding edges of the existing boundary patch. Based on this new vertexes and a corresponding list of faces I created an object of the class primitivePatch, called virtualPrimitivePatch.

Until here everthing works and I can see that the algorithm worked properly by using the writeVTK function and opening the two meshes with pvFoam.

I now tried to create an object of ggiZoneInterpolation with:

ggiZoneInterpolation myGgiZoneInterpolation((*this),virtualPrimitivePat ch);

But this gave me the error that there is no matching function to my call.
I'm quite new in OpenFoam. I thought ggiZoneInterpolation only needs two primitivePatches to calculate the weightings.

Thanks a lot
Peter

Last edited by Peter Müller; November 14, 2011 at 06:00.
Peter Müller is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any update on mixerGgiFvMesh jaswi OpenFOAM Running, Solving & CFD 69 April 20, 2013 13:22


All times are GMT -4. The time now is 14:08.