|
[Sponsors] |
July 19, 2013, 06:53 |
udf for coupling outlet to inlet
|
#1 |
New Member
Claudia Hintringer
Join Date: May 2010
Posts: 10
Rep Power: 16 |
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. 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! |
|
July 19, 2013, 09:44 |
|
#2 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
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? |
|
July 19, 2013, 09:59 |
|
#3 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
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. |
|
July 19, 2013, 10:02 |
|
#4 | |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
Quote:
Sorry I'm not familiar with interfaces... |
||
July 22, 2013, 04:49 |
|
#5 |
New Member
Claudia Hintringer
Join Date: May 2010
Posts: 10
Rep Power: 16 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange Results at Tank Outlet with InterFoam | mgdenno | OpenFOAM | 18 | November 29, 2019 00:05 |
Inlet and Outlet b.c. based on mass flux | Hale | OpenFOAM Pre-Processing | 2 | August 9, 2013 03:26 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |
UDF in Fluent to Match Mass Flow at Pressure Outlet | Jonas Larsson | Main CFD Forum | 1 | April 29, 1999 11:44 |