-
-
July 26, 2021 at 2:18 pm
eric1234598765
SubscriberHi,
I have 2 zones in the same position which contains solid type and fluid type zone simultaneously by using TUI command:
mesh/modify-zones/copy-move-cell-zone
Assuming the boundary condition is set well, I'm trying using UDF to access solid zone temperature data mentioned through C_T(c,t) macro. However, I found that I get fluid temperature data while debugging.
According to UDF MANUAL, UDF can access "Flow variable" by using C_T ,C_R, etc . Therefore , I'm wondering if there's any way to access solid temperature data of each cell?
Thanks,
Here's simply UDF code:
DEFINE_SOURCE (Porous_solid_energy, c, t, dS, eqn)
{
  real source; // Heat flux between Porous solid and Porous fluid source term
    real TS =C_T(c,t)  ; //Solid temperature
    real TF = 100 ; //Fluid temperature
    source  =  0.0; // Ignore
    dS[eqn] = 0.0; // Ignore
    Message("TS = %g ",C_T(c,t));Â
    return source;
}
July 27, 2021 at 5:13 americ1234598765
SubscriberHi, again
I found that I hooked the UDF at wrong zone by using THREAD_ID to check the zone ID
The conclusion is that Ansys Fluent can access solid variables as well as fluid by using macro mentioned in UDF manual.
Best.
July 27, 2021 at 7:44 amAmine Ben Hadj Ali
Ansys EmployeeSure. Thanks!
Viewing 2 reply threads- The topic ‘UDF about accessing Solid temperature data’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
3266
-
1031
-
1004
-
859
-
798
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-

Ansys Assistant

Welcome to Ansys Assistant!
An AI-based virtual assistant for active Ansys Academic Customers. Please login using your university issued email address.

Hey there, you are quite inquisitive! You have hit your hourly question limit. Please retry after '10' minutes. For questions, please reach out to ansyslearn@ansys.com.
RETRY