Unable to call external data file

Please login with a confirmed email address before reporting spam

Does anyone know how to import an external data file as a heat source. I am trtying to do it but when I call it, I get this error message of "unknown function or variable". Not sure what's going on.

To import an external data file,

I am going to function>interpolation>import data file, the fucntion has a name to call, lets say int1, but I am unable to call it.

In the heat transfer module, in place of Q0, I try to call it by int1, and with arguments int1(x,y,z), still get the error. Any suggetsions are welcome.


6 Replies Last Post 23 déc. 2022, 12:33 UTC−5
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 21 déc. 2022, 10:57 UTC−5
Updated: 2 years ago 22 déc. 2022, 08:36 UTC−5

One possibility is that you are trying to call the function outside of its geometric scope, see this old thread. If that's not the issue, can you upload the model file?

Jeff

-------------------
Jeff Hiller
One possibility is that you are trying to call the function outside of its geometric scope, see [this old thread](https://www.comsol.com/forum/thread/312723/unknown-variables?last=2022-09-01T17:32:02Z). If that's not the issue, can you upload the model file? Jeff

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 21 déc. 2022, 19:09 UTC−5

Hi Jeff,

Thank you very much for the response. I dont quite understand how to call the fucntion outside its geomtric scope when I am not able to assign a geometry to it. Proabably I am missing something here. I have attached my model file, please have a look at it and let me know where I am doing wrong exactly.

Regards, Kunjalata

Hi Jeff, Thank you very much for the response. I dont quite understand how to call the fucntion outside its geomtric scope when I am not able to assign a geometry to it. Proabably I am missing something here. I have attached my model file, please have a look at it and let me know where I am doing wrong exactly. Regards, Kunjalata


Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 21 déc. 2022, 19:30 UTC−5

I encourage you to upload the external data file as well.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
I encourage you to upload the external data file as well.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 22 déc. 2022, 08:46 UTC−5
Updated: 3 months ago 8 avr. 2024, 14:37 UTC−4

Hello Kunjala,

1/ I would place the definition of int1 in Component1, not in Global Definitions since it appears you want to use it for a spatially-dependent function in Component1.

2/ Your definition of int1 states it takes 2 arguments, but then you call it with 3?!? There's clearly an issue there.

Jeff

-------------------
Jeff Hiller
Hello Kunjala, 1/ I would place the definition of int1 in Component1, not in Global Definitions since it appears you want to use it for a spatially-dependent function in Component1. 2/ Your definition of int1 states it takes 2 arguments, but then you call it with 3?!? There's clearly an issue there. Jeff

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 23 déc. 2022, 12:32 UTC−5

Hi Jeff,

Thanks a lot.

It works now.

Kunjalata

Hi Jeff, Thanks a lot. It works now. Kunjalata

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 23 déc. 2022, 12:33 UTC−5

I encourage you to upload the external data file as well.

Hi Robert,

Thanks a lot for the response. It works now.

kunjalata

>I encourage you to upload the external data file as well. Hi Robert, Thanks a lot for the response. It works now. kunjalata

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.