# Impulse input -Residence time distribution

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

 February 25, 2011, 10:20 Impulse input -Residence time distribution #1 New Member   abhik banerjee Join Date: Jul 2010 Location: Roorkee Posts: 9 Rep Power: 6 I would like to obtain the residence time distribution in the glass tank of a float glass furnace.I have already solved the steady state problem involving flow and energy equations.I am now carrying out a unsteady state analysis using a UDS equation which includes only the transient and convective term.I am going to track the weighted average of the uds variable at the otlet .However i am not able to give the impulse input necessary as an input boundary condition. How can a give the impulse input ...please help?

 February 25, 2011, 10:30 #2 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 13 Hi, you can do that with a simple UDF by DEFINE_PROFILE macro.

 February 25, 2011, 10:33 #3 New Member   abhik banerjee Join Date: Jul 2010 Location: Roorkee Posts: 9 Rep Power: 6 @amir ...well i can use a define profile macro to define the input but how do i account for the time..i have to give the input for a short time duration

 February 25, 2011, 12:43 #4 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 13 your case is unsteady and DEFINE_PROFILE macro is evaluated at every time step. you can retrieve the time by CURRENT_TIME command so you can implement such algorithm: if (CURRENT_TIME<...) F_PROFILE(...)=...; else F_PPROFILE(...)=0.0;

 April 1, 2011, 07:11 #5 New Member   abhik banerjee Join Date: Jul 2010 Location: Roorkee Posts: 9 Rep Power: 6 @Amir I tried to use an impulse input ..The code worked ok,but the value of the uds scalar variable (area weighted average value) which I am tracking at the outlet did not decrease even after a very long time as should happen in case of an impulse input . So I am using a step input instead and the code is as below... DEFINE_PROFILE(boundary_profile,t,i) { real x[ND_ND]; real y; face_t f; real current_time; current_time = RP_Get_Real("flow-time"); begin_f_loop(f,t) { F_CENTROID(x,f,t); y=x[0]; if(current_time>=0) { F_PROFILE(f,t,i) = 1.0; } else { F_PROFILE(f,t,i) = 0.0; } } end_f_loop(f,t) } The code worked ok...I am using the ratio of the area weighted average value of the uds scalar variable at the outlet to inlet to get the F curve.. The shape is ok....but the problem is that when I calculate the mean residence time using the above data the value comes more than the volumetric residence time(Volume of tank/volumetric flow rate)...which I think is not correct... I think I am making some mistake soemwhere in UDS application... Should the UDS equation have any source term..or is my method of using the area weighted average value faulty...

 April 1, 2011, 08:51 #6 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 13 I proposed you to make some changes in UDF for impulse input as follow: Code: ```#include "udf.h" DEFINE_PROFILE(boundary_profile,t,i) { real x[ND_ND]; real y; face_t f; real time=CURRENT_TIME; begin_f_loop(f,t) { F_CENTROID(x,f,t); y=x[1]; if(time<=CURRENT_TIMESTEP) { F_PROFILE(f,t,i) = 1.0; } else { F_PROFILE(f,t,i) = 0.0; } } end_f_loop(f,t) }```

 April 1, 2011, 09:17 #7 New Member   abhik banerjee Join Date: Jul 2010 Location: Roorkee Posts: 9 Rep Power: 6 @ Amir Thank u very much...I willl try the code and let u know the results....One more thing ..I am tracking the area weighted average value of the UDS scalar variable at the outlet surface with time ...is this approach right....

 April 1, 2011, 11:59 #8 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 13 first of all in this approach, you have to disable inlet diffusion in setting UDSs. for evaluating residence time, I have another suggestion: in transient flow iteration, you can monitor (and/or write) volume average of UDS in whole domain and check when it drops lower than the criteria.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Eric1 FLUENT 0 May 2, 2010 22:13 zhajingjing OpenFOAM 0 April 28, 2010 04:35 carsten OpenFOAM Bugs 11 September 12, 2008 11:16 Carlos FLUENT 0 February 8, 2008 18:42 msrinath80 OpenFOAM Running, Solving & CFD 2 November 7, 2006 16:15

All times are GMT -4. The time now is 21:28.