| 查看: 1638 | 回复: 1 | ||
| 【悬赏金币】回答本帖问题,作者一苇以航航将赠送您 10 个金币 | ||
[求助]
UDF分段函数求助
|
||
想写一个二维模型的分段函数,C1和C2关于x,y的分段函数。但是一直编译不过,摆脱大佬们给看看哪里出错了![]() DEFINE_ADJUST(dp_adjust,d) { Thread *t; cell_t c; real x[ND_ND]; real por; t = Lookup_Thread(d,porous_ID); begin_c_loop(c,t) { C_CENTROID(x,c,t); if(xc[0]>=0.0&&xc[0]<=0.3&&xc[1]>=0.0&&xc[1]<0.15) { por = dp1; C_UDMI(c,t,num_c1)=44.5/(fa*pow(por,2.0)); C_UDMI(c,t,num_c2)=2.0*0.55/(por*pow(fa,2.0)); C_UDMI(c,t,num_dpi)=dp1; } if(xc[0]>=0.0&&xc[0]<=0.3&&xc[1]>=0.15&&xc[1]<=0.3) { por = dp2; C_UDMI(c,t,num_c1)=44.5/(fa*pow(por,2.0)); C_UDMI(c,t,num_c2)=2.0*0.55/(por*pow(fa,2.0)); C_UDMI(c,t,num_dpi)=dp2; } if(xc[0]>0.3&&xc[0]<=0.6&&xc[1]>=0.0&&xc[1]<=0.3) { por = dp3; C_UDMI(c,t,num_c1)=44.5/(fa*pow(por,2.0)); C_UDMI(c,t,num_c2)=2.0*0.55/(por*pow(fa,2.0)); C_UDMI(c,t,num_dpi)=dp3; } end_c_loop(c,t); } |
» 猜你喜欢
地球科学部D01口青年基金,最低几A几B几C才能有几率中呀。
已经有5人回复
航天502所 高瑛珂博士 婚内征婚 欺骗女性开房
已经有27人回复
26/27申博
已经有4人回复
博士申请
已经有5人回复
liaohl_9
新虫 (小有名气)
- 应助: 1 (幼儿园)
- 金币: 386.4
- 散金: 28
- 帖子: 141
- 在线: 52.1小时
- 虫号: 20304160
- 注册: 2019-12-28
- 专业: 金属基复合材料
2楼2020-08-11 18:20:17












回复此楼