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.

problems with COMSOL using Matlab

Please login with a confirmed email address before reporting spam

Hi,

I am trying to solve a transient heat diffusion model which employs a user-defined function for thermal conductivity (k) of a particular sub-domain in the geometry. This user defined function is written in MATLAB and depends on the space co-ordinate variables x and y as well as the dependent variable T (i.e. temperature). This function cannot be expressed in analytic form. Now, I created a mapped mesh in COMSOL and projected the temperature (T) values from these mesh nodes onto a finer mesh made in Matlab using the 2D interpolate function called 'interp2' (This finer mesh in Matlab is essential to calculate my user-defined thermal conductivity function). However I was not able to perform this interpolation since I found that the values of the space coordinates x and y vary with every iteration (from time t=0 to time t=tfinal) and in actuality are not the same as the x and y coordinates of the mesh nodes. I thought that the space coordinates of a sub domain correspond to the mesh nodes in that sub-domain and will remain fixed from time t=0 to time t=tfinal. Unfortunately it is not so and hence I am not able to perform the 2D interpolation (since both the size of x (and y) as well as the values of x (and y) change over time). Can anyone please let me know of a way to get around this problem?

Thank you very much.
Archana

0 Replies Last Post 31.08.2009, 19:48 GMT-4
COMSOL Moderator

Hello Archana Devasia

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.