-
-
March 8, 2019 at 4:04 am
le.martinezalvarado
SubscriberHi everyone! Im working on the simulation welding process on ansys fluent; Im kind a begginer on this tool and especially I have some questions/problems with my UDF. I know that the next stape before writing UDF is compile, but since here im lost. Which program I need to compile UDF? How is the impletantion on the software fluent? I wrote on notepad...
#include "mem.h"
#include "math.h"
#include "udf.h"
DEFINE_PROPERTY(cell_viscosity,c,t)
{
real mhu;
real Q=176867;
real R=8.314;
real A=4.46 exp(13);
real n=5.86;
real alfa=0.0118;
real SR=C_STRAIN_RATE_MAG(c,t);
real temp=C_T(c,t);
real Z;
real S;
Z=SR exp(Q/R*temp);
S=(1/alfa)*asinh[pow((Z/A),(1/n)];
mhu=S/(3*SR);
return mhu;
}
This the code and if someone had a observation I'll very gratefull. Thanks for advanced.
-
March 8, 2019 at 7:14 am
Max4
SubscriberHi,
For compiling an UDF, a C-compiler must be installed, like Visual Studio.
You can see this discussion for installing it and check the compatibility version between your ANSYS Version and Visual Studio 2017 : /forum/forums/topic/writing-udf-1/
To compile an UDF in Fluent, follow these instructions:
- In User Defined, click on Functions and Compiled
- Then click on Add and choose the file (in c. format). Click on Build, and Then Load it.
Regards,
Maxime
-
March 8, 2019 at 8:14 am
Amine Ben Hadj Ali
Ansys EmployeeThanks Maxime! Weiter so!
-
March 8, 2019 at 8:22 pm
le.martinezalvarado
SubscriberThanks a lot! Now I have the error "nmake' is not recognized as an internal or external command, operable program or batch file. 'nmake' is not recognized as an internal or external command, operable program or batch file" I started fluent from prompt command and I change the working directory to the deskopt. Its VS community 2017 and ansys 17.2. Could be a compatibility problem? Thanks for advanced.
-
March 8, 2019 at 8:25 pm
Amine Ben Hadj Ali
Ansys Employee -
March 8, 2019 at 8:31 pm
Max4
SubscriberMake sure that Ansys and VS are installed on the same hard disk.
Moreover, be sure that you have installed all the required packages:
/forum/forums/topic/writing-udf-1/
-
- The topic ‘Viscosity UDF Compile’ is closed to new replies.
- air flow in and out of computer case
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Eroded Mass due to Erosion of Soil Particles by Fluids
- I am doing a corona simulation. But particles are not spreading.
- Guidance needed for Conjugate Heat Transfer Analysis for a 3s3p Li-ion Battery
- Centrifugal Fan Analysis for Determination of Characteristic Curve
- Issue to compile a UDF in ANSYS Fluent
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
-
3887
-
1414
-
1241
-
1118
-
1015
© 2025 Copyright ANSYS, Inc. All rights reserved.