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.

"Use space coordinates as arguments" check bock - Interpolation Functions

Please login with a confirmed email address before reporting spam

Dear support-team,

recently I updated my Comsol from 4.2a to 4.3a. In my models I use the interpolation functions. In the 4.2a version there was a check box "Use space coordinates as arguments" which seems to be gone in 4.3a.
I didn't realize this, until I was checking the User's Guide because my interpolation didn't work anymore.

"For the common case where the data source contains function values that are functions of the space coordinates, select the Use space coordinates as arguments check box. Then the function can be called without arguments when used in the model; the space coordinates are added as function arguments automatically."

When I tried to check the box, I couldn't find it anymore.

Is this box hidden somewhere in the new version or do I really have to type the arguments all the time now?

Thank you very much!

5 Replies Last Post 25 ott 2012, 06:16 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 ott 2012, 13:25 GMT-4
Hi

first of all Im not sure we should be called "support-team" even if it sounds nice, here on the Forum we are manly users just as you.
If you need "support" you should mail to "support" or use the new support request feature under your "My account" afer having ligged in

This said thanks for pointing out the changes ;)
I hadnt noticed that one yet.
Now after some search and careful reading of the help I have found it back, it^s still there :).

You need to select "Load from File" to get the grid option up on the GUI. Then you will find the 4.2a features back :)

read your doc again, it's worth to make a new check at each new release

--
Good luck
Ivar
Hi first of all Im not sure we should be called "support-team" even if it sounds nice, here on the Forum we are manly users just as you. If you need "support" you should mail to "support" or use the new support request feature under your "My account" afer having ligged in This said thanks for pointing out the changes ;) I hadnt noticed that one yet. Now after some search and careful reading of the help I have found it back, it^s still there :). You need to select "Load from File" to get the grid option up on the GUI. Then you will find the 4.2a features back :) read your doc again, it's worth to make a new check at each new release -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 ott 2012, 02:49 GMT-4
Hi,

Ivar is correct for 2D and 3D: To use the "Use space coordinates as arguments" check box, you need to select "File" as the "Data source". In 1D models, the "Use space coordinates as arguments" check box is also available for "Table" as the "Data source". This is because the "Table" data input supports interpolation functions with one argument, which are not suitable for representing an interpolation function where the space coordinates (x, y in 2D; x, y, and z in 3D) are the function arguments.

We will make sure that the documentation explains this clearly.

Best regards,
Magnus Ringh
COMSOL
Hi, Ivar is correct for 2D and 3D: To use the "Use space coordinates as arguments" check box, you need to select "File" as the "Data source". In 1D models, the "Use space coordinates as arguments" check box is also available for "Table" as the "Data source". This is because the "Table" data input supports interpolation functions with one argument, which are not suitable for representing an interpolation function where the space coordinates (x, y in 2D; x, y, and z in 3D) are the function arguments. We will make sure that the documentation explains this clearly. Best regards, Magnus Ringh COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 ott 2012, 03:14 GMT-4
Hi,
thanks for your answers.

I choosed "File" as Data source. But, as it seems unfortunately, my file is a spreadsheet which contains three arguments (cartesian coordinates x,y,z) and three functions (a diagonal anisotropic conductivity structure sigmax, sigmay and sigmaz).

In this case no check box is available, which is a pitty, because it worked so fine in 4.2a.

Now we'll have to change all our models and scripts which will be a lot of work. Would be nice if you could re-activate this box in the next version.

Best regards,
Annika
Hi, thanks for your answers. I choosed "File" as Data source. But, as it seems unfortunately, my file is a spreadsheet which contains three arguments (cartesian coordinates x,y,z) and three functions (a diagonal anisotropic conductivity structure sigmax, sigmay and sigmaz). In this case no check box is available, which is a pitty, because it worked so fine in 4.2a. Now we'll have to change all our models and scripts which will be a lot of work. Would be nice if you could re-activate this box in the next version. Best regards, Annika

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 ott 2012, 04:42 GMT-4
Hi,

That should be possible. Could it be that you define your Interpolation function as a global function under Global Definitions? You should define a space-dependent interpolation function under Model>Definitions. If your interpolation data file contains six columns -- x coordinates, y coordinates, z coordinates, function 1 values, function 2 values, and function 3 values -- you should be able to import it with the "Use space coordinates as arguments" check box selected and then use the functions without appending the space coordinate names as function arguments. Also remember to declare the function names in the table under Functions in the Interpolation node's settings window.

If this does not help, please, if possible, send us your interpolation file and an example file that shows the problem.

Best regards,
Magnus Ringh
COMSOL
Hi, That should be possible. Could it be that you define your Interpolation function as a global function under Global Definitions? You should define a space-dependent interpolation function under Model>Definitions. If your interpolation data file contains six columns -- x coordinates, y coordinates, z coordinates, function 1 values, function 2 values, and function 3 values -- you should be able to import it with the "Use space coordinates as arguments" check box selected and then use the functions without appending the space coordinate names as function arguments. Also remember to declare the function names in the table under Functions in the Interpolation node's settings window. If this does not help, please, if possible, send us your interpolation file and an example file that shows the problem. Best regards, Magnus Ringh COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 ott 2012, 06:16 GMT-4
Yes, my interpolation is a global definition because I use the same interpolation for two different models.

It works fine, if I call the functions (sigmax.simgy,sigmaz) afterwards with sigmax(root.x,root.y,root.z).
I just liked it more in 4.2a when I could call the function without the arguments (also a global definition).
Yes, my interpolation is a global definition because I use the same interpolation for two different models. It works fine, if I call the functions (sigmax.simgy,sigmaz) afterwards with sigmax(root.x,root.y,root.z). I just liked it more in 4.2a when I could call the function without the arguments (also a global definition).

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.