CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

udf for coupling outlet to inlet

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 19, 2013, 05:53
Default udf for coupling outlet to inlet
  #1
New Member
 
Claudia Hintringer
Join Date: May 2010
Posts: 10
Rep Power: 6
claudia.h is on a distinguished road
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!
claudia.h is offline   Reply With Quote

Old   July 19, 2013, 08:44
Default
  #2
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Laval University, Canada
Posts: 361
Rep Power: 8
macfly is on a distinguished road
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?
macfly is offline   Reply With Quote

Old   July 19, 2013, 08:59
Default
  #3
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,072
Rep Power: 18
flotus1 will become famous soon enoughflotus1 will become famous soon enough
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.
flotus1 is offline   Reply With Quote

Old   July 19, 2013, 09:02
Default
  #4
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Laval University, Canada
Posts: 361
Rep Power: 8
macfly is on a distinguished road
Quote:
Originally Posted by flotus1 View Post
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...
macfly is offline   Reply With Quote

Old   July 22, 2013, 03:49
Default
  #5
New Member
 
Claudia Hintringer
Join Date: May 2010
Posts: 10
Rep Power: 6
claudia.h is on a distinguished road
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.
claudia.h is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Results at Tank Outlet with InterFoam mgdenno OpenFOAM 17 August 18, 2013 21:18
Inlet and Outlet b.c. based on mass flux Hale OpenFOAM Pre-Processing 2 August 9, 2013 02:26
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44


All times are GMT -4. The time now is 03:40.