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.

Import Data and Interpolation

Please login with a confirmed email address before reporting spam

Hello all,

I need to import data from an .txt file. I used an interpolation function, because it appears that it is the only way to do so. But interpolated data with a linear interpolation are not the same as the ones I wanted to import.

I work under COMSOL V5.2 on the acoustical/frequency domain study.
I need to import data : impedance = f(frequency)); and put them as a impedance boundary during my calculation. The calculation is done for frequencies in range(10,1,8000) and I need the impedance boundary value to change at each frequency step.

It appears that, because of the interpolation, my interpolated impedance values are not the same as the one I import.
I interpolated the impedance data from a table named imp.txt (which contains two columns "freq impedance") with a frequency step of 1Hz from 10Hz to 8000Hz :
10 4.23
11 5.48
12 6.45
...
8000 7.12
and used a linear interpolation and a constant extrapolation.
When I plot the imported data (in a table under Results tab, from the same imp.txt file) and the interpolated ones, the curves don't fit.

I don't know how the interpolation choose its own abscisses and it seems I can't control it ?

Thank you for your help !

Best,

Marie

0 Replies Last Post 11 set 2017, 07:31 GMT-4
COMSOL Moderator

Hello Marie Jeanneteau

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.