|
[Sponsors] |
turbulence model modification - low Re CHC model |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 22, 2013, 11:57 |
turbulence model modification - low Re CHC model
|
#1 |
Member
CC
Join Date: Jun 2011
Posts: 73
Rep Power: 15 |
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? |
|
August 1, 2013, 07:48 |
|
#2 |
Member
CC
Join Date: Jun 2011
Posts: 73
Rep Power: 15 |
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?
|
|
|
|
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 21:21 |
Turbulence model for low Reynolds number flow? | Nokadu | Main CFD Forum | 3 | May 26, 2013 12:42 |
Deep modification of turbulence model | Phicau | OpenFOAM Programming & Development | 2 | January 29, 2013 11:18 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
turbulence model equation | Andy Chen | FLOW-3D | 4 | January 1, 2010 22:45 |