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

wrong results after use UDF turbulent viscosity

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2014, 11:12
Question wrong results after use UDF turbulent viscosity
  #1
Member
 
le hoang anh
Join Date: Oct 2012
Posts: 96
Rep Power: 13
lehoanganh07 is on a distinguished road
Hi, I posted one thread about this problem. Now I solved my problem and could compile to Fluent. This UDF file used to midify the turbulent viscosity for k epsilon model by Reboud formular. when I ran solution, althout, not diver but the residua become unstable which is reach to 10^3 for continuity residual. So I think have some thing wrong in my code, but I cant find out.
someone please help me! Thank you very much!


#include "udf.h"
#include "math.h"

#define pc 1944610000.0
#define t0 3836.94
#define ck 472.26
#define R 8.31

DEFINE_TURBULENT_VISCOSITY(reboud_mut,cell,thread)
{
real mut;
real rhol;
real rhov;
real cmu = 0.09;
real damp;
real voidf;
real k =C_K(cell,thread);
real d =C_D(cell,thread);

int liquid=0;
int vapor =1;

Thread *phase1;
Thread *phase2;

phase1=THREAD_SUB_THREAD(thread,liquid);
phase2=THREAD_SUB_THREAD(thread,vapor );

rhol=C_R(cell,phase1);
rhov=C_R(cell,phase2);
voidf=C_VOF(cell,phase2);

damp=rhov+(rhol-rhov)*pow((1.0-voidf),10);
mut=damp*cmu*k*k/d;

return (mut);
}
lehoanganh07 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Ratio of eddy viscosity to molecular viscosity : Laminar or turbulent flow? JuPa CFX 7 September 9, 2013 07:45
Wrong results from motorByke tutorial in OpenFoam 2.1.1 jsc OpenFOAM Running, Solving & CFD 3 April 16, 2013 07:26
hel (turbulent viscosity ratio limited) for supersonic combustion problem omar.2002bh FLUENT 2 September 5, 2012 11:04
Turbulent viscosity and shear rate shib FLUENT 0 June 22, 2010 12:44
Turbulent Viscosity UDF Raphael FLUENT 2 January 23, 2006 04:04


All times are GMT -4. The time now is 22:03.