|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
请问一下就是用UDF利用源项设置加速度随时间变化的曲线,然后将UDF与源项的x轴连接起来,这是不是就算在x轴上加加速度了
/******************************************************************
The acceleration in the x-axis direction changes with time
*******************************************************************/
#include "udf.h"
#define g 9.8
DEFINE_SOURCE(accelaration_source, c, t, dS, eqn)
{
real x[ND_ND];
real source;
real current_time;
current_time = RP_Get_Real("flow-time");
source = -0.125*current_time*g+0.5*g;
dS[eqn] = 0.0;
return source;
}
|
|