TAGGED: initialization, udf-fluent
-
-
February 28, 2022 at 5:46 am
Dilini
SubscriberHello,
I've got a simple UDF that contains the initial temperature values in my domain changing with depth. I have used a scalar and assigned the temperature values in it. Below is a part of my code.
DEFINE_INIT(temp_profile1, domain)
{
cell_t c;
Thread* t;
cell_t c0;
Thread* t0;
real xc[ND_ND];
real z;
thread_loop_c(t, domain)
{
begin_c_loop_all(c, t)
{
C_CENTROID(xc, c, t);
z = xc[2];
if (0 <= z && z <= 7.5)
C_UDSI(c, t, 3) = 295.00;
else if (7.5 < z && z <= 12)
C_UDSI(c, t, 3) = 295.00 - 0.05 * (z - 7.5);
else
C_UDSI(c, t, 3) = 294.775;
}
end_c_loop_all(c, t)
}
}
After I initialize, I expect a temperature value of 295 at top, and a change in the region 7.5-12 m, and a constant 294.775 after that, However, when I view it I get the following.
February 28, 2022 at 4:44 pmRob
Forum ModeratorWhat size is the model? UDFs use SI so z is in metres.
February 28, 2022 at 5:44 pmDilini
Subscriberz is going from 0 to 55 meters. x is going from 0 to 150,000 m. In the contour plot I have used a scaling factor of 0.001 for x.
March 1, 2022 at 1:15 pmRob
Forum ModeratorCan you change the scale and plot with node values off? Just realised that 294.775 rounds to 2.95e2 ie the plot is correct but you've not got sufficient digits on the plot to show it.
Viewing 3 reply threads- The topic ‘Temperature initialization issue’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- 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
Top Contributors-
3892
-
1414
-
1241
-
1118
-
1015
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.
-