| 查看: 806 | 回复: 2 | ||
[求助]
用vof 模型,设定第二相(water)的体积分数,需编udf,编译以后出现错误!必重谢
|
|
我的研究是多相流,一个水槽设置一个新型齿坝,下边9m是水,上边4.5m是空气,想要用vof 模型捕抓液面,但要设定第二相(water)的体积分数,就需要编写一个udf,编译以后出现错误,希望来这里得到救助!必重谢 #include "udf.h" #include "sg_mphase.h" DEFINE_INIT(my_init_function,mixture_domain) { int phase_domain_index; cell_t cell; Thread *cell_thread; Domain *subdomain; real xc[ND_ND]; real x; real y; real z; sub_domain_loop(subdomain,mixture_domain,phase_domain_index) { if (DOMAIN_ID(subdomain)==2) thread_loop_c (cell_thread,subdomain) { begin_c_loop_all (cell,cell_thread) { C_CENTROID(xc,cell,cell_thread); x = xc[0]; y = xc[1]; z = xc[2]; if ((-37.5.<xc[0]<52.5.)&&(-3.1.<xc[1]<3.1.)&& (0.<xc[2]<9.)) C_VOF(cell,cell_thread)=1.; else C_VOF(cell,cell_thread)=0.; } end_c_loop_all (cell,cell_thread) } } } |
» 猜你喜欢
求各位大神看下
已经有31人回复
咨询面上基金
已经有7人回复
影响面上的因素
已经有11人回复
filecode
已经有4人回复
8月时间戳变的,举个手。玩一下,释放压力
已经有11人回复
一个有机合成实验室都需要哪些设备?
已经有11人回复
面上再次挂了,太难了,躺也躺不了,倦也卷不过,小学校之殇!
已经有30人回复
好消息?这个有何含义???
已经有10人回复
【2027博士申请】纳米药物递送方向
已经有4人回复
UV压敏胶开发
已经有7人回复
3_1415926
金虫 (小有名气)
- 应助: 8 (幼儿园)
- 金币: 1994.3
- 红花: 6
- 帖子: 159
- 在线: 57.3小时
- 虫号: 1853296
- 注册: 2012-06-09
- 性别: GG
- 专业: 工程热力学
2楼2015-10-16 16:07:58
3楼2018-04-01 09:21:07










回复此楼