|
[Sponsors] |
November 24, 2009, 11:35 |
CFX Expressions
|
#1 |
New Member
lex
Join Date: Nov 2009
Posts: 2
Rep Power: 0 |
Hi all,
Can anyone explain how do i add a condition if i want to avoid zero division error (Esp expressions)? Below is the expression i have enter. EXPRESSIONS: Esp = (Uf^3)/(0.41*z) Uf = sqrt(k*sqrt(0.09)) Ug = 13 [m s^-1] Uz = Ug*((z/Zg)^0.25) Zg = 400 [m] k = 1.5*(Uz*0.12)^2 Need to set a condition that z must be greater than zero and not more than 400 m. Thanks in advance. Lex |
|
November 24, 2009, 17:48 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
You can do conditional stuff either using the step() function, or if you use V12 you can use the new "if" statement. Look in the CEL reference guide for details.
|
|
November 24, 2009, 20:40 |
|
#3 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 18 |
if you have a number that is divided by zero
A = x/y where y -1<y<1 the follwing is numericaly similar and you dont have divide by zero A = x/ (y + 1e-15[m])
__________________
Top 4 tips 1. Knowledge is everything and Ignorance is dangerous. 2. Understand your limitations and try to eliminate them. 3. Get yerself a bike and hoon the chuffer. You will soon learn why dogs like to hang their heads out the car window. 4. Please before asking any questions on how to run simulations in CFX, go though all the tutorials |
|
November 25, 2009, 09:36 |
|
#4 |
New Member
lex
Join Date: Nov 2009
Posts: 2
Rep Power: 0 |
Hi,
Thanks for the advice. Problem resolved. Lex |
|
November 25, 2009, 10:25 |
|
#5 |
Member
Join Date: Mar 2009
Posts: 44
Rep Power: 17 |
||
January 7, 2010, 09:12 |
|
#7 |
Senior Member
Join Date: Jul 2009
Posts: 260
Rep Power: 18 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pros and Cons for CFX, CFdesign, COMSOL | Val | Main CFD Forum | 3 | June 10, 2011 03:20 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |
Importing solutions in CFX. | Alphonso | CFX | 1 | August 1, 2008 15:01 |
PhD using CFX | Rui | CFX | 9 | May 28, 2007 06:59 |
CFX 4.4 installation problem | Pandu Sattvika | CFX | 1 | December 1, 2001 05:07 |