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/)
-   -   udf for coupling outlet to inlet (https://www.cfd-online.com/Forums/fluent-udf/121014-udf-coupling-outlet-inlet.html)

claudia.h July 19, 2013 05:53

udf for coupling outlet to inlet
 
hello,

in order to reduce the compuational domain first i am trying to simulate a short section of a solar collector. For a better understanding i insert a picture.

https://lh3.googleusercontent.com/-9...emstellung.JPG
The 3D calculation domain consists of glas, air, absorber, insulation, air and a cooler. In reality there is a connection between outlet1 and intlet2 as well as between outlet2 and inlet1 trough two additional pipes.

In order to simulate the loop between absorber and cooler i am looking for a way to couple outlet1 to inlet2 and outlet2 to inlet1. My idee was to commit the velocity and temperature profile from outlet1 to Inlet2 with UDFīs but i donīt know if this is possible. Maybe a combination of DEFINE_ADJUST and DEFINE_PROFILE could be approach but i donīt know if it is possible to get the velocity profile via UDF.

It would be a great help for me, if anyone has experience with such a problem and could give me an advice.

Thanks in advance!

macfly July 19, 2013 08:44

Hi,

I'm not sure to understand how the collector works. You say you want to impose velocity/temperature at outlet 1, then just impose the same conditions at inlet 2, no udf needed so far. Outlet 2 should be set as a pressure outlet, still no udf needed so far. But you need a udf to transfer outlet 2 velocity/temperature to inlet 1. Is it right?

There is no natural convection in the collector, the fluid is pumped?

flotus1 July 19, 2013 08:59

I dont think that UDFs are required in this case.
Interfaces should do the trick. One between outlet2 and inlet1 and the other one between outlet2 and inlet1.

If the fluid is pumped through the collector, you can for example specify the mass flow rate at one of the interfaces.

macfly July 19, 2013 09:02

Quote:

Originally Posted by flotus1 (Post 440822)
I dont think that UDFs are required in this case.
Interfaces should do the trick. One between outlet2 and inlet1 and the other one between outlet2 and inlet1.

If the fluid is pumped through the collector, you can for example specify the mass flow rate at one of the interfaces.

Ah! There you go Claudia.

Sorry I'm not familiar with interfaces...:rolleyes:

claudia.h July 22, 2013 03:49

Hello mcfly,

thanks for your reply. In reality there is a natural convection between absorber and cooler. Until now I have simulated this natural convection only with the fluid volume and boundaries from standard collector types (e.g heat flux). In order to get better boundary conditions for this simulation, i want to simulate the effect of the irradiation on the surface of the fluid. Therefore I want to consider the effects of the used materials (glas, air, insulation,..). To simulate the whole collector needs to much calculating capacity so i want to simplify the calculation domain.

You are right, in this simulation i supposed as a pumped system with velocity values i got from the "natural convection simulation". So I also realized that the velocity isnīt the problem.

But however I need the temperature profile from outlet1 as temperature for inlet2. Actually I tried to solve this in this way:


#include "udf.h"

/*Zone ID for outlet_abs to get Max Temp */
#define get_temp_zone_ID 8

real max_temperature_outletAbs = 340.;

DEFINE_ADJUST(find_max_temp_outletAbs,domain)
{
#if !RP_HOST
Thread *ft,*ct;
face_t f;
cell_t c;

ft = Lookup_Thread(domain,get_temp_zone_ID);
ct = THREAD_T0(ft);

max_temperature_outletAbs = 340.;

begin_f_loop(f,ft)
{
c = F_C0(f,ft);
if (max_temperature_outletAbs < C_T(c,ct))
max_temperature_outletAbs = C_T(c,ct);

}
end_f_loop(f,ft)
#endif

}

DEFINE_PROFILE(out_temp_outletAbs,t,eqn)
{
face_t f;

begin_f_loop(f,t)
{
F_PROFILE(f,t,eqn) = max_temperature_outletAbs;
}
end_f_loop(f,t)

}


With this UDF i got the maximum temperature from outlet1 which is used as temperature for inlet2, but until now I have no idea how to get the temperature profile from outlet as input for the inlet2. And at outlet2 i look for the minimum temperature and use this temperature for the inlet1.


Maybe one could do this with interfaces but I am also not familiar with this.


All times are GMT -4. The time now is 10:41.