Modify SST kw model in CFX
1 Attachment(s)
Hi everyone,
In CFX, The turbulent eddy viscosity μt in SST kw is given as: Attachment 55930 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+(mixdensity-Vapour.Density)^10 / (Water.Density-Vapour.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: | | DIVIDE-BY-ZERO | | | | 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 sub-expression: | | 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.230000E-07 | | sstrnr = 11.4584 | | Wall Distance = 0.00000 | | Fluid 2.Volume Fr... = 1.000000E-15 | | Fluid 2.Density = 2.308000E-02 | | Fluid 1.tef = 258.753 | | Fluid 1.ke = 5.973506E-05 | | Fluid 1.Volume Fr... = 1.00000 | | Fluid 1.Dynamic V... = 9.211540E-04 | | 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: | | DIVIDE-BY-ZERO | | | | 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 sub-expression: | | 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.230000E-07 | | sstrnr = 4.21159 | | Wall Distance = 0.00000 | | Fluid 2.Volume Fr... = 1.000000E-15 | | Fluid 2.Density = 2.308000E-02 | | Fluid 1.tef = 309.657 | | Fluid 1.ke = 7.026244E-05 | | Fluid 1.Volume Fr... = 1.00000 | | Fluid 1.Dynamic V... = 9.211540E-04 | | Fluid 1.Density = 998.000 | | | | END OF DIAGNOSTIC OUTPUT FOR CFX EXPRESSION LANGUAGE | +--------------------------------------------------------------------+ Any courtesies extended to me will be greatly appreciated. Thanks.:) |
The value for Wall Distance is 0; therefore, denominator is 0, and the division cannot be completed.
|
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. |
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. |
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. |
Quote:
Quote:
|
Quote:
Yeah, I see. Thanks a lot. Sent from my iPhone using CFD Online Forum mobile app |
All times are GMT -4. The time now is 13:02. |