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

How to calculate the gradient of turbulent viscosity ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2016, 04:44
Question How to calculate the gradient of turbulent viscosity ?
  #1
New Member
 
Shuo-Jun Mei
Join Date: Sep 2014
Posts: 1
Rep Power: 0
meishuojun is on a distinguished road
Hello, every one!
I want to add an addition term to the source term of the temperature field ,and my UDF file is:
DEFINE_SOURCE(Energy_source, c, t, dS, eqn)
{
real x[ND_ND];
real source;
real Dmu; //turbulent viscosity derivative
C_CENTROID(x,c,t);
Dmu=2*(C_K(c,t)/C_D(c,t))*C_K_G(c,t)[1]-C_K(c,t)*C_K(c,t)/(C_D(c,t)*C_D(c,t))*C_D_G(c,t)[1]);
source =-g/Prt*C_R(c,t)*Cmu*Dmu;
dS[eqn] =0;
return source;
}

However, when I run my calculation, an error warning appears:
"
Error: received a fatal signal (Segmentation fault).
Error Object: #f
"
meishuojun is offline   Reply With Quote

Old   August 1, 2016, 17:34
Default
  #2
Member
 
Rajukiran Antham
Join Date: Dec 2012
Location: Sweden
Posts: 41
Rep Power: 14
RAJ KIRAN is on a distinguished road
Quote:
Originally Posted by meishuojun View Post
Hello, every one!
I want to add an addition term to the source term of the temperature field ,and my UDF file is:
DEFINE_SOURCE(Energy_source, c, t, dS, eqn)
{
real x[ND_ND];
real source;
real Dmu; //turbulent viscosity derivative
C_CENTROID(x,c,t);
Dmu=2*(C_K(c,t)/C_D(c,t))*C_K_G(c,t)[1]-C_K(c,t)*C_K(c,t)/(C_D(c,t)*C_D(c,t))*C_D_G(c,t)[1]);
source =-g/Prt*C_R(c,t)*Cmu*Dmu;
dS[eqn] =0;
return source;
}

However, when I run my calculation, an error warning appears:
"
Error: received a fatal signal (Segmentation fault).
Error Object: #f
"
You are missing definition of g and prt in the code
RAJ KIRAN is offline   Reply With Quote

Old   March 2, 2017, 09:21
Default
  #3
New Member
 
davoud javar
Join Date: Jan 2017
Posts: 8
Rep Power: 9
davoudj is on a distinguished road
anyone know how this problem solve?
it's from not defining C_T_G or... but how we do this?
thanks
davoudj is offline   Reply With Quote

Reply

Tags
udf


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
Ratio of eddy viscosity to molecular viscosity : Laminar or turbulent flow? JuPa CFX 7 September 9, 2013 08:45
Modified turbulent viscosity Christoph Oehy CFX 4 April 27, 2000 23:06


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