
[Sponsors] 
May 10, 2017, 08:25 
Modify SST kw model in CFX

#1 
Member
Tingyun YIN
Join Date: Apr 2017
Posts: 31
Rep Power: 8 
Hi everyone,
In CFX, The turbulent eddy viscosity μt in SST kw is given as: 1.png Now, I'm going to modify density and implement it with CEL language: LIBRARY: CEL: &replace EXPRESSIONS: modifySST = fn*Water.ke/ (Water.tef *coefficiency) coefficiency = max(1,sstrnr*F2/(0.31*Water.tef)) F2 = tanh(arg^2) arg = max(2*sqrt(Water.ke)/(0.09*Water.tef*Wall Distance ),500*kinetic viscosity/(Wall Distance^2*Water.tef) ) kinetic viscosity = Water.Dynamic Viscosity/Water.Density fn = Vapour.Density+(mixdensityVapour.Density)^10 / (Water.DensityVapour.Density)^9 mixdensity = Water.Volume Fraction*Water.Density+Vapour.Volume Fraction*Vapour.Density END END END When Slover run, a problem occured: ++  PROBLEM ENCOUNTERED WHEN EXECUTING CFX EXPRESSION LANGUAGE     The CFX expression language was evaluating:   Eddy Viscosity     The problem was:   DIVIDEBYZERO     FURTHER INFORMATION     The problem was encountered in executing the expression for:   arg   The complete expression is:   max(2*sqrt(Fluid 1.ke)/(0.09*Fluid 1.tef*Wall Distance ),500*ki \  netic viscosity/(   The error occurs on subexpression:   2*sqrt(Fluid 1.ke)/(0.09*Fluid 1.tef*Wall Distance )     BACKGROUND INFORMATION     The error was detected at one location. The same problem may be   present at other locations  that has not been investigated.   The following values are for the first location which has the   problem.     These values were set before reaching the current expression:     Name = Expression = Value     kinetic viscosity = Fluid 1.Dynamic Viscosity/F= 9.230000E07   sstrnr = 11.4584   Wall Distance = 0.00000   Fluid 2.Volume Fr... = 1.000000E15   Fluid 2.Density = 2.308000E02   Fluid 1.tef = 258.753   Fluid 1.ke = 5.973506E05   Fluid 1.Volume Fr... = 1.00000   Fluid 1.Dynamic V... = 9.211540E04   Fluid 1.Density = 998.000     END OF DIAGNOSTIC OUTPUT FOR CFX EXPRESSION LANGUAGE  ++ ++  PROBLEM ENCOUNTERED WHEN EXECUTING CFX EXPRESSION LANGUAGE     The CFX expression language was evaluating:   Eddy Viscosity     The problem was:   DIVIDEBYZERO     FURTHER INFORMATION     The problem was encountered in executing the expression for:   arg   The complete expression is:   max(2*sqrt(Fluid 1.ke)/(0.09*Fluid 1.tef*Wall Distance ),500*ki \  netic viscosity/(   The error occurs on subexpression:   2*sqrt(Fluid 1.ke)/(0.09*Fluid 1.tef*Wall Distance )     BACKGROUND INFORMATION     The error was detected at one location. The same problem may be   present at other locations  that has not been investigated.   The following values are for the first location which has the   problem.     These values were set before reaching the current expression:     Name = Expression = Value     kinetic viscosity = Fluid 1.Dynamic Viscosity/F= 9.230000E07   sstrnr = 4.21159   Wall Distance = 0.00000   Fluid 2.Volume Fr... = 1.000000E15   Fluid 2.Density = 2.308000E02   Fluid 1.tef = 309.657   Fluid 1.ke = 7.026244E05   Fluid 1.Volume Fr... = 1.00000   Fluid 1.Dynamic V... = 9.211540E04   Fluid 1.Density = 998.000     END OF DIAGNOSTIC OUTPUT FOR CFX EXPRESSION LANGUAGE  ++ Any courtesies extended to me will be greatly appreciated. Thanks. 

May 10, 2017, 08:56 

#2 
Senior Member
Join Date: Jun 2009
Posts: 1,728
Rep Power: 30 
The value for Wall Distance is 0; therefore, denominator is 0, and the division cannot be completed.


May 10, 2017, 20:31 

#3  
Member
Tingyun YIN
Join Date: Apr 2017
Posts: 31
Rep Power: 8 
Quote:
Thank you for your reply. In CFX, Definition of Wall Distance might not be same with meaning of y in F2 expression. Here: F2 = tanh(arg^2) arg = max(2*sqrt(Water.ke)/(0.09*Water.tef*Wall Distance ),500*kinetic viscosity/(Wall Distance^2*Water.tef) ) So, cloud you offer the correct the CEL expression or references for guidance? Thanks. 

May 11, 2017, 00:58 

#4 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,479
Rep Power: 140 
Your function does not appear to be defined at the wall as you divide by Wall distance regardless of which argument the max() function ends up using. This means your equation falls apart at the wall. You will need to recast your function so it evaluates properly at the wall.
It is not a problem with CEL, the problem is with the fundamental function you are trying to use. 

May 11, 2017, 08:37 

#5  
Member
Tingyun YIN
Join Date: Apr 2017
Posts: 31
Rep Power: 8 
Quote:
Thank you for your reply. I get your point but how to evaluate properly at the wall in CFX? In other words, how to express y (the distance from the field point to the nearest wall) in CFX? Is it correct? Thanks. 

May 11, 2017, 19:03 

#6  
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,479
Rep Power: 140 
Quote:
Quote:


May 12, 2017, 06:44 

#7  
Member
Tingyun YIN
Join Date: Apr 2017
Posts: 31
Rep Power: 8 
Quote:
Yeah, I see. Thanks a lot. Sent from my iPhone using CFD Online Forum mobile app 

Tags 
cfx, sst kw 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Wrong flow in ratating domain problem  Sanyo  CFX  17  August 15, 2015 06:20 
SST turbulence model question in ANSYS CFX  drsidd10  CFX  2  January 18, 2015 05:38 
wall treatment kw SST model in Fluent  behest  FLUENT  0  December 26, 2014 08:14 
How to modify the Schmidt number in CFX for additional variables model?  rockzh  CFX  11  February 10, 2012 20:36 
[ICEM] Proper way to name boundaries on 2D model for use in CFX?  RossFS  ANSYS Meshing & Geometry  4  November 10, 2011 02:38 