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.

Changing parameter during time-dependent study with MATLAB (Does not work at specific time)

Please login with a confirmed email address before reporting spam

Hello,

I have a script running using MATLAB livelink. It is a time-dependent study and I would like to change the parameters defined at specific time during the study.

I have managed to make this work by setting the following in a for loop script:
time_specified=80
if 't'>=time specified
model.param.set('Tchamber',293.15);
end

The problem that I am facing now is if the time specified is more than 100 s, the parameter would not change during the study. I tested several studies to pin point this time "limit".

I am unsure if the time range has any effects on this matter but the stop time for the study was more than 300 s and the time step was 1 s. The parameters specified in the mph file are as follows:

Tsub 873.15[K]
Tdep 1723.15[K]
hdep 650[W/(m^2*K)]
hsub 55[W/(m^2*K)]
period 60[s]
dt 1[s]
t0 0
tf t0+period
Tchamber 523[K]

Any inputs are appreciated.

Best regards,
Charles

0 Replies Last Post Aug 18, 2013, 5:57 p.m. EDT
COMSOL Moderator

Hello Charles Selfridges

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.