| 查看: 810 | 回复: 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) } } } |
» 猜你喜欢
听说今天filecode变了
已经有48人回复
FileCode能看出啥?
已经有17人回复
奇怪,两个人的filecode固定段从头到尾一模一样
已经有6人回复
filecode
已经有9人回复
应该是93bebmhtak前后十一个字符比较关键
已经有23人回复
我的国基提前知道中了,可是同事的操作让我实在接受不了,怎么会有这样的人
已经有13人回复
小木虫上这么多卖论文的,真有人买论文么?感觉没必要啊
已经有6人回复
为什么网上很多人说本周 12号出结果
已经有5人回复
帮忙看看fileCode
已经有11人回复
基金中了
已经有15人回复
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










回复此楼