Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
18.08.2011, 15:02 GMT-4
I have figured out how to interpolate a txt file as a source term in PDE. Firstly I need to go to the globla of local definition node, then Functions-->Interpolation, source data-->file, import the file you want, select the correct data format according to my txt file(you can see the detailed information of data format in the help documents of Comsol) and give it a name int. Secondly I created a variable under definition node and give a name as same as int in the expression column and named this variable source. Thirdly, go to the coefficient pde form and replaced the term f with source. Then, it works.
But here comes another problem. I got abvious different temperature field with different txt file, although they are the same source data file. The only difference between these files is the density of data in the same domain. For example, in a cubic with side 1cm, the temperature field density of 50*50*50 heat source data density is very lower than that of 20*20*20 data density. The total amount of heat in this cubic is fixed. I know this is because the interpolation and extrapolation algorithm in comsol doesn't match what I desired. There are four options for interpolation and extrapolation respectively. I read them and tried them. None of the combination works. The correct interpolation I need is to accumulate the data on the structural grids in txt file to the mesh elements if these grids are within an elements. It seems that Comsol doesn't work it automatically.
Maybe I need to interpolate them by myself with matlab and then use matlab functions incomsol. Does anyone has any idea about how to do that? By the way, the version is Comsol4.1.
Thank you
I have figured out how to interpolate a txt file as a source term in PDE. Firstly I need to go to the globla of local definition node, then Functions-->Interpolation, source data-->file, import the file you want, select the correct data format according to my txt file(you can see the detailed information of data format in the help documents of Comsol) and give it a name int. Secondly I created a variable under definition node and give a name as same as int in the expression column and named this variable source. Thirdly, go to the coefficient pde form and replaced the term f with source. Then, it works.
But here comes another problem. I got abvious different temperature field with different txt file, although they are the same source data file. The only difference between these files is the density of data in the same domain. For example, in a cubic with side 1cm, the temperature field density of 50*50*50 heat source data density is very lower than that of 20*20*20 data density. The total amount of heat in this cubic is fixed. I know this is because the interpolation and extrapolation algorithm in comsol doesn't match what I desired. There are four options for interpolation and extrapolation respectively. I read them and tried them. None of the combination works. The correct interpolation I need is to accumulate the data on the structural grids in txt file to the mesh elements if these grids are within an elements. It seems that Comsol doesn't work it automatically.
Maybe I need to interpolate them by myself with matlab and then use matlab functions incomsol. Does anyone has any idea about how to do that? By the way, the version is Comsol4.1.
Thank you