mphmodellibrary %open the model library
model = mphload('Stationary_model.mph'); %载入名为Stationary_model.mph的模型
mphgeom(model , 'geom1') %显示几何模型
mphmesh(model , 'mesh') %显示划分网格
mphplot(model , 'pg1') %显示最终结果
model.physics('ht').feature('hf1').set('q0', 1, q0S(i)); %修改模型边界条件q0
model.param.set('a', a); %修改模型变量a
model.sol('sol1').run; % 计算模型
%提取坐标为list上的温度值,单位为摄氏度,list
T = mphinterp(model,{'T'},...
'coord',list,...
'unit',{'degC'});
ModelUtil.remove('model'); % 从服务器中移除模型
参考网址:
COMSOL中国 工程师(天乐树的博客):http://blog.sina.com.cn/s/articlelist_1242205021_8_1.html http://blog.sina.com.cn/mxio
Comsol with Matlab Quick Started (1-2):http://blog.sina.com.cn/s/blog_4a0a8b5d0101lmsj.html http://blog.sina.com.cn/s/blog_4a0a8b5d0101ltu6.html
Comsol with Matlab 应用实例(1-4可从上下篇中找到):http://blog.sina.com.cn/s/blog_4a0a8b5d0101lnwf.html
COMSOL SERVER安装:http://blog.sina.com.cn/s/blog_4a0a8b5d0102xdna.html