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 would like to use a interpolation function as a boundary condition. I want to set a temperature distribution as boundary condition. The file that I´m using for the interpolation is the one I have gotten from other comsol program. It has the following structure:

% x y t
-0.2883498 -0.28064913 311.4114616733292
-0.2883498 -0.28532457 311.4367944630273
-0.28604147 -0.28298685 311.42340527424335
-0.2883498 -0.29 311.44533424076195
-0.28604147 -0.28766227 311.44045724511426
-0.28373313 -0.28532457 311.4258140327221
.....

But I´m getting the following error:

Error: 6170
Failed to evaluate variable.
- Variable: temp
- Geometry: 1
- Boundary: 3
Failed to evaluate variable.
- Variable: T0_htgh
- Defined as: temp
Failed to evaluate expression.
- Expression: -T+T0_htgh

Somebody could help me with this problem? (I`m using the 3.5amodel)

Thanks in advance!

Ann

3 Replies Last Post 19 May 2011, 16:43 BST
COMSOL Moderator

Hello Izaro LL

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 10 years ago 28 Feb 2011, 15:50 GMT
Hello, Ann:

Much time has passed since you sent your message. Nevertheless, if you are already interested in it, I think I can help you. Could you send the original model or at least a simplified version of it with your definitions, constants, functions and so on?

Jesus.
Hello, Ann: Much time has passed since you sent your message. Nevertheless, if you are already interested in it, I think I can help you. Could you send the original model or at least a simplified version of it with your definitions, constants, functions and so on? Jesus.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 19 May 2011, 15:20 BST
Hi,

I have similar errors. I'm trying to use an interpolated function, Q1, as the input for a heat source, but Q1 is not recognized as a variable. How do I use an interpolated function as a user-defined input? I will send the model if it helps.

Thanks!
Briana
Hi, I have similar errors. I'm trying to use an interpolated function, Q1, as the input for a heat source, but Q1 is not recognized as a variable. How do I use an interpolated function as a user-defined input? I will send the model if it helps. Thanks! Briana

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 19 May 2011, 16:43 BST
FYI- just figured it out my problem with help of Jinlan Huang:

"You need to give an argument to the function when you call it. The argument
could be either an explicit number (e.g., int1(1)) or a variable as long as
it is define. For example, you can use int1(x) or int1(y) if you select
"Use space coordinates as arguments" check box when you define the
function."

Thanks Jinlan
FYI- just figured it out my problem with help of Jinlan Huang: "You need to give an argument to the function when you call it. The argument could be either an explicit number (e.g., int1(1)) or a variable as long as it is define. For example, you can use int1(x) or int1(y) if you select "Use space coordinates as arguments" check box when you define the function." Thanks Jinlan

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.