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

Surface interpolation of tensors

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

Like Tree3Likes
  • 3 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 15, 2007, 06:29
Default I am trying to interpolate a t
  #1
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?

TIA,
Björn
andebjor is offline   Reply With Quote

Old   August 22, 2007, 13:54
Default Hello Bjorn, 1) You are cor
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,902
Rep Power: 33
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.

Enjoy,

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

Old   August 23, 2007, 04:08
Default Thanks for your answer. You
  #3
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.

/Björn
andebjor 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
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 20:52
Fourth order surface normal gradient interpolation adona058 OpenFOAM Running, Solving & CFD 8 September 24, 2007 16:12
Surface interpolation scheme with tensors as weighting factors jutta OpenFOAM Running, Solving & CFD 1 August 27, 2007 12:00
interpolation and line surface Q FLUENT 0 November 9, 2005 05:07


All times are GMT -4. The time now is 05:03.