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
Ansys EmployeeWhat 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
Ansys EmployeeCan 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- You must be logged in to reply to this topic.
Ansys Innovation SpaceEarth 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.
Trending discussions- 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
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
Top Contributors-
2666
-
2120
-
1349
-
1132
-
461
Top Rated Tags© 2023 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.
-