Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Update Interpolation function in each simulation step

Please login with a confirmed email address before reporting spam

Hello Everyone,

I am trying to set up a time-dependent simulation in COMSOL v4.3a. It's a structural mechanics model and the material properties are defined by an interpolation function which is read from a txt file. However, this txt file is time-dependent as well. In other words, at (k+1)th step, I want to use the k th simulation results to update that txt file/ interpolation first. Here I have two questions.

1) I have a matlab function update_data() defined in COMSOL v4.3a. It is used to renew the txt file. However, COMSOL returns error saying "Error using dlmwirite: Could not find **.txt"
I am sure that the matlab function is correct. It seems that COMSOL doesn't support matlab to write file during simulation. Could you help me solve this issue?

2) I have to clear the interpolation function and reload from txt file manually before each time step. Are there methos that automatically clear and reload txt in interpolation function before each step?

Thank you very much

Dan

1 Reply Last Post 13 ott 2014, 02:29 GMT-4
COMSOL Moderator

Hello Zhangxian Deng

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.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 ott 2014, 02:29 GMT-4
Hi Dan,

I am working on a similar problem but couldn't find an answer on forums and Comsol documents. Could you figure out how to update interpolation function and reload updated text file?

Thanks in advance,

Bahri
Hi Dan, I am working on a similar problem but couldn't find an answer on forums and Comsol documents. Could you figure out how to update interpolation function and reload updated text file? Thanks in advance, Bahri

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.