|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我在帮助文件里看到下面的UDF,有些问题不太明白,
This UDF is used to provide a time-varying specification of the mass flow rate. This boundary condition can be applied using a DEFINE_PROFILE UDF. The following UDF, named inlet_mf, adjusts the mass flow rate from $1.00 kg/s$ to $1.35 kg/s$ when the physical time step is greater than $0.2$ seconds. After it has been interpreted or compiled, you can activate this UDF in the Mass-Flow Inlet boundary condition dialog box in ANSYS FLUENT by selecting the UDF from the Mass Flow Rate drop-down list.
#include "udf.h"
DEFINE_PROFILE(inlet_mf,th,i)
{
face_t f;
begin_f_loop(f,th)
{
if(CURRENT_TIME <= 0.01)
F_PROFILE(f,th,i) = 3.0;
else if(CURRENT_TIME <=0.02 && CURRENT_TIME >0.01)
F_PROFILE(f,th,i) = 4.0;
else
F_PROFILE(f,th,i) = 5.0;
}
end_f_loop(f,th);
}
为什么UFD中没有出现1.35和1,出现的3.0, 4.0, 5.0是什么意思
|
|