CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Residence time in VoF-model (https://www.cfd-online.com/Forums/fluent/47264-residence-time-vof-model.html)

Andreas February 7, 2008 09:32

Residence time in VoF-model
 
Hello everybody,

I've got a vof-model of a zylinder filled with water and air. There is a velocity inlet at the bottom (water), a pressure inlet at the top(air) and a pressure outlet.

I want to study the displacement of "old" water by "new" water.

Species dosen't work with VoF and defining two water-phases (old and new) is no option as well, because VoF-phases may not be interpenetrating.

One workaround I thought of, was to create a new one-phase model with the previously optained water-air-interface-contour as a frictionless wall.

If anybody has some solution to my problem or could advice some link/literature/...

Thanks, Andreas


KW February 8, 2008 16:46

Re: Residence time in VoF-model
 
You can use a user-defined scalar as described below. From Fluent tech support, also in Fluent UDF archive on User Service Center.

==================== Solution 619 Fluid residence time

Problem: Compute fluid residence time.

Problem solved via UDF using user-defined scalars. Source code for UDF is below.

1. Compile udf 2. Read case.... set # UDS > 0 3. At inlet, set UDS (value) = 0 4. Set diffusivity of UDS to a small value 5. Set source term of UDS to "rt_source" in the appropriat fluid zones 6. Iterate.

Values of UDS represent the length of time fluid has been in the domain since it entered the inlet (in seconds).

Resolution: ------------- #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; }


Andreas February 15, 2008 06:47

Re: Residence time in VoF-model
 
Thank you very much!

Andreas


All times are GMT -4. The time now is 23:52.