Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

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

$
0
0
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

Viewing all articles
Browse latest Browse all 26527

Trending Articles