-
-
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
Ansys EmployeeRead 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
Ansys EmployeeOK, so the parse error is fixed?
-
- You must be logged in to reply to this topic.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
-
2564
-
2080
-
1299
-
1106
-
459
© 2023 Copyright ANSYS, Inc. All rights reserved.