| 查看: 1850 | 回复: 1 | |||
乙凡良新虫 (小有名气)
|
[求助]
fluent udf中流场初始化要加随机脉动,如何加,求大神? 已有1人参与
|
|
如题,想用fluent中udf在流场初始化时加个随机脉动,编了个udf却未能实现,请教大神? #include "udf.h" #include "time.h" #include "stdlib.h" DEFINE_INIT(my_init2_function, domain) { cell_t c; Thread *t; real xc[ND_ND]; int number; real ans; /* loop over all cell threads in the domain */ thread_loop_c (t,domain) { /* loop over all cells */ begin_c_loop_all (c,t) { C_CENTROID(xc,c,t); srand(time(0)); number=rand()%2001; ans=number*1.0/10000; C_U(c,t)=1.02+ans*1.02; C_V(c,t)=ans; C_W(c,t)=ans; } end_c_loop_all (c,t) } } |
» 猜你喜欢
招聘 金属平磨液,抛光液研发工程师
已经有3人回复
欢迎发来filecode的Mz6后的代码验证其规律
已经有69人回复
有时候,自然基金真的不能太认真 (我的申报经验)
已经有11人回复
时间戳又变了8-15
已经有23人回复
filecode=后面第一个是大写字母
已经有7人回复
filecode
已经有12人回复
小木虫上这么多卖论文的,真有人买论文么?感觉没必要啊
已经有13人回复
哪位老哥知道今年的国自然具体哪一天放榜?
已经有7人回复
关于Filecode分析方法
已经有13人回复
各位道友,我要去昆明玩几天,回来见。
已经有8人回复
mycc
专家顾问 (正式写手)
-

专家经验: +181 - 应助: 230 (大学生)
- 金币: 2589.6
- 红花: 35
- 帖子: 531
- 在线: 58.8小时
- 虫号: 881523
- 注册: 2009-10-23
- 性别: GG
- 专业: 流体力学
- 管辖: 仿真模拟

2楼2016-06-17 08:27:35










回复此楼