CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Apply Energy from APDL (W/m^3) into Fluent Model (https://www.cfd-online.com/Forums/fluent-udf/181759-apply-energy-apdl-w-m-3-into-fluent-model.html)

h0rst December 20, 2016 12:39

Apply Energy from APDL (W/m^3) into Fluent Model
 
Hello everybody,

I programmed a 3D modell in Ansys APDL where a current flows through a copper tube. There is water going through the tube for cooling.
Now, I simulated the energy (W/m³) in the tube generated by the current.

So, I would like to couple the results with fluent, so I exported the geometry into fluent.

To get to know UDF better, I wrote a simple (but working UDF) which gives a constant W/m^3:

#include "udf.h"

DEFINE_SOURCE(energy_source,cell,thread,dS,eqn)
{
real source;

source = dS[eqn] = 10000000;

return source;
}


I imported this file in Fluent by adding sources and chosing the c.file.
So right now, the copper tube in fluent is provided with a constant energy of 10e7 W/m^3.
But as I said, I would like to adapt the W/m^3 results I had from Ansys APDL into Fluent (each element shall have the W/m^3 that is created by APDL).
I don't really know how to do this since I have just a bit experience with UDF. I have looked through the manual but I could not receive the necessary information input to solve this issue.

Can somebody explain me how to realize that?



Best regards

h0rst

h0rst December 24, 2016 03:49

Does nobody have an idea?

I wrote the APDL results into an array and text file gives me in the

1 column: jouleheat
2 column: cent x coordinates
3 column: cent y coordinates
4 column: cent z coordinates

But how can I read this array into my fluent udf?


h0rst


All times are GMT -4. The time now is 19:22.