# Discussion Forum

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

## How to set scattered points data to be the boundary conditions

Hello, I have a set of heat transfer coefficient data of scattered points. I want to use them as the boundary conditions of my heat transfer calculation. How do I create a function and how to interpolate to achieve such a calculation?

Thank you so much!

Susan

4 Replies Last Post Dec 29, 2021, 9:08 p.m. EST

Posted: 2 years ago
Updated: 2 years ago

Hi Susan,

For this purpose, use an Interpolation node under the Component>Definitions node, where you can import the heat transfer coefficient h as a text file with four columns in 3D: on each row, the correspoding x, y, and z coordinates and the value of the heat transfer coefficient at that point. You can give the interpolated function a descriptive name, such as `h_interp`, and also select the Use spatial coordinates as arguments check box, so that you can use `h_interp(x,y,z)` in the text field for the heat transfer coefficient in the heat transfer physics interface. Also define units for the function (`W/(m^2*K)`) and the arguments (`m`) to avoid unit warnings. You can also try the settings for Interpolation and Extrapolation in the Settings window for the Interpolation node and plot the interpolated data to make sure that it looks as expected.

Best regards,

Magnus

Posted: 2 years ago

Hi Magnus,

Thank you so much for your help and detailed information.

The boundary where I will set h_interp(x,y,z) is a curve. Since the heat transfer coefficients is a function of arc length along the boundary h=f(s) and when I change h=f(s) to h=f(x,y,z) and import into COMSOL, I am not sure if the points are exactly on the boundary. How can I control this?

Thanks and Merry Christmas!

Best wishes, Susan

Posted: 2 years ago

Hi Susan,

With a curved boundary, it becomes more difficult. Perhaps you can make use of the curve parameter `s` in 2D or the surface parameters `s1` and `s2` in 3D. For further assistance, please contact the COMSOL support team.

Best regards,

Magnus

Posted: 2 years ago

Hi Magnus,

Thank you. I will have a try.

It is difficult to understand s1 and s2, so I will first learn to use different kinds of coordinates.

Best wishes,

Susan

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.