CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Brinkman term in UDF ? (https://www.cfd-online.com/Forums/fluent-udf/127121-brinkman-term-udf.html)

dotapro December 4, 2013 03:45

Brinkman term in UDF ?
 
Dear all,
I could like to add for
Brinkman term(second velocity derivative) in momentum sink since Darcy and Forchheimer term exist in Fluent porous setup. This Brinkman term is shown as below:



mu(dynamic viscosity of fluid)*∇^2 *V (velocity vector) /ep(porosity) = ((d^2*u/(dx)^2+d^2*u/(dy)^2+d^2*u/(dz)^2)+ (d^2*v/(dx)^2+d^2*v/(dy)^2+d^2*v/(dz)^2)+ (d^2*w/(dx)^2+d^2*w/(dy)^2+d^2*w/(dz)^2))*mu(dynamic viscosity of fluid)/ep(porosity)


Below is my coding for UDF:



#include"udf.h"
#define ep =0.93
DEFINE_SOURCE(xmom_source,c,t,dS,eqn)
{
real source;
real x;

x=C_MU_L(c,t)*(C_DUDX(c,t)+C_DUDY(c,t)+C_DUDZ(c,t) )/ep;
C_UDSI(c,t,0)=x;
source=C_UDSI_G(c,t);
dS[eqn]=0;


return source;
}


DEFINE_SOURCE(ymom_source,c,t,dS,eqn)
{
real source;
real y;

y=C_MU_L(c,t)*(C_DVDX(c,t)+C_DVDY(c,t)+C_DVDZ(c,t) )/ep;
C_UDSI(c,t,1)=y;
source=C_UDSI_G(c,t);
dS[eqn]=0;


return source;
}


DEFINE_SOURCE(zmom_source,c,t,dS,eqn)
{
real source;
real z;

z=C_MU_L(c,t)*(C_DWDX(c,t)+C_DWDY(c,t)+C_DWDZ(c,t) )/ep;
C_UDSI(c,t,2)=y;
source=C_UDSI_G(c,t);
dS[eqn]=0;


}
or

I need to use C_U_G(c,t) to replace C_DVDX(c,t)+C_DVDY(c,t)+C_DVDZ(c,t)?





Can anyone help me to verify my attempt ?


Thank you.

prakashpvl August 8, 2014 01:41

Brinkman term in UDF
 
u got answer for it?

dotapro August 8, 2014 08:52

Dude, I still have not solve the problem.


All times are GMT -4. The time now is 06:49.