Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Interpolation Function with 2 arguments

Please login with a confirmed email address before reporting spam

Hello people, I have a problem. So, I'm trying to enter Cp(specific heat) as a function of two variables-temperature and magnetic field. Cp as a function of T is accepted under the particular material properties. But when I enter 'Cp(T,H)' it turns orange and says H is an unknown variable.

I have defined H as a time dependent interpolation function under Global Definitions.

And for Cp, I have defined it as an interpolation function depending on 2 arguments(temp and mag. field). I've input a txt file for this purpose.

I have attached the figures for reference.

Please help



3 Replies Last Post 13 avr. 2018, 02:49 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 12 avr. 2018, 17:56 UTC−4

You are calling H intrplotation function which is the function of time as you defined. Threfore you need to type CP(T, H(t))

You are calling H intrplotation function which is the function of time as you defined. Threfore you need to type CP(T, H(t))

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 13 avr. 2018, 02:45 UTC−4

Thanks a lot Sohan sir.

It worked.

Is there any way to know how COMSOL interpolates?

Clearly there are some overlapping values for 0 & 5 tesla. But H is varied in time as per our interpolation. How does it pick values and how does it move from each time step? Can you please shed some light on this?

I've used the following format and values for Temp, H and Cp (notepad file attached). This isn't the complete data. The complete data is as shown in the COMSOL image-attached.

Thanks a lot Sohan sir. It worked. Is there any way to know how COMSOL interpolates? Clearly there are some overlapping values for 0 & 5 tesla. But H is varied in time as per our interpolation. How does it pick values and how does it move from each time step? Can you please shed some light on this? I've used the following format and values for Temp, H and Cp (notepad file attached). This isn't the complete data. The complete data is as shown in the COMSOL image-attached.


Please login with a confirmed email address before reporting spam

Posted: 6 years ago 13 avr. 2018, 02:49 UTC−4

And also, is it not enough that I've entered the values in notepad for C as a function of T and H? Why do I have to define another function H with different values?

Is it considering the values in my notepad?

Please clarify

And also, is it not enough that I've entered the values in notepad for C as a function of T and H? Why do I have to define another function H with different values? Is it considering the values in my notepad? Please clarify

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.