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.

Unknown Function or Operator

Please login with a confirmed email address before reporting spam

I've searched through the forums and found several discussions with a similar error, but none of the proposed solutions have helped me.

Under Component 1, I have defined a maximum operator maxop1 over a single domain. I have used this to make a global definition for Tmax, as maxop1(comp1.T). This is the maximum temperature found in the desired domain. Then, I define a piecewise function pw1 with Tmax as the argument. Finally, I use this in a Boundary Heat Source for Component 1, with the argument as pw1(Tmax).

The Boundary Heat Source node seems to accept this argument, but when I go to compute the model, I get the following error.
"Unknown function or operator.
- Name: maxop1
- Feature: Time-Dependent Solver 1 (sol1/t1)"

If anyone has helpful input, it would be much appreciated.

3 Replies Last Post 2016年6月16日 GMT-4 15:32
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年6月16日 GMT-4 05:25
Hi,

I'm not sure that you need to define the variable Tmax and the piecewise function at the global level instead of in Component 1, but if you do, you need to refer to maxop1 using the component's name: comp1.maxop1.

Best regards,
Magnus Ringh, COMSOL
Hi, I'm not sure that you need to define the variable Tmax and the piecewise function at the global level instead of in Component 1, but if you do, you need to refer to maxop1 using the component's name: comp1.maxop1. Best regards, Magnus Ringh, COMSOL

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年6月16日 GMT-4 08:33
Hello Jayse,
These types of error messages are often caused by the user trying to call entities (functions, variables, etc) outside of their scope (such as calling a variable in a domain where it's not defined or an operator at the global level when it's only defined on a component). Therefore, I would check if for instance you're not by any chance calling your Component 1-level maxop1 operator at the global level without stating that it's the maxop1 from Component 1 (See Magnus's posting above), or something like that.
Best,
Jeff
Hello Jayse, These types of error messages are often caused by the user trying to call entities (functions, variables, etc) outside of their scope (such as calling a variable in a domain where it's not defined or an operator at the global level when it's only defined on a component). Therefore, I would check if for instance you're not by any chance calling your Component 1-level maxop1 operator at the global level without stating that it's the maxop1 from Component 1 (See Magnus's posting above), or something like that. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年6月16日 GMT-4 15:32
Thank you Magnus and Jeff, you were exactly right. I needed to call maxop1 as comp1.maxop1, at least in the case where I was trying to define a global variable from the component operator.
Thank you Magnus and Jeff, you were exactly right. I needed to call maxop1 as comp1.maxop1, at least in the case where I was trying to define a global variable from the component operator.

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.