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.

Using external file data for heat generation.

Please login with a confirmed email address before reporting spam


How can I import coordinate data and heat generation from a file (x(cm), y (cm), z (cm), heat generation (w / cm ^ 3))? . This file is for heat transfer on a sheet. The file looks like this:

% x y z heat generation
1 1 1 0.05
1 2 1 0.75
1 3 1 1.23
1 4 1 5.7
1 5 1 7.23
2 1 1 8
....
10 10 5 0.58

6 Replies Last Post 31 mars 2017, 13:41 UTC−4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 30 mars 2017, 12:11 UTC−4
Hello Oriana,
Yes, you can do that. Interpolation functions created from files are documented in the COMSOL Multiphysics Reference Manual, version 5.2a, page 277 and following.
Best regards,
Jeff
Hello Oriana, Yes, you can do that. Interpolation functions created from files are documented in the COMSOL Multiphysics Reference Manual, version 5.2a, page 277 and following. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 30 mars 2017, 15:23 UTC−4
Hi Jeff, Thanks for your help.
I'm doing interpolation, but I do not know how to input the heat generation values of my file into the model. In global definition> function> interpolation. Import the file. The name of heat function. In position 1. After I don't know how for apply the heat generation of the data in the model. Sorry for the questions but I'm new to COMSOL
I appreciate your help.
Oriana
Hi Jeff, Thanks for your help. I'm doing interpolation, but I do not know how to input the heat generation values of my file into the model. In global definition> function> interpolation. Import the file. The name of heat function. In position 1. After I don't know how for apply the heat generation of the data in the model. Sorry for the questions but I'm new to COMSOL I appreciate your help. Oriana

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 30 mars 2017, 15:34 UTC−4
Updated: 5 years ago 31 oct. 2019, 07:17 UTC−4
You're almost there! Once you've defined your interpolation, all you need to do is call it wherever you need to call it (Presumably it's in a volume heat source node of the model tree). By default the first interpolation function is going to be named int1 (You can rename it, of course), and you can call it by typing int1(x,y,z).
Best,
Jeff
You're almost there! Once you've defined your interpolation, all you need to do is call it wherever you need to call it (Presumably it's in a volume heat source node of the model tree). By default the first interpolation function is going to be named int1 (You can rename it, of course), and you can call it by typing int1(x,y,z). Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 30 mars 2017, 22:53 UTC−4
Hi Jeff, Thanks for your help and apologies again for asking.
My question is I do not know how to call the int function that is in position 1. This int function is the heat generated. But in heat transfer, what can I do to call the function in the heat source (Q)?

Now I do not know how to call the x, y, z coordinates. I do not know if it can be explained me with an image or an example. Thank you very much and sorry again.
Hi Jeff, Thanks for your help and apologies again for asking. My question is I do not know how to call the int function that is in position 1. This int function is the heat generated. But in heat transfer, what can I do to call the function in the heat source (Q)? Now I do not know how to call the x, y, z coordinates. I do not know if it can be explained me with an image or an example. Thank you very much and sorry again.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31 mars 2017, 08:27 UTC−4
See the attached screenshot.
Best,
Jeff

PS: I encourage you to work through the Introduction to COMSOL Multiphysics manual (Accessed through File > Help > Documentation). It will save you a lot of time compared to trying to figure things out by yourself. The Applications Libraries are also full of tutorials with step-by-step instruction that you can use for self teaching.
See the attached screenshot. Best, Jeff PS: I encourage you to work through the Introduction to COMSOL Multiphysics manual (Accessed through File > Help > Documentation). It will save you a lot of time compared to trying to figure things out by yourself. The Applications Libraries are also full of tutorials with step-by-step instruction that you can use for self teaching.


Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31 mars 2017, 13:41 UTC−4
Hello Jeff.

Thanks for your help. I was missing the units. In Heat Source it is int1 (x [1 / cm], and [1 / cm], z [1 / cm]). This was my mistake. But thanks to you, you were a great help.

Cordially
Oriana
Hello Jeff. Thanks for your help. I was missing the units. In Heat Source it is int1 (x [1 / cm], and [1 / cm], z [1 / cm]). This was my mistake. But thanks to you, you were a great help. Cordially Oriana

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.