找回密码
 注册
Simdroid-非首页
查看: 259|回复: 10

【3分题】How to plot max value of a variable of a subdomain over the time

[复制链接]
发表于 2008-11-21 23:40:36 | 显示全部楼层 |阅读模式 来自 黑龙江哈尔滨
Hi, can anyone tell me how to plot max or min values of a variable (say temperature) of a subdomain over the time.

Thank you very much for the answer

Carlos

FROM: COMSOL USER YAHOO GROUP


做出来者,加3技术分

[ 本帖最后由 TBE_Legend 于 2008-11-22 07:58 编辑 ]
发表于 2008-11-22 09:53:22 | 显示全部楼层 来自 美国
Simdroid开发平台
It looks a postprocessing question.
回复 不支持

使用道具 举报

发表于 2008-11-22 16:46:08 | 显示全部楼层 来自 上海普陀区
You can export the solution to the Script, then use the command below (for example 1 variable, T):

maxT = max(fem.sol.u);
tlist=fem.sol.tlist;
plot(tlist, maxT);

评分

1

查看全部评分

回复 不支持

使用道具 举报

发表于 2008-11-25 20:43:02 | 显示全部楼层 来自 湖北武汉
kinggun斑斑正解
回复 不支持

使用道具 举报

发表于 2008-11-26 14:09:44 | 显示全部楼层 来自 大连理工大学
没有看懂,但个人感觉将结果输出到文件里面,然后利用matlab或者其他软件进行画图。
回复 不支持

使用道具 举报

发表于 2008-11-26 14:11:05 | 显示全部楼层 来自 大连理工大学
TBE_Legend版主近期工作不错,过来支持一下,呵呵。
回复 不支持

使用道具 举报

发表于 2008-11-26 15:18:30 | 显示全部楼层 来自 上海徐汇区
呵呵,TBE所言极是,对脚本做修改如下(呵呵,这次可以给分了吧):

len=length(fem.sol.tlist);
maxT=zeros(1,len);
for i=1:len
    maxT(i)=postmax(fem,'T','t',fem.sol.tlist(i));
% postmax
% first 'T' is temperature, second 't' is time
end
plot(fem.sol.tlist,maxT);

评分

1

查看全部评分

回复 不支持

使用道具 举报

 楼主| 发表于 2008-12-1 00:08:06 | 显示全部楼层 来自 黑龙江哈尔滨
原帖由 kinggun 于 2008-11-26 15:18 发表
呵呵,TBE所言极是,对脚本做修改如下(呵呵,这次可以给分了吧):

len=length(fem.sol.tlist);
maxT=zeros(1,len);
for i=1:len
    maxT(i)=postmax(fem,'T','t',fem.sol.tlist(i));
% postmax
% first  ...


同学过来问我个问题,正好遇到这样的一个问题,于是看了看这个命令。

matlab是很忌讳做循环的,其实postmax可以这么用的,直接输出各个时刻的解的最值。(Return min over all solutions, or min per solution, specified with solnum or t)


我试了下,可行。
  1. >>m = postmax(fem,'normB_emqa','out','sollist','t',0.001:0.001:0.01)



  2. m =


  3. Columns 1-7:

  4. 0.1410 0.2721 0.4666 0.6416 0.7636 0.8675 0.9547

  5. Columns 8-10:

  6. 1.0419 1.1148 1.1312
复制代码


真是越来越感叹COMSOL的魅力了。

[ 本帖最后由 TBE_Legend 于 2008-12-1 00:13 编辑 ]

评分

1

查看全部评分

回复 不支持

使用道具 举报

发表于 2008-12-12 15:06:59 | 显示全部楼层 来自 安徽合肥
过来学习一下呵~~
支持!
回复 不支持

使用道具 举报

发表于 2009-1-4 20:42:12 | 显示全部楼层 来自 上海宝山区
不错的,我试过,可以的!
回复 不支持

使用道具 举报

发表于 2009-1-11 19:32:49 | 显示全部楼层 来自 黑龙江哈尔滨
看懂了,呵呵
看来我也开始入道了!
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-28 09:10 , Processed in 0.057848 second(s), 20 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表