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

UDF compute residence time session Id 619

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2009, 10:13
Default UDF compute residence time session Id 619
  #1
New Member
 
lisa
Join Date: Apr 2009
Posts: 17
Rep Power: 17
lisa is on a distinguished road
Hi..

I am looking for UDF to compute residence time with the session ID 619. Can anyone post the code when u have.

Thanks in advance
Sesan.
lisa is offline   Reply With Quote

Old   April 6, 2009, 05:31
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
coglione is on a distinguished road
Here it is:

#include "udf.h"

/*
* UDF to compute fluid residence time
*
* by William Wangard, Ph.D.
* Fluent, Inc.
*
*/

/*
* This UDF requires at least 1 UDS to be defined
* At inlet, define UDS (value) = 0
* UDS will have units of time and represent approximate residence time
* of fluid in domain
*
* Diffusivity of scalar should be small to reduce diffusion i.e. 1E-5
*
*/


DEFINE_SOURCE(rt_source,c,t,dS,eqn)
{
real source = C_R(c,t);
dS[eqn] = 0.0;
return source;
}

cheers
coglione is offline   Reply With Quote

Old   January 21, 2016, 07:25
Default
  #3
Member
 
Liam
Join Date: Aug 2013
Posts: 40
Rep Power: 12
Many is on a distinguished road
Hi CFD friends!

I am trying to compute residence time contours using this kind of UDF.

My questions are the following:

1. Changing the mesh, then the residence time contours change (at least the maximum of residence time). I guess this is not desirable. Anybody has an idea about why this is happening? I realized that mesh cells appear in the function...

I am wondering if achieving mesh independent results will fix this, it's to said, max_residence_time tends to real_max_residence_time as cell_size tends to zero

If not, I am not understanding the value of this UDF as residence time will be mesh-dependent...

2. Which values should I use for Schmidt number and mass diffusivity for water?

3. When I got convergent results, I just solve for the defined scalar in steady state. Is unsteady solution needed? In other words, have I switch to unsteady model just for solving the scalar transport?

Thanks in advance for all your answers. I am a beginner in UDF...

Regards,

Many
Many is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 06:55
Availability of previous time level values in UDF ranga sudarsan FLUENT 0 September 1, 2008 09:17
Residence time in VoF-model Andreas FLUENT 2 February 15, 2008 06:47
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09
residence time Sugen Chetty Main CFD Forum 0 January 28, 2002 09:50


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