24小时热门版块排行榜    

CyRhmU.jpeg
查看: 5759  |  回复: 12
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

water217

银虫 (小有名气)

[求助] 如何用Compute_Force_And_Moment函数求流体对运动翼型的俯仰力矩已有1人参与

使用fluent的动网格功能模拟了流体绕俯仰-升沉振荡二维翼型的流场后,想得到作用于翼型俯仰参考轴上的俯仰力矩随时间的变化关系,采用了函数Compute_Force_And_Moment(domain, thread, body_centroid, force, moment, FALSE);来求解,可是算下来的俯仰力矩明显有问题(图片中的俯仰力矩都是正值,可是俯仰振荡以后攻角有正有负,俯仰力矩肯定有负值的情况),更换模型俯仰轴的参考位置后,结果也没有什么变化(一个参考轴取距前缘0.3倍的弦长,一个取0.6倍的弦长,结果峰值差不多,变化规律基本一样),请问Compute_Force_And_Moment默认的力矩参考轴是什么位置?我的程序为什么输出的力矩系数有问题?
这个程序里求得的力矩是相对于,大地坐标系,还是随体坐标系,谢谢
附程序:
#include "udf.h"
#include "mem.h"
#include "dynamesh_tools.h"
#include "math.h"
/************************************************************/
FILE*fp;
real current_time = 0.0000 ;
static real vel[3]={0,0,0};/* 初始速度*/
static real omega[3]={0,0,0};/* 初始角速度*/
static real body_centroid[3]={0,0,0};/* 初始形心位置,需要修改*/
static real Chord=0.1,F_density=998.2,U_flow=2;
static real pi=3.1416,frequency=2.0000,Y_amplitude=0.1,w_amplitude=0.8727;
real NV_VEC( origin ),NV_VEC( force ),NV_VEC( moment );
real C_momentr;
/************************************************************/
DEFINE_CG_MOTION(hydrofoil,dt,vel,omega,time,dtime)
{
        Domain * domain ;
        Thread * thread ;
        face_t  f;
        current_time = CURRENT_TIME ;
        vel[0] = 0.0 ;
        vel[1] =2*pi*frequency*Y_amplitude*cos(2*pi*frequency*current_time+pi/2);
        vel[2] = 0.0 ;
        omega[0] = 0.0 ;
        omega[1] = 0.0 ;
        omega[2] =2*pi*frequency*w_amplitude*cos(2*pi*frequency*current_time);
        thread=DT_THREAD(dt);
        domain = THREAD_DOMAIN (thread);
/************************************************************/
                body_centroid[0]=DT_CG(dt)[0];/* 获取形心坐标*/
                body_centroid[1]=DT_CG(dt)[1];/* 获取形心坐标*/
         Compute_Force_And_Moment(domain, thread, body_centroid, force, moment, FALSE);/* 计算水翼总的受力情况*/
        C_moment=moment[2]/(0.5*F_density*U_flow*U_flow*Chord*Chord);/* 计算俯仰力矩系数*/
fp=fopen("D:\\moment_coefficient.dat", "a+";
        fprintf(fp, "%12f",C_moment);
        fprintf(fp, "\n";
        fclose(fp);
}

未命名.JPG

[ Last edited by water217 on 2013-1-24 at 17:55 ]
回复此楼

» 收录本帖的淘帖专辑推荐

CFD_study

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

率性而为……
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dhonghui

银虫 (小有名气)

"This function needs size of 3 for force and moment. It works in parallel and
the common arguments are the of the same type as your arguments.
In addition you have to pass the domain as first arg and a boolean as
last argument. This boolean has to be TRUE if you also call the function
on the host else it has to be FALSE."

Compute_Force_And_Moment (domain, tf, CG, force, moment, FALSE);

domain = THREAD_DOMAIN (DT_THREAD ((Dynamic_Thread *)dt)); - pointer on Domain
tf = Lookup_Thread(domain, ID); - pointer on the Thread in Domain

I don't know if "force" includes viscose and pressure force or only pressure force!!!
************************************************** **************
compute viscose force in UDF

you have to define in mem.h header or in local c-file this macro:

#define F_VISCOSE(f,tf) F_STORAGE_R_N3V(f,tf,SV_WALL_SHEAR)

Thread *tf = DT_THREAD(dt); /*pointer on thread*/
face_t f; /*number of faces*/

begin_f_loop(f, tf)
{
NV_VS(F_VISC, += , F_VISCOSE(f, tf), *, -1.0 * k); /* compute viscose force vector. k is a factor for depth in 2D computation and -1.0 corrects the sign of viscose force*/

}
end_f_loop(f, tf);
from http://www.cfd-online.com/Forums ... rce_and_moment.html
9楼2014-09-17 14:11:33
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 13 个回答

dragonship

铁杆木虫 (正式写手)

膜拜。请问你这些是从哪里学习的,我也想弄,因为船舶受力和机翼有很多相似之处。望指点。
2楼2013-01-30 09:32:36
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

watcher007

新虫 (正式写手)

★ ★
xiegangmai: 金币+2, 鼓励讨论交流! 2013-02-11 10:09:27
楼主 你Compute_Force_And_Moment(domain, thread, body_centroid, force, moment, FALSE)这个里面的为什么是用FALSE,我一直用的是TRUE,我刚才用一个简单的算例算了一下这个里面的force好像没错
3楼2013-02-02 11:27:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xhd1_moon

银虫 (正式写手)

不是很懂,
4楼2013-02-05 22:31:35
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见