Impulse input -Residence time distribution
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? |
Hi,
you can do that with a simple UDF by DEFINE_PROFILE macro. |
@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
|
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; |
@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... |
I proposed you to make some changes in UDF for impulse input as follow:
Code:
#include "udf.h" |
@ 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.... |
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. |
All times are GMT -4. The time now is 15:25. |