CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Pre-Processing

Surface interpolation of tensors

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

Like Tree2Likes
  • 2 Post By hjasak

LinkBack Thread Tools Display Modes
Old   August 15, 2007, 05:29
Default I am trying to interpolate a t
New Member
Björn Andersson
Join Date: Mar 2009
Posts: 2
Rep Power: 0
andebjor is on a distinguished road
I am trying to interpolate a tensor that is used in the laplacian.

The first problem I encountered was that the weight in the interpolation is a scalar, which limits me to interpolate all elements in the tensor in the same way, something that is too limiting for my application.

The second problem I discovered was that it is in fact not possible to specify your own interpolation scheme for tensors, only scalars.

The questions are as follows:

1. Am I correct in the above?

2. Does anyone have a solution to the above problems, or lacking that, pointers on how to go about to solve them?

andebjor is offline   Reply With Quote

Old   August 22, 2007, 12:54
Default Hello Bjorn, 1) You are cor
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,806
Rep Power: 25
hjasak will become famous soon enough
Hello Bjorn,

1) You are correct in the above: the standard interpolation classes will interpolate all components of a vector or a tensor in an identical manner. Doing anything else would probably violate Galilean invariance, but ultimately that depends on your model.

2) Solutions are easy. Basically, create a surfaceTensorField of any kind you wish and create a number of interpolators (I take it some elements of your tensor will be bounded and others won't).

You can now use the .component(...) function to access components one at a time and a .replace(...) function to put the result into the surface field component by component.

This should allow you to perform the interpolation in any way you can imagine.


brucechen and adambarfi like this.
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting:
hjasak is offline   Reply With Quote

Old   August 23, 2007, 03:08
Default Thanks for your answer. You
New Member
Björn Andersson
Join Date: Mar 2009
Posts: 2
Rep Power: 0
andebjor is on a distinguished road
Thanks for your answer.

Your solution is close to what I ended up doing. I simply copied the interpolate function and added a loop over the components and calculated the weights locally in the function.

andebjor is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
tensors cofactors maka OpenFOAM Running, Solving & CFD 3 November 30, 2008 08:32
4thorder surface normal gradient interpolation smehdi609 OpenFOAM Running, Solving & CFD 0 June 13, 2008 19:52
Fourth order surface normal gradient interpolation adona058 OpenFOAM Running, Solving & CFD 8 September 24, 2007 15:12
Surface interpolation scheme with tensors as weighting factors jutta OpenFOAM Running, Solving & CFD 1 August 27, 2007 11:00
interpolation and line surface Q FLUENT 0 November 9, 2005 05:07

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