-
-
August 26, 2018 at 2:02 pm
-
August 26, 2018 at 2:05 pm
DEBA
Subscriber
The following code is ok sir?
#include "udf.h"
#define mu_p 0.00123
#define H_ct 0.48
#define k_0 3.96
#define k_inf 1.71
#define gamma_c 5.0
DEFINE_PROPERTY(cell_viscosity,c,t)
{
real shear_rate;
real mu;
real k;
real sqrt_gamma_ratio;
shear_rate = C_STRAIN_RATE_MAG(c,t);
sqrt_gamma_ratio = sqrt(shear_rate/gamma_c);
k = (k_0+k_inf*sqrt_gamma_ratio)/(1+sqrt_gamma_ratio);
if (y<50)
{
mu = mu_p/pow((1-0.5*k*H_ct),2);
else
mu=0.00345
}
mu=return mu;
}
-
August 26, 2018 at 4:25 pm
Karthik R
AdministratorHello,
Were you able to compile this code? Did you get any errors? Could you please share your errors? One note: I do not think you have defined defined 'y' in your code.
As suggested by other experts, you should strongly consider looking into the DEFINE_PROFILE example in the customization manual. I am attaching a screenshot of the DEFINE_PROFILE here. Please go through similar examples for better understanding.
I hope this helps.
Best Regards,
Karthik
-
August 26, 2018 at 4:40 pm
Karthik R
AdministratorHello,
Also one additional note:
please refrain from creating additional threads to ask follow-up questions related to an earlier thread because of the following reasons:
- there is no continuity and you might receive repetitive answers from different sources.
- If somebody has a similar issue as yours and is trying to find an answer, it becomes difficult to follow the discussion as it is scattered over several threads.
Thank you.
Best Regards,
Karthik
-
September 4, 2018 at 7:51 am
DEBA
SubscriberSIR I HAVE WRITTEN UDF BUT SIR I AM GETTING error sir
ERROR IS fluent/14.0.0/src/dual_cell.h:line 1 : parse error.
-
September 4, 2018 at 9:00 am
DrAmine
Ansys EmployeeStop posting the same question everywhere please and bear in mind that this is an open community so everyone can have access into you UDF.
-
September 4, 2018 at 9:15 am
Rob
Ansys EmployeeParse error typically means you've got the syntax wrong. If it's a UDF from the manual check for white space characters (HTML & pdf often contain these), if you wrote it check line 2 too. I'm not entirely sure why you're trying to access the heat exchanger model, and would also recommend updating to R19.
-
- 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
-
2600
-
2088
-
1317
-
1108
-
459
© 2023 Copyright ANSYS, Inc. All rights reserved.