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

Usage of set method in LiveLink for MATLAB

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

Viewing all articles
Browse latest Browse all 2194

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>