版块导航
正在加载中...
客户端APP下载
论文辅导
申博辅导
登录
注册
帖子
帖子
用户
本版
应《网络安全法》要求,自2017年10月1日起,未进行实名认证将不得使用互联网跟帖服务。为保障您的帐号能够正常使用,请尽快对帐号进行手机号验证,感谢您的理解与支持!
24小时热门版块排行榜
>
论坛更新日志
(2890)
>
文献求助
(145)
>
导师招生
(127)
>
虫友互识
(119)
>
博后之家
(85)
>
硕博家园
(62)
>
休闲灌水
(59)
>
论文投稿
(51)
>
考博
(48)
>
教师之家
(46)
>
基金申请
(29)
>
招聘信息布告栏
(28)
>
公派出国
(26)
>
考研
(26)
>
材料综合
(21)
>
绿色求助(高悬赏)
(19)
小木虫论坛-学术科研互动平台
»
计算模拟区
»
仿真模拟
»
FLUENT & CFX
»
【fluent 并行 UDF 求助】为啥fluent 并行这么慢?
5
1/1
返回列表
查看: 1535 | 回复: 5
只看楼主
@他人
存档
新回复提醒
(忽略)
收藏
在APP中查看
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖
xuwenhua625
银虫
(小有名气)
应助: 2
(幼儿园)
金币: 203.7
散金: 20
红花: 2
帖子: 216
在线: 118.2小时
虫号: 4122526
注册: 2015-10-06
性别: GG
专业: 流体力学
[
求助
]
【fluent 并行 UDF 求助】为啥fluent 并行这么慢?
fluent版本19.2,算的是二维运动机翼,用define cg motion 宏,重叠网格,25万网格
电脑8核i7,主频3.6 ghz
与starccm相比,fluent的并行好慢,迭代一个要2s,每一时间步迭代30次左右达到收敛。
而且每个时间步内,前面的迭代速度快,后面越来越慢。
请帮忙看看我的并行udf的设置是否有问题?
CODE:
#include <stdio.h>
#include "udf.h"
#include "math.h"
#include "mem.h"
#include "dynamesh_tools.h"
#define pi 3.141592654
#define rou 998.2
#define cord 0.2
#define h0 0.12
#define st 0.3
#define u 1.0
#define n_points 7 // number of pressure sample points
#define foil_id 3 // fluent_id of the foil
double theta0 = 28.0*pi/180.0;
double w = pi*st*u/h0;
double t = 2*h0/(st*u);
double eps = -100*pi/180 ; // -180 ~ 180
file *fc_up, *fp_up; // upstream
file *fc_dn, *fp_dn; // downstream
file *prs_foil_up, *prs_foil_dn, *fpresult; // pressure output
/**********************************************************************************************/
define_cg_motion(foil_upstream,dt,vel,omega,time,dtime)
{
real pressure = 0.0;
real f1, f3, f5;
real pl, pt, p;
real x[nd_nd] = {0.0};
real f_cg[nd_nd], m_cg[nd_nd], x_cg[nd_nd];
int n;
int i = 0;
int j = 0;
//-------------------------------------------------------------------------
#if !rp_host
face_t face ;
cell_t cell ;
domain *domain = get_domain(1);
thread *thread = dt_thread(dt);
//-------------------------------------------------------------------------
vel[0] = 0.0;
vel[1] = -h0*(cos(w*(time + dtime)) - cos(w*time)) / dtime;
omega[0] = 0.0;
omega[1] = 0.0;
omega[2] = -theta0*(sin(w*(time + dtime)) - sin(w*time)) / dtime;
//-------------------------------------------------------------------------
if (n_time % 20 == 1)
{
prs_foil_up = fopen("pressure_up.dat", "a+");
fprintf(prs_foil_up, " %.4f
", time*w / (2 * pi));
begin_f_loop(face, thread)
{
f_centroid(x, face, thread);
pressure = f_p(face, thread) + rp_get_float("operating-pressure"); // + absolute pressure
fprintf(prs_foil_up, " %d %.4f %.4f %.2f
", i + 1, x[0], x[1], pressure);
i++; }
end_f_loop(face, thread)
fclose(prs_foil_up);
}
#endif
//-------------------------------------------------------------------------
#if !rp_host if(time>8*dtime)
{
// f1 f3 f5 output
x_cg[0] = 0.0;
x_cg[1] = -h0*cos(w*time);
compute_force_and_moment (domain, thread, x_cg, f_cg, m_cg, false);
f1 = f_cg[0]/(0.5*rou*cord*u*u);
f3 = f_cg[1]/(0.5*rou*cord*u*u);
f5 = m_cg[2]/(0.25*rou*cord*cord*u*u);
pl = f_cg[1] * vel[1];
pt = m_cg[2] * omega[2];
p = pl + pt;
fc_up = fopen("force_upstream.dat", "a+");
fp_up = fopen("power_upstream.dat", "a+");
fprintf(fc_up, "%.3f %10.3f %10.3f %10.3f
", time*w / (2 * pi), f1, f3, f5);
fprintf(fp_up, "%.3f %10.3f %10.3f %10.3f
", time*w / (2 * pi), pl, pt, p );
fclose(fc_up);
fclose(fp_up);
}
#endif
return;
}
@
wuming524
回复此楼
» 猜你喜欢
博士申请都是内定的吗?
已经有13人回复
谈谈两天一夜的“延安行”
已经有8人回复
氨基封端PDMS和HDI反应快速固化
已经有11人回复
之前让一硕士生水了7个发明专利,现在这7个获批发明专利的维护费可从哪儿支出哈?
已经有11人回复
论文投稿求助
已经有4人回复
Applied Surface Science 这个期刊。有哪位虫友投过的能把word模板发给我参考一下嘛
已经有3人回复
投稿精细化工
已经有6人回复
1楼
2019-04-21 20:01:19
已阅
回复此楼
关注TA
给TA发消息
送TA红花
TA的回帖
xuwenhua625
银虫
(小有名气)
@
xingfuww
高级回复
6楼
2019-04-21 20:52:15
已阅
回复此楼
关注TA
给TA发消息
送TA红花
TA的回帖
查看全部 6 个回答
xuwenhua625
银虫
(小有名气)
@
lennon36
2楼
2019-04-21 20:15:37
已阅
回复此楼
关注TA
给TA发消息
送TA红花
TA的回帖
xuwenhua625
银虫
(小有名气)
@
sanguteduo
3楼
2019-04-21 20:26:09
已阅
回复此楼
关注TA
给TA发消息
送TA红花
TA的回帖
xuwenhua625
银虫
(小有名气)
@
mycc
4楼
2019-04-21 20:34:03
已阅
回复此楼
关注TA
给TA发消息
送TA红花
TA的回帖
查看全部 6 个回答
如果回帖内容含有宣传信息,请如实选中。否则帐号将被全论坛禁言
普通表情
龙
兔
虎
猫
百度网盘
|
360云盘
|
千易网盘
|
华为网盘
在新窗口页面中打开自己喜欢的网盘网站,将文件上传后,然后将下载链接复制到帖子内容中就可以了。
信息提示
关闭
请填处理意见
关闭
确定