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

Please login with a confirmed email address before reporting spam

Hi,

I want to import one csv file having radius versus refractive index data. And i want to use this data for refractive index in my structure that is a circle. (please find attched file).


Approach:-

I am using interpolation function to select this file and use the option "space coordinates as the arguement". In Electromagnetic waves, I use addition wave equation in which I choose the circle as a domain & Refractive index in electric displacement field. And I make refractive index to be user defined. Where I Chosse mod1.int1 as the function.

after running I get the error:-

wrong number of function arguments.
- Name: mod1.int1
- Number of arguments expected: 1
please help.


4 Replies Last Post 29 apr 2012, 16:22 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 29 apr 2012, 02:57 GMT-4
Hi

if you are in 2D your space coordinates are x,y and not "r". So from what I read, you should import your file into an ordinary interpolation function with the argument "r", then define a cylindrical coordinate systems i.e. sys2 in your domain and call your interp1(sys2.r) with this "r" value

--
Good luck
Ivar
Hi if you are in 2D your space coordinates are x,y and not "r". So from what I read, you should import your file into an ordinary interpolation function with the argument "r", then define a cylindrical coordinate systems i.e. sys2 in your domain and call your interp1(sys2.r) with this "r" value -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 apr 2012, 13:12 GMT-4
Hi,

thanks a lo for reply. Can you please tell me how to define sys2.In definition I found boundary system 1, which I duplicate for boundary system2. In boundary system setting window, there is "coordinate name" option. What should I put there. What if I want to use polar coordinate. Is there any option that I can use for inserting special symbol like theta, phi. Can you please do the changes in attached file and then attach it. Thanks a lot.


Regards
Deepak
Hi, thanks a lo for reply. Can you please tell me how to define sys2.In definition I found boundary system 1, which I duplicate for boundary system2. In boundary system setting window, there is "coordinate name" option. What should I put there. What if I want to use polar coordinate. Is there any option that I can use for inserting special symbol like theta, phi. Can you please do the changes in attached file and then attach it. Thanks a lot. Regards Deepak

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 29 apr 2012, 15:05 GMT-4
Hi
under Definitions (right click) you have Coordinate Systems and therein you can define different types: cylindrical, spherical ...
the reference to the coordinate system is sys2.r, sys3.r etc where "sys1" is the default predefined boundary coordinate system, and "sys2" is the first user defined coordinate system, sys3 the 2nd etc

then you "." add the variable names, usually r,phi,a for a cylindrical system etc

--
Good luck
Ivar
Hi under Definitions (right click) you have Coordinate Systems and therein you can define different types: cylindrical, spherical ... the reference to the coordinate system is sys2.r, sys3.r etc where "sys1" is the default predefined boundary coordinate system, and "sys2" is the first user defined coordinate system, sys3 the 2nd etc then you "." add the variable names, usually r,phi,a for a cylindrical system etc -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 apr 2012, 16:22 GMT-4
Thanks Ivar,

I got it.
Thanks Ivar, I got it.

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.