CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   User Field Function - interpolatePositionTable (http://www.cfd-online.com/Forums/star-ccm/101781-user-field-function-interpolatepositiontable.html)

fshak92 May 14, 2012 07:00

User Field Function - interpolatePositionTable
 
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.

rwryne May 14, 2012 10:20

Quote:

Originally Posted by omid88 (Post 360934)
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.

fshak92 May 16, 2012 06:59

1 Attachment(s)
Quote:

Originally Posted by rwryne (Post 360978)
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.

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.

rwryne May 16, 2012 11:24

Quote:

Originally Posted by omid88 (Post 361390)
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.


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