CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   how to use dimensionless argument? (http://www.cfd-online.com/Forums/cfx/115824-how-use-dimensionless-argument.html)

D.ko April 8, 2013 00:19

how to use dimensionless argument?
 
i made UDF with argument as mass fraction
but i don't know how to use that.
i have to type the argument unit but mass fraction does not have unit
plz help me

Lance April 8, 2013 02:08

Do you mean in a CEL expression? You can always make your CEL expression dimensionless by dividing by the proper unit, e.g. 10 [kg]/1[kg] would result in 10 (unitless).

D.ko April 8, 2013 02:44

i mean that in a user function tab, there are spaces for argument unit and result unit, but my User defined Function has a argument as a mass fraction so it is dimensionless.

typing like a m*m^-1 or something else show error in applying UDF in SOURCE TERM like below

The variable 'Mass Fraction' referenced in parameter 'Source' in object '/FLOW:Flow Analysis 1/DOMAIN:R1/SUBDOMAIN:Subdomain 1/FLUID:h2ol/SOURCES/EQUATION SOURCE:continuity' does not have one of the required prefixes: component or particle component.

oj.bulmer April 8, 2013 07:51

If you have defined the variable, using an expression that contains the main variables in CFX, you don't need to specify unit. But if you are using actual values, you need to specify units -say 1 [m s-1] etc.

In case if the variable doesn't have units, don't give it even when you use it as a value. CFX will shout only when there is a discrepancy with dimensions of both sides of the expression.

OJ


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