UDF for pressure outlet backflow total temperature
Hi all,
I am trying to solve a solidification and melting problem using Ansys Fluent 13. My problem is: I have a mass of PCM (Phase Change Material) which is warmed up by a flux of oil in a heat pipe. When melting occurs, I set the density of the PCM to reduce, so I need an outlet in the volume occupied by PCM to make mass flow out of domain. Obviously convective movements are important in my simulation, so I need to know if there is a way to set the backflow temperature equal to the temperature in the cell near the pressure outlet, maybe using a UDF. Can anyone help me? I hope I've been clear. Regards |
Hi guy,
I think, it's possible. First, try to get the temperature in cells near the pressure outlet using a DEFINE_ADJUST general purpose macro. Then store it in a C_UDMI and recall it by a DEFINE_PROFILE macro for the face thread. |
Thanks
Thanks man! Unfortunately I'm not so good using that kind of macro... Can you tell me more about it? How would you write it?
|
I got exactly what you want, did that in the past :)
Did you look on the udf forum? Code:
#include "udf.h" - If I remember well, I think you have to interprete the udf before each simulation to reset the variables - It does an arithmetic mean of the outgoing fluid temperature, not accurate if your mesh is not uniform at the outlet and temperature varies a lot - If I were you, I'd modify the code for an area-weighted average of T of the outgoing fluid at the boundary |
Thank you soooo much! ;)
|
ANSYS Fluent
Dear friends, I have question in fluent please.
I used ICEM for simulate heat transfer in kiln, then export to fluent, actually in this time i run my program without combustion. can get converge at residual e-2 but with not good report about mass net, as same time reasonable result. so take more for residual until e-4 , also get converge but not reasonable result and in this case report mass excepted? any suggest, thanks in advance adnan |
Quote:
|
Quote:
Did you have the pressure outlet on the right side of domain? I have it on the left, so maybe I should consider the velocity in the opposite direction... Am I right? :) |
yes that's it, plot the velocity you'll see what's negative or not
|
Quote:
Man, I'm sorry but it doesn't seem to work :( I used the ID of my outlet, change the velocity direction but it doesn't work... It sets the backflow total temperature to 0, even if I initialize my case with 423.15 K (which is my initial condition). My geometry is planar (2D), not solid, but I am using an assialsimmetry condition... does it affect the UDF? Was your UDF written for a 3D geometry? |
- I assume you interpreted the udf and set the backflow T at the outlet.
- But did you hook the DEFINE_ADJUST? (Define\User-Defined\Function Hooks...\edit Adjust and select 'adjust' The udf works in 2D or 3D. I don't think that the axial symmetry boundary affects the udf. |
I didn't know how to use the "adjust", I'm sorry :) I never used this kind of UDF before, so thank you so much! I'm now tryin to do what you told me.
Anyway, does this UDF work in steady and transition conditions too? |
hooking is like telling Fluent to use the udf it interpreted (or compiled), see the Ansys Fluent UDF Manual
yes it will work for steady or transient cases |
Hello,
I'm trying with this UDF but it stops when reaching about the 30 iteration (Diverges), and I'm still not sure why, can some help me, what do I need to check for that to work well? I have to tell, this only happens when I use the Coupled Pseudotransient Method, the thing is, I do need to use this solution method. Hope you can help me. Regards. |
All times are GMT -4. The time now is 11:55. |