-
-
October 8, 2023 at 2:51 am
joce0001
SubscriberI have a fluid whose temperature varies depending on the height, I have made the UDF, I have compiled, but I do not know how to enter this UDF as an initial condition, because in the Solution Initialization section there is no way to select UDF.
The UDF programming is as follows
#include "udf.h"
DEFINE_INIT(temperatura_profundidad, domain)
{
cell_t cell;
Thread *thread;
real x[ND_ND]; /* Vector de posición */
real profundidad;
real temperatura;/* Loop sobre todas las celdas en el dominio */
thread_loop_c(thread, domain)
{
begin_c_loop(cell, thread)
{
C_CENTROID(x, cell, thread); /* Obtener las coordenadas del centroide de la celda */
profundidad = x[1]; /* Asumiendo que la coordenada y representa la profundidad */
temperatura = -7.1 * profundidad + 298; /* Aplicar la fórmula de temperatura en función de la profundidad */
C_T(cell, thread) = temperatura; /* Definir la temperatura de la celda */
}
end_c_loop(cell, thread)
}
} -
October 9, 2023 at 9:05 am
Rob
Forum Moderatorhttps://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v232/en/flu_udf/flu_udf_ActivatingGeneralSolverUDFs.html%23flu_udf_sec_use_init
-
- 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.
- legend min and max
- Ensight hot iron palette from an image
- Streamlines in EnSight using MRI data
- Import MRI data into Ensight
- FLUENT APPLICATIION ERROR
- Total Surface Heat Flux Calculation in Fluent
- Drop Test of a Water-Filled Tube
- Difference between “total pressure” and “absolute pressure”?
- Minimum Orthogonal Quality Less than 0.01 For Transonic Airfoil Flow Analysis
- obtaining pressure distribution by making points in ansys
-
8808
-
4658
-
3153
-
1688
-
1478
© 2023 Copyright ANSYS, Inc. All rights reserved.