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 functions

Please login with a confirmed email address before reporting spam

Hi,
As a new COMSOL user, I am currently trying to run a simulation of an Ar plasma. To switch easily between some different conditions I wanted for, I defined some interpolation functions from tables .txt. The functions plot correctly, showing a very OK-looking curve representing the rate coefficient in function of the electron energy. However, I want to plug them in the Reaction parameters sections, in the collision reaction settings, instead of the lookup tables of the rate coefficients. But it sends an error message :

Unknown variable name.
- Table row: 1
- Table column: 2
- Function name: ksig_11_1
Error in multiphysics compilation.

Can you help me ? I defined a variable for the energy, so I don't think it's the problem.

Thanks

Kevin

2 Replies Last Post 2017年6月9日 GMT-4 05:33
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 2017年6月8日 GMT-4 10:07
Updated: 7 years ago 2017年6月8日 GMT-4 11:06
Hello Kevin,
My guess is that you forgot to pass an argument to your function.
To call the function ksig_11_1 with the argument T, the syntax is
ksig_11_1(T)
and if there are several arguments to pass, you separate them with commas, like this ksig_11_1(arg1,arg2,arg3).
If you don't pass the argument(s) between parentheses, COMSOL concludes that you must be talking about a variable called ksig_11_1, not the function called ksig_11_1, and you get an error message like the one you got.
If I misunderstood, please post your mph file.
Best,
Jeff
Hello Kevin, My guess is that you forgot to pass an argument to your function. To call the function ksig_11_1 with the argument T, the syntax is ksig_11_1(T) and if there are several arguments to pass, you separate them with commas, like this ksig_11_1(arg1,arg2,arg3). If you don't pass the argument(s) between parentheses, COMSOL concludes that you must be talking about a variable called ksig_11_1, not the function called ksig_11_1, and you get an error message like the one you got. If I misunderstood, please post your mph file. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 2017年6月9日 GMT-4 05:33
Hello,
Thanks for your quick reply. The problem is, I never defined any function called ksig_11_1. It seems to be a function of COMSOL itself, related to the concerned reaction node (in which I tried to call the interpolation function HKelMB), where the number _11_ appears to refeer to the intern name of the reaction node I created (e+H=>e+H), but using the order of creation instead of the name I gave to it.

Moreover, I had called my function with my variable name (defined in the global variable node Variable1) wrote into parenthesis for the argument, as you said, so I don't think this is the location of the problem. May my variable be actually badly defined ? Or do I call my function in the wrong way ?


I would post my mph file, but there is an error message keeping telling "file extension error".

Thanks in advance,

Kevin
Hello, Thanks for your quick reply. The problem is, I never defined any function called ksig_11_1. It seems to be a function of COMSOL itself, related to the concerned reaction node (in which I tried to call the interpolation function HKelMB), where the number _11_ appears to refeer to the intern name of the reaction node I created (e+H=>e+H), but using the order of creation instead of the name I gave to it. Moreover, I had called my function with my variable name (defined in the global variable node Variable1) wrote into parenthesis for the argument, as you said, so I don't think this is the location of the problem. May my variable be actually badly defined ? Or do I call my function in the wrong way ? I would post my mph file, but there is an error message keeping telling "file extension error". Thanks in advance, Kevin

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.