24小时热门版块排行榜    

CyRhmU.jpeg
查看: 407  |  回复: 1

wjqian_11

木虫 (著名写手)

[求助] Why i can't change injection through DEFINE_DPM_INJECTION_INIT

Hi, i hope anyone could help me or give me some advices.

The problem is: I create a surface injection in GUI, and the flow is unsteady and particle tracking is also unsteady. Then i want to change the particle temperature through UDF. the UDF can be built, loaded and hooked, but it does no change to the particle temperature at all. I also tried a DEFINE_ADJUST, and the problem is same.

the UDF is:
#include "udf.h"

DEFINE_DPM_INJECTION_INIT(particle, I)
{

Particle *p;
Message("Initializing Injection qwj: %s\n",I->name);


loop(p,I->p_init)
{
P_INIT_TEMP(p)=1500;
P_T(p)=1400;
}

}
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

学道巅峰

新虫 (小有名气)

the familiar problem occurs to me,I want to get a time-changed flow rate in single injection ,so I write a udf to make it,all thing is  ok but it doesn't work, flow rate still remain the defalut value I set in GUI.
2楼2017-04-11 16:07:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 wjqian_11 的主题更新
信息提示
请填处理意见