-
-
July 31, 2019 at 7:35 am
Azim07
SubscriberI want to define the Viscosity property of the material in the form of following Equation.
mu =(0.00727)+((((-8.6022)+(1871.3/temp)+(0.0152*temp)-(0.000012043*temp*temp))-(0.00727))/1+(exp((10/343-temp)*(temp-321.35))))
Â
and I have written the UDF as follow which shows the Parse Error in the Line 7.
Â
#include "udf.h"
DEFINE_PROPERTY(cell_viscosity,c,t)
{
real mu;
real temp = C_T(c,t);
mu =(0.00727)+((((-8.6022)+(1871.3/temp)+(0.0152*temp)-(0.000012043*temp*temp))-(0.00727))/1+(exp((10/343-temp)*(temp-321.35))))
return mu;
}
Â
Please help me to fix this Parse Error if any other changes to be done.
Thanks.
Â
-
July 31, 2019 at 10:16 am
Rob
Forum ModeratorRead some of the examples, and look how C language terminates lines of code.Â
-
July 31, 2019 at 10:19 am
Azim07
SubscriberThanks for your replyÂ
Â
It is showing floating exception Error.
-
July 31, 2019 at 11:12 am
Rob
Forum ModeratorOK, so the parse error is fixed?Â
-
- The topic ‘How to Parse Error in Viscosity UDF?’ is closed to new replies.
-
3572
-
1188
-
1076
-
1063
-
952
© 2025 Copyright ANSYS, Inc. All rights reserved.