| 查看: 948 | 回复: 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 大概能明白是区域不能这样选中,求问有什么解决办法没 |
» 猜你喜欢
求调剂
已经有4人回复
070300化学求调剂
已经有11人回复
抱歉
已经有5人回复
环境285分,过六级,求调剂
已经有9人回复
求材料调剂,一志愿郑州大学289分
已经有11人回复
化学调剂
已经有9人回复
303求调剂
已经有4人回复
化工调剂303分,过四级
已经有25人回复
081200-11408-276学硕求调剂
已经有6人回复
298分 070300求调剂
已经有11人回复














回复此楼