CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Modify SST kw model in CFX

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2017, 09:25
Smile Modify SST kw model in CFX
  #1
Member
 
Tingyun YIN
Join Date: Apr 2017
Posts: 31
Rep Power: 9
Tingyun YIN is on a distinguished road
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+(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.
Tingyun YIN is offline   Reply With Quote

Old   May 10, 2017, 09:56
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33
Opaque will become famous soon enough
The value for Wall Distance is 0; therefore, denominator is 0, and the division cannot be completed.
Opaque is offline   Reply With Quote

Old   May 10, 2017, 21:31
Default
  #3
Member
 
Tingyun YIN
Join Date: Apr 2017
Posts: 31
Rep Power: 9
Tingyun YIN is on a distinguished road
Quote:
Originally Posted by Opaque View Post
The value for Wall Distance is 0; therefore, denominator is 0, and the division cannot be completed.
Hi Opaque,

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.
Tingyun YIN is offline   Reply With Quote

Old   May 11, 2017, 01:58
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   May 11, 2017, 09:37
Default
  #5
Member
 
Tingyun YIN
Join Date: Apr 2017
Posts: 31
Rep Power: 9
Tingyun YIN is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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.
Hi ghorrocks,

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.
Tingyun YIN is offline   Reply With Quote

Old   May 11, 2017, 20:03
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Quote:
I get your point but how to evaluate properly at the wall in CFX?
Your function is not valid at the wall. Dream up a modification of the function so it is valid at the wall. For instance some models use wall functions to handle situations like this.

Quote:
how to express y
The Wall Distance variable is correct.
ghorrocks is offline   Reply With Quote

Old   May 12, 2017, 07:44
Default
  #7
Member
 
Tingyun YIN
Join Date: Apr 2017
Posts: 31
Rep Power: 9
Tingyun YIN is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Your function is not valid at the wall. Dream up a modification of the function so it is valid at the wall. For instance some models use wall functions to handle situations like this.



The Wall Distance variable is correct.


Yeah, I see.

Thanks a lot.


Sent from my iPhone using CFD Online Forum mobile app
Tingyun YIN is offline   Reply With Quote

Reply

Tags
cfx, sst k-w


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
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
SST turbulence model question in ANSYS CFX drsidd10 CFX 2 January 18, 2015 06:38
wall treatment k-w SST model in Fluent behest FLUENT 0 December 26, 2014 09:14
How to modify the Schmidt number in CFX for additional variables model? rockzh CFX 11 February 10, 2012 21:36
[ICEM] Proper way to name boundaries on 2D model for use in CFX? RossFS ANSYS Meshing & Geometry 4 November 10, 2011 03:38


All times are GMT -4. The time now is 02:34.