Ansys Learning Forum Forums Discuss Simulation Fluids How to write a UDF for data sampling and area-weighted averaging it over a particular time interval? Reply To: How to write a UDF for data sampling and area-weighted averaging it over a particular time interval?

pc_singh
Subscriber
I 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