CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

turbulence model modification - low Re CHC model

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By C.C

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2013, 10:57
Default turbulence model modification - low Re CHC model
  #1
C.C
Member
 
CC
Join Date: Jun 2011
Posts: 73
Rep Power: 14
C.C is on a distinguished road
Hi all,

I want implement the CHC low Reynolds turbulence model using an UDF. The main objective is modify the damping function in the CHC model.
In this model the boundary condition for epsilon is equal to:
fluid kinematic viscosity * second derivative of k in space (d^2(k)/dy^2)
Also, there are the parameter Rey defined as:
fluid density*sqrt(k)*y/epsilon in which y is the distance to the wall.

In my UDF i wrote this part as:

DEFINE_ADJUST(userdefinedadj_func,d)
{
Thread *t;
cell_t c;
thread_loop_c(t,d)
{
begin_c_loop(c,t)
/* r=k[1];*/
{
real r,k[ND_ND];
C_CENTROID(k,c,t);
C_UDMI(c,t,MUT)=C_R(c,t)*C_MU*f_mu(c,t)*SQR(C_UDSI (c,t,TE))/C_UDSI(c,t,ED);
C_UDMI(c,t,RET)=C_R(c,t)*SQR(C_UDSI(c,t,TE))/(C_MU_L(c,t)*C_UDSI(c,t,ED));
C_UDMI(c,t,REY)=C_R(c,t)*sqrt(C_UDSI(c,t,TE))*(0.0 381-k[1])/C_UDSI(c,t,ED);
}
end_c_loop(c,t)
}
}



/* Wall B.C. for ED */
DEFINE_PROFILE(e_wallBC,t,i)
{
double prof;
real D2KDX2,D2KDY2;
cell_t c;
begin_c_loop(c,t)
{
C_UDSI(c,t,DKX)=(C_K_G(c,t)[0]);
C_UDSI(c,t,DKY)=(C_K_G(c,t)[1]);
D2KDX2=(C_UDSI_G(c,t,DKX)[0]);
D2KDY2=(C_UDSI_G(c,t,DKY)[1]);
prof=C_MU_L(c,t)*(D2KDX2+D2KDY2)/C_R(c,t);
F_PROFILE(c,t,i)=prof;
}
end_c_loop(c,t)
}


The error that I obtained is that:
Error: Divergence detected in AMG solver: x-momentum
Error Object: #f

I'm new in programming UDF. Please, anyone can check if that part of my UDF is ok?
Also, i have another doubt... how can i choose the right boundary condition once the B.C. for these model includes a second derivative?
grossz likes this.
C.C is offline   Reply With Quote

Old   August 1, 2013, 06:48
Default
  #2
C.C
Member
 
CC
Join Date: Jun 2011
Posts: 73
Rep Power: 14
C.C is on a distinguished road
Can i modify the damping function f_mu in the low Reynolds CHC turbulence model existent by default in Fluent without solve a scalar user-defined equation implemented in an UDF?
C.C is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modified k-e turbulence model UDF Travis Fluent UDF and Scheme Programming 7 November 11, 2018 20:21
Turbulence model for low Reynolds number flow? Nokadu Main CFD Forum 3 May 26, 2013 11:42
Deep modification of turbulence model Phicau OpenFOAM Programming & Development 2 January 29, 2013 10:18
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
turbulence model equation Andy Chen FLOW-3D 4 January 1, 2010 21:45


All times are GMT -4. The time now is 12:14.