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.

Usage of set method in LiveLink for MATLAB

Please login with a confirmed email address before reporting spam

Hi,
I am tying to understand the heat_transient_axi example to export state space matrices to MATLAB from COMSOL. The following lines are from the example

model = mphload('heat_transient_axi');

"Create a parameter T0 that is set as external temperature"

model.param.set('Tinput','1000[degC]');
model.physics('ht').feature('temp1').set('T0',1,'Tinput');

After that there are errors in the example as pointed out here: www.comsol.com/community/forums/general/thread/36587/

Correcting the error the fixed MATLAB code to be run (for the probe mod1.ppb1) is:
M = mphstate(model,'sol1','out',{'Mc' 'MA' 'MB' 'C' 'D' 'x0'},'input','Tinput', 'output', 'mod1.ppb1');

When this model is opened in comsol I can see that 'temp1' refers to a temperature boundary condition imposed on the model and is given by the equation 'T=T0'

So by the line
model.physics('ht').feature('temp1').set('T0',1,'Tinput');
are we setting T0=Tinput=1000[degc]? And what does the 1 do among the arguments for 'set' method ('T0',1,'Tinput')?

And is the input to the system this temperature boundary condition T0?

0 Replies Last Post 21 avr. 2014, 16:07 UTC−4
COMSOL Moderator

Hello Abhijith Rajiv

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.