How to write a UDF for data sampling and area-weighted averaging it over a particular time interval?
-
-
February 4, 2021 at 7:40 ampc_singhSubscriberFlow Timen Area weighted Avg Temp(K)n 2.4n 299.881237n 2.6n 299.859884n 2.8n 299.848791n 3n 299.842712n 3.2n 299.839355n 3.4n 299.837498n 3.6n 299.836468n 3.8n 299.835896n 4n 299.835577n 4.2n 299.835399nThis is the type of data I am getting during simulation; my work is to do the avg of these data (sum of all temperatures/10) and patch it before the next cycle. nSo, I want to write a UDF which automatically do the average and patch it before the next cycle. Please suggest.n
-
February 4, 2021 at 12:08 pmRobForum ModeratorWhy do you want to average the temperature to then patch it into the model? The data sampling will handle the averaging but not sure about the patch other than to create a UDM or field function of the time averaged temperature. n
-
February 4, 2021 at 1:43 pmpc_singhSubscriberI have to use this average temperature before the next cycle. Please suggest me how to write a UDF for data sampling?n
-
February 4, 2021 at 1:53 pmRobForum ModeratorI don't think you need one, you need a custom field function, and some execute commands to do the patch and reset the field function. Still not sure why you're doing this!n
-
February 4, 2021 at 4:02 pmAmine Ben Hadj AliAnsys EmployeeYou make the average in Excel or any third party program or you report in Fluent the averaged value at the location you want. Or better:try to answer to Rob and explain what you want to do? n
-
February 4, 2021 at 5:40 pmpc_singhSubscriberI am trying to explain the whole process via the diagram shown below:nnOne cycle(4.2 sec) can be described in four steps:nStep 1: Magnetization: results in heating of Regenerators.[0.1 sec]nStep 2: Flowing the water (at ambient temperature) for through these regenerators.  Due to the temperature difference between fluid and regenerators water get heated, and we reject these hot water.[2 sec]nStep 3: Demagnetization: results in cooling of plates.[0.1 sec]nStep 4: Flowing of water (at ambient temperature)  through these cooled regenerators. As now the regenerators are cooled it will pass heat through the water. Due to that, the temperature of the water gets decreases. [2 sec]nIn the next cycle (cycle 2), before the 3rd step, I need to patch area-weighted average temperature. nAfter step 4 again, I have to calculate the next average temperature and patch it before the 3rd step of cycle 3. In this way, I have to run the simulation up to 120-140 cycles.nNote 1: Magnetization and Demagnetization is a physical phenomenon where heating and cooling occurs on the action of passing the magnet through some materials.nNote 2: Yes DrAmine sir, I can make the average in Excel and patch it manually but doing it for 130-140 cycles will be a tough job, that is why I am trying to use a UDF.n
-
February 5, 2021 at 3:59 amYasserSelimaSubscriberUse an expression ... nRegister here and they will send you a link to the video. nhttps://www.ansys.com/resource-library/webinar/ansys-fluent-creating-using-expressionsn
-
February 5, 2021 at 6:09 ampc_singhSubscriberDone@YesserSelima.n
-
February 5, 2021 at 7:17 amakashdattaSubscriberhow to plot time averaged quantities for transient simulation?n
-
February 5, 2021 at 10:54 amRobForum ModeratorReports will produce a plot, you may need to be careful with the definition though as you're overwriting data. n
-
Viewing 9 reply threads
- The topic ‘How to write a UDF for data sampling and area-weighted averaging it over a particular time interval?’ is closed to new replies.
Ansys Innovation Space
Trending discussions
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Fluent fails with Intel MPI protocol on 2 nodes
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script error Code: 800a000d
- Encountering Error in Heterogeneous Surface Reaction
Top Contributors
-
1191
-
513
-
488
-
225
-
209
Top Rated Tags
© 2024 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.