-
-
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 amDrAmine
Ansys EmployeeSure. Thanks!
Viewing 2 reply threads- The topic ‘UDF about accessing Solid temperature data’ is closed to new replies.
Innovation SpaceTrending discussionsTop Contributors-
5639
-
1885
-
1403
-
1303
-
1021
Top Rated Tags© 2026 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 will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.