找回密码
 注册
分享 UDF求欧拉模型中颗粒撞击壁面的角度
gearboy 2013-4-17 14:11
#include "udf.h" #define WALL_ID 4 // the wall id to be computed collision angle #define PARTICLE_PHASE_ID 1 // the phase id of particle phase DEFINE_ON_DEMAND(report_angle) { face_t f; cell_t c0; &nbs ...
1890 次阅读|1 个评论
分享 UDF求DPM撞击壁面的角度
gearboy 2013-4-17 14:10
使用DEFINE_DPM_BC宏来实现。记得hook。 #include "udf.h" DEFINE_DPM_BC(usr_bc_reflect,p,t,f,f_normal,dim) { real cos_angle,angle; cos_angle=NV_DOT(f_normal,P_VEL(p))/MAX(NV_MAG(P_VEL(p)),DPM_SMALL); & ...
2073 次阅读|1 个评论
分享 UDF检测能量方程是否打开
gearboy 2013-4-17 14:03
#include "udf.h" DEFINE_ON_DEMAND(test_temp_field) { Domain *domain; Thread *c_thread; domain=Get_Domain(1); thread_loop_c(c_thread, domain) /*loops over all cell threads in domain*/ { if(NNULLP(THREAD_STORAGE(c_thread,SV_T))) Message0("Temp. field exists\n"); else Message0("Temp. field doesn't exi ...
1729 次阅读|2 个评论
分享 UDF获取气体分压力或摩尔分数
gearboy 2013-4-17 14:00
You can use the following equation pi=C_P(c,t)*gas_molar_fraction where, pi is the partial pressure, C_P(c,t) gets the mixed gas pressure. gas_molar_fraction is the mole fraction of a species in the mixture, which can be calculated by - first summing up of all species and - then dividing the same ...
2499 次阅读|0 个评论
分享 UDF获取颗粒,壁面,气体的发射率
gearboy 2013-4-17 13:50
use DPM_EMISSIVITY(p,m) to get the particle emissivity. Use THREAD_VAR(t).wall.in_emiss to get the internal emissivity of a wall. Return value: Profile structure type Use the following method to get the emissivity (absorption coeff.) of internal gas Thread*t; Material *m; real as; Property *pro ...
1027 次阅读|0 个评论
分享 UDF获取计算中的残差
gearboy 2013-4-17 13:48
This is an example to print the residuals on the console. #include "udf.h" DEFINE_ON_DEMAND(residual_list) { int nw; real scaled_res; Domain*domain=Get_Domain(1); for(nw=0; nwMAX_EQNS; ++nw) { if(strlen(DOMAIN_EQN_LABEL(domain,nw))0) { if(0==DOMAIN_RES_SCALE(domain,nw) ) DOMAIN_RES_SCALE(domai ...
1179 次阅读|1 个评论
分享 根据坐标来得到cell
gearboy 2013-4-17 13:43
Here is the example, Note: the location of the specified point must be in the computational domain, otherwise error will occur. #include "udf.h" DEFINE_ON_DEMAND(find_cell) { cell_t c; Thread *t; CX_Cell_Id cx_cell; real NV_VEC(pt); real c_centroid ; NV_D(pt, =, 0.5, 0.3, 0.2); //coordinate of your ...
1471 次阅读|1 个评论
分享 用VC++编译UDF并调用API函数实现Fluent内嵌菜单
gearboy 2013-4-17 13:14
采用VC++编译UDF即可支持MFC和Windows API函数甚至第三方的库,大大拓展UDF的功能,利用该技术可以实现复杂的界面,例如Fluent内嵌菜单,对话框,文档视图结构,以及操作系统函数级的相关操作,远远胜过别扭而功能有限的scheme命令。还可以调用现有的各种库,例如科学数据后处理VTK等等。
1214 次阅读|1 个评论 热度 1
分享 谈谈回国工作---转科学网马臻blog
jlwang 2013-4-5 14:46
在网上总能看到一些关于回国任教的评论。有些事情,你经历过和不经历过,看法或者视角会有很大的变化。亲历过的人看没有亲历过人的评论,感到不是那回事。至少,当你和知情者聊聊,知情者就知道你有误解,你也会放弃一些成见。 2009年,我正面临人生重大的选择——是否回国任教?当时不但我纠结,而且我的妻 ...
1176 次阅读|0 个评论
分享 激水漂沙石,疾风扬灰尘
ltbbl 2013-3-8 15:58
激水漂沙石,疾风扬灰尘 激水漂沙石,疾风扬灰尘,是司空见惯的自然现象。依流体不变论可知,流体的动密度随流速的增加而增大,因而流体的动浮力也变大,结果沉渣泛起,俞演俞烈。降低流速,可复平常。
2852 次阅读|0 个评论
返回顶部