# User Field Function - interpolatePositionTable

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

 May 14, 2012, 07:00 User Field Function - interpolatePositionTable #1 Senior Member   Join Date: Dec 2011 Posts: 121 Rep Power: 8 I have a table(x,y,z) with the 4th column of temperature and i want to assign it to my body's wall. The number of the table'e coordinates is less than my cell's coordinates and a little bit different. Therefore i defined a user field function to interpolate it. I used the below code but unfortunately no interpolation can be seen in the temperature distribution(the cells which has not been addressed in table,get a default(300'K) and different temperature of its nearest cells) interpolatePositionTable(@Table("xx"), "Temperature") I appreciate any idea. Thank you in advance.

May 14, 2012, 10:20
#2
Super Moderator

Ryne Whitehill
Join Date: Aug 2009
Posts: 313
Rep Power: 12
Quote:
 Originally Posted by omid88 I have a table(x,y,z) with the 4th column of temperature and i want to assign it to my body's wall. The number of the table'e coordinates is less than my cell's coordinates and a little bit different. Therefore i defined a user field function to interpolate it. I used the below code but unfortunately no interpolation can be seen in the temperature distribution(the cells which has not been addressed in table,get a default(300'K) and different temperature of its nearest cells) interpolatePositionTable(@Table("xx"), "Temperature") I appreciate any idea. Thank you in advance.
You say the coordinates are "a little bit different". What do you mean by this? Your nodes do not necessarily have ot match up, but the surfaces do need to be coincident

Using a table should do the interpolation for you, so there is no need to go through a field function step.

May 16, 2012, 06:59
#3
Senior Member

Join Date: Dec 2011
Posts: 121
Rep Power: 8
Quote:
 Originally Posted by rwryne You say the coordinates are "a little bit different". What do you mean by this? Your nodes do not necessarily have ot match up, but the surfaces do need to be coincident Using a table should do the interpolation for you, so there is no need to go through a field function step.

I have a table of a X machine with a coarser mesh and i want to import it to the X machine with a finer mesh. Due to generating the coarser mesh,there is a little difference between the position of cells in two cases.also there is difference in the number of coordinates.

For simplicity im trying to test it in a sample case.
you can see in the attachment the imported temperature on the finer mesh ,many of blue cells(defualt temperature-300) has not been addressed in the table and it has been set by the software to 300 automatically! neither using table,nor user field function(as i said above) do any interpolation between the cells.

e.g assume we have 3 cells in a line,,the right one is 600"K and the left one is 400. i expect the middle cell would be interpolated to 500. but as you can see in the picture the software use the default value(300) for any unaddressed cells without any interpolation.
Attached Images
 Interpolation.jpg (65.8 KB, 56 views)

Last edited by fshak92; May 16, 2012 at 07:39.

May 16, 2012, 11:24
#4
Super Moderator

Ryne Whitehill
Join Date: Aug 2009
Posts: 313
Rep Power: 12
Quote:
 Originally Posted by omid88 Thank you for the reply. I have a table of a X machine with a coarser mesh and i want to import it to the X machine with a finer mesh. Due to generating the coarser mesh,there is a little difference between the position of cells in two cases.also there is difference in the number of coordinates. For simplicity im trying to test it in a sample case. you can see in the attachment the imported temperature on the finer mesh ,many of blue cells(defualt temperature-300) has not been addressed in the table and it has been set by the software to 300 automatically! neither using table,nor user field function(as i said above) do any interpolation between the cells. e.g assume we have 3 cells in a line,,the right one is 600"K and the left one is 400. i expect the middle cell would be interpolated to 500. but as you can see in the picture the software use the default value(300) for any unaddressed cells without any interpolation.

Hmm. I have always had it interpolate without issues, though I always have planar surfaces (i.e. an inlet/exhaust plane), not complex geometry like yours.

Perhaps try using data mappers? You can export your solution from the coarse file, and import it as a CAE model into the finer mesh.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post lcg44 STAR-CCM+ 1 November 30, 2011 00:13 AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06 asaijo OpenFOAM Installation 9 April 6, 2011 12:21 Subhadeep STAR-CCM+ 8 February 18, 2010 18:19 hannow STAR-CCM+ 3 November 24, 2009 21:20

All times are GMT -4. The time now is 22:51.