-
-
March 21, 2022 at 8:19 pm
charlotteroels
SubscriberHi,
I am currently implementing a heat source using the UDF macro DEFINE SOURCE for heating up a simple square surface (2D model). Now, I am facing the problem that my temperature remains constant after the source is turned off. Even with limits under convection conditions the temperature isn't going down, which seems strange.
What could be the reason for this?
I already verified with the UDF macro DEFINE EXECUTE AT END that my heat source is effectively off at the correct timing. Also clearly visible in the internal report (see attachment). Does this have to do with dS[eqn] still running somewhere? Any tips would be most welcome.
In attachment I have made a simplified example to illustrate which coding structure I am using. UDMI(c,t,27) variable you can see as a rate constant. You can assume the heat will reach a peak at 0.5 and go down quickly as soon as 0.8 reaches. Which is not the problem for discussion.
March 22, 2022 at 11:30 amRob
Ansys EmployeePlease repost the images as staff are not permitted to open or download attachments.
March 22, 2022 at 12:19 pmMarch 22, 2022 at 12:43 pmDrAmine
Ansys EmployeeUDM 10 is a "constant" so UDM 5 will be a constant too right? That value returned is equal to UDM 5 which is not changing if set to UDM 10*s_tot.. You see I am starting imaging what might happen because the information you provided is very limited!..
March 22, 2022 at 1:24 pmcharlotteroels
SubscriberFirst of all, thank you for your reply.
Since this is part of a bigger coding (which I cannot share due to embargo on my thesis), I will try to explain the general working principle/idea in general:
PS: I don't have any UDM10 into my code but I suppose you where aiming on UDM27.
The idea is to use the DEFINE SOURCE UDF to regulate the heat coming from a square surface. Since by using DEFINE SOURCE instead of DEFINE PROFILE you can call every cell centroid and store a source in the C_CENTROID variable for each iteration. I prefer this kind of UDF since you can control exactly what energy you put into the cells separately.
The S_tot variable is the total heat input I want to give into my surface. S_tot is indeed a constant. I multiply this with UDM 27, which is related to another DEFINE EXECUTE AT END which uses the time variable CURRENT_TIME and C_T(c,t). So UDM 27 gives you a certain rate (which is time and temperature dependent) and can be seen as a rate that generates a exothermal reaction where the heat goes up and down. So the UDM 27 itself will not be a constant but will be doing a kind of polynomial function. I have linked the UDF into the source term (energy) and adapted to the asked source units [W/m^3].
Since I use the source output as an input for another UDF I store the source output in UDM5 to use it later.
I use the CURRENT_TIME indirectly into the source equation by UDM27, is this correct? So I differentiate on UDM27, which is a 'rate', indirectly linked to temperature and time.. Do you know if the source maybe needs to be directly dS/dt equation? with dt = time related with for example CURRENT_TIME?
In the coding picture I also tried to change the if statement with (source < 10) instead of UDM5. But it also gives the same output.
I hope this gives you enough information to give me some advice. If I find the correct solution, I will post it here.
Thank you
March 22, 2022 at 1:48 pmRob
Ansys EmployeeThe source will be hooked up to a cell zone, so check that. I'd check the S_tot value too, my coding is pretty poor and I'm not sure if C will interpret the "e" as an exponent or natural log function.
March 22, 2022 at 9:33 pmDrAmine
Ansys EmployeeSorry still not clear. If you want to create a rate you should rather divide by time step size. I will do the calculate of rate in a define adjust. You should know that source is what really matters and not the coefficient of linearization so please check the value behind source so UDM 5.
Viewing 6 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-
2656
-
2120
-
1347
-
1118
-
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.
-