| 查看: 988 | 回复: 0 | ||
[求助]
求助,如何在MATLAB里对区域赋属性
|
|
目前在comsol里做关于地下渗流的问题,现在把模型划成50*50的区域,想用下面这个循环在MATLAB里给区域赋上不同渗透率 42 for i=2:2500 43 k(i)=(1e-11)*rand; 44 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').create(\'\'dlm%u\'\', \'\'DarcysLawModel\'\', 2)\',i)); 45 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').feature(\'\'dlm%u\'\').selection.set([%u])\',i,i)); 46 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').feature(\'\'dlm%u\'\').set(\'\'rho_mat\'\', \'\'userdef\'\')\',i)); 47 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').feature(\'\'dlm%u\'\').set(\'\'rho\'\', 1000)\',i)); 48 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').feature(\'\'dlm%u\'\').set(\'\'mu_mat\'\', \'\'userdef\'\')\',i)); 49 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').feature(\'\'dlm%u\'\').set(\'\'mu\'\', 0.001)\',i)); 50 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').feature(\'\'dlm%u\'\').set(\'\'epsilon_mat\'\', \'\'userdef\'\')\',i)); 51 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').feature(\'\'dlm%u\'\').set(\'\'epsilon\'\', 0.2)\',i)); 52 end 运行到这句 eval(sprintf(\'model.component(\'\'comp1\'\').physics(\'\'dl\'\').feature(\'\'dlm%u\'\').selection.set([%u])\',i,i));就出错,报错显示是 错误使用 Fracture1 (line 45) Java exception occurred: Exception: com.comsol.util.exceptions.FlException: java.lang.IllegalArgumentException: Illegal input vector illegal entity number Messages: java.lang.IllegalArgumentException: Illegal input vector illegal entity number 大概能明白是区域不能这样选中,求问有什么解决办法没 |
» 猜你喜欢
应该是93bebmhtak前后十一个字符比较关键
已经有4人回复
这样的filecode谁见过
已经有16人回复
关于代码变化问题,想知道的进来
已经有16人回复
fileCode有新解读?
已经有18人回复
关于filecode,很负责任的告诉大家
已经有7人回复
【2027博士申请】纳米药物递送方向
已经有5人回复
关于豆爷回答的JTJC与%2F数量
已经有7人回复
2026国自然放榜时间
已经有3人回复
国基金的申报应该改成非等额制,评价高的钱多评价低的钱少,但是增加资助率
已经有7人回复
好奇怪的filecode
已经有4人回复










回复此楼