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

turbulent viscosity built-in vs implemented

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2017, 07:20
Default turbulent viscosity built-in vs implemented
  #1
New Member
 
G Ionut
Join Date: Sep 2016
Posts: 29
Rep Power: 9
Ionut G is on a distinguished road
Hi guys,

I want to define a new turbulent viscosity model.

First I want to implement the equation from help manual.
I extracted and stored in C_UDMIs the values of Turbulent Kinetic Energy, Turbulent Kinetic Energy Dissipation Rate and Turbulent Viscosity. I compared them with the same built-in variables from fluent and I have some differences between each other.

Is it ok to have these differences if I compared, theoretically, the same variables?

For each figure, Series 1 represents the built-in variable from fluent, Series 2 represents the extracted variables and Series 3 (for the 3rd figure) is the calculated turbulent viscosity using the formula provided in help.

The 4th figure shows the line from which the variables was extracted and the comparison was made.

Thank you for the support.

I attached the code below:
Code:
// Preprocessors
#include "udf.h"
#include "mem.h"

// Constants
#define CMU 0.09
#define DENSITY 998.2

DEFINE_TURBULENT_VISCOSITY(trb_visc,c,t)
{	
   real mu_t, k, epsilon;
   
   k = C_K(c,t);
   C_UDMI(c,t,0) = k;
   
   epsilon = C_D(c,t);
   C_UDMI(c,t,1) = epsilon;
   
   mu_t_c = DENSITY*CMU*(k*k)/epsilon;
   C_UDMI(c,t,2) = mu_t;

   mu_t_e = C_MU_T(c,t);
   C_UDMI(c,t,3) = C_MU_T(c,t);
   
   return mu_t_e;
}
Attached Images
File Type: jpg k.jpg (71.2 KB, 13 views)
File Type: jpg epsilon.jpg (73.0 KB, 12 views)
File Type: jpg mu_t.jpg (81.1 KB, 13 views)
File Type: jpg line poz.jpg (34.3 KB, 11 views)
Ionut G is offline   Reply With Quote

Old   July 19, 2017, 13:05
Default
  #2
Member
 
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 9
vcvedant is an unknown quantity at this point
It is not ok to have these differences. The results should be same for both the cases. Also, what you are doing is just returning FLUENT's own viscosity instead of user-defined.
I am also trying to modify turbulent viscosity using this macro. I get the same results as the built-in models when I set the CMU value same as that of GUI panel. It seems that DEFINE_TURBULENT_VISCOSITY() is unable to affect diffusivity of the transport equations. Can you please help me with this.
vcvedant 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
Density correction function for turbulent viscosity Bando STAR-CCM+ 1 July 9, 2017 03:44
reversed flow at pressure inlet and turbulent viscosity is limited.... cfdiscool FLUENT 10 June 10, 2015 07:15
[OpenFOAM] turbulent viscosity ratio bmikuz ParaView 2 July 4, 2014 03:59
hel (turbulent viscosity ratio limited) for supersonic combustion problem omar.2002bh FLUENT 2 September 5, 2012 12:04
Turbulent viscosity limited to viscosity... Cyril FLUENT 16 October 4, 2007 07:12


All times are GMT -4. The time now is 16:36.