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 Mar 31, 2017, 1:41 p.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Mar 30, 2017, 12:11 p.m. EDT
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: 7 years ago Mar 30, 2017, 3:23 p.m. EDT
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: 7 years ago Mar 30, 2017, 3:34 p.m. EDT
Updated: 4 years ago Oct 31, 2019, 7:17 a.m. EDT
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: 7 years ago Mar 30, 2017, 10:53 p.m. EDT
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: 7 years ago Mar 31, 2017, 8:27 a.m. EDT
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: 7 years ago Mar 31, 2017, 1:41 p.m. EDT
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.