-
-
January 31, 2021 at 1:24 pm
100041488
SubscriberHi folks,nI am creating my first UDF and I have a problem, I do not understand how to read the face wall temperature n. Can anyone help me?. The code is almost ready except how to input this temperature. Many thanks in advance.nPS: If i set up temperature at 500 K all calculus are ok, but I would need to read the real one!nn#include udf.hn#define QMAX 407400 /* W/m2 */n#define EEPSILON 0.1n#define TAU 5.67e-8n#define T_AIRE 300n#define H_AIRE 40 /* convective coef.W/m2K */nn/* profile for heat flux*/nDEFINE_PROFILE(heatflux_profile, t, i)nn{n/* variable declaration */nreal centroide[ND_ND]; /* vector position */nreal x;nreal y;nface_t f;ncell_t cell;nreal seno; /* heat distribution */nreal T_p; /* wall temperature */begin_f_loop(f, t)n{nF_CENTROID(centroide,f,t);nx=centroide[0]; /* valor del cntroide en la componente x */ny=centroide[1]; /* valor del cntroide en la componente y */nseno=y/sqrt((x*x)+(y*y));T_p = 500; /* I NEED TO FIND THE FUNCTION IN ORDER TO READ THE WALL TEMPERATURE, DO NOT WHY F_T(f,t) DOES NOT WORK, it should be T_p = F_T(f,t) */nnif (0 < y)n{nF_PROFILE(f,t,i)=(QMAX*seno)-TAU*((T_p*T_p*T_p*T_p )-(EEPSILON*T_AIRE*T_AIRE*T_AIRE*T_AIRE))-H_AIRE*(T_ p-T_AIRE);nn} else {nF_PROFILE(f,t,i)=0;n}n}nend_f_loop(f, t)n}n -
February 1, 2021 at 2:45 pm
Karthik R
AdministratorHello,nLooks like there are a few typos in your UDF syntax such as 'Centroide' Please see some of the UDFs available in this link below. You should be able to use F_T(f,t)nSince you are using an analytical expression, you should also be able to use Fluent expressions here. nThank you.nKarthikn -
February 1, 2021 at 6:09 pm
100041488
SubscriberHi, thanks for the feedback, the problem was the mesh, below is the final UDF (and it works)n#include udf.hn#define QMAX 407400 /* W/m2 */n#define EEPSILON 0.9n#define TAU 5.67e-8n#define T_AIRE 300n#define H_AIRE 40nn/* profile for heat flux*/nDEFINE_PROFILE(receiver, t, i)nn{n /* declaración de variables */nreal centroide[ND_ND]; /* vector de posición */nreal x;nreal y;nface_t f;ncell_t cell;nreal seno; /* para meter la distribucion de calor */nreal T_p; /* temperatura de la pared */begin_f_loop(f, t)n{nF_CENTROID(centroide,f,t);nx=centroide[0]; /* valor del cntroide en la componente x */ny=centroide[1]; /* valor del cntroide en la componente y */nseno=y/sqrt((x*x)+(y*y));T_p=F_T(f,t); if (0 < y)n{ntF_PROFILE(f,t,i)=(QMAX*seno)-TAU*((T_p*T_p*T_p*T_p)-(EEPSILON*T_p*T_p*T_p*T_p))-H_AIRE*(T_p-T_AIRE);ntn} else {ntF_PROFILE(f,t,i)=0;n}n}n -
February 2, 2021 at 1:45 am
Karthik R
AdministratorPerfect !! Good to know!n
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

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
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error: Received signal SIGSEGV
-
5454
-
3419
-
2473
-
1310
-
1022
© 2023 Copyright ANSYS, Inc. All rights reserved.