|
楼主 |
发表于 2005-9-1 10:34:19
|
显示全部楼层
[资料]FIBER udf在多孔介质中的小实例及帮助
发一个关于多孔介质方面的小udf是以前的培训资料,很简单,顶一下上边的问题
/*******************************************************************/
/* */
/* Position-Dependent Porous Media */
/* */
/* FLUENT 6.0 Version */
/* Author Jay Sanyal */
/* Fluent Inc. */
/* */
/*******************************************************************/
#include "udf.h"
DEFINE_SOURCE(xmom_source, cell, thread, dS, eqn)
#define c2 100.0
real x[ND_ND];
float con, source;
C_CENTROID(x, cell, thread);
con = c2*0.5*C_R(cell, thread)*x[1];
source = - con*fabs(C_U(cell, thread))*C_U(cell, thread);
dS[eqn] = - 2.*con*fabs(C_U(cell, thread));
return source; |
|