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.
How to define region heat source with 3D variables using the If else condition?
Posted 17 mar 2022, 10:24 GMT-4 Heat Transfer, Parameters, Variables, & Functions 1 Reply
Please login with a confirmed email address before reporting spam
Dear experts, I have a body in which heat is distributed unevenly in space. I cut them into 20 small parts when calculating heat flux. For example, the region of the first part is x<=1[cm]&&x>=0[cm]&&y>=0[cm]&&y<=1[cm]&&z>=0[cm]&&z<=1[cm], and the heat flux is 5 W/m3. The region of the second part is x<=2[cm]&&x>=1[cm]&&y>=1[cm]&&y<=2[cm]&&z>=1[cm]&&z<=2[cm],and the heat flux is 10 W/m3. The third part is... But in the modle in the COMSOL, the 20 small parts is one entire part. Is it possible to define the heat flux using one if else condition and how to define it? The following is wrong but is something of function that I want to realize. if(x<=1[cm]&&x>=0[cm]&&y>=0[cm]&&y<=1[cm]&&z>=0[cm]&&z<=1[cm],5,x<=2[cm]&&x>=1[cm]&&y>=1[cm]&&y<=2[cm]&&z>=1[cm]&&z<=2[cm],10, 0)