CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

User defined scalars!!

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

LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2008, 22:42
Default User defined scalars!!
Posts: n/a
Hi all,

If some one has worked on user defined scalars can you please share me your experience on that please.

I need to find out the age of air. how long it takes to reach the outlet.

If there is another way around please let me know.

Thanks Kind regards Mischelle
  Reply With Quote

Old   June 12, 2008, 17:31
Default Re: User defined scalars!!
red lemon
Posts: n/a
hi yes you can use a UDS for mean age of air which seeds the domain with time and needs a few more iterations to solve only. It is implemented the same in Airpak that uses Fluent but in a more automatic fashion. I can provide this but need time to gather info.
  Reply With Quote

Old   June 17, 2008, 18:27
Default Re: User defined scalars!!
red lemon
Posts: n/a
Instructions for mean age of air UDS:

Convert this text to a *.c file then compile as usual and follow notes to hook in. Then solve for scalar only and post process UDS displayed as mean age in seconds.

/* Diffusivity for mean age of air

is solved using a user-defined scalar. This

calculation can be performed after the normal

problem has already been solved ... just turn off

all of the previous equations being solved for

and activate solution of the user-defined scalar-0

equation. Make sure to select

- mean_age_diff as the uds diffusivity in the materials panel

- mass flow rate as the uds flux function

- mean_age_source as the uds volumetric source term in

all fluid regions

Use a journal like this to do that in F63 :

def bc fluid fluid-1 n y 0 0 0 0 0 0 0 1 n y "mean_age_source" n y 0 0 0 0 0 0 n n n

def bc fluid fluid-2 n y 0 0 0 0 0 0 0 1 n y "mean_age_source" n y 0 0 0 0 0 0 n n n

def bc fluid fluid-3 n y 0 0 0 0 0 0 0 1 n y "mean_age_source" n y 0 0 0 0 0 0 n n n


- set uds-0 scalar values = 0.0 at all inlets and outlets

mean age of air calculations do not require

any energy, radiation, or species transport

calculations to have been performed


/************************************************** *****/

#include "udf.h"

#include "prop.h"

DEFINE_DIFFUSIVITY(mean_age_diff, c, t, i)


return C_R(c,t)*2.88e-05+C_MU_EFF(c,t)/0.7;


DEFINE_SOURCE(mean_age_source, c, t, dS, eqn)



return C_R(c,t);

  Reply With Quote

Old   July 4, 2013, 10:04
New Member
Join Date: Apr 2013
Posts: 2
Rep Power: 0
mradili is on a distinguished road
Hi red lemon,

thanks for the post. I just did not get the part regarding the "mean_age_source" and the journal. whats the function of the mean_age_source in conjunction with the mean_age_diff and what is the meaning and application of the journal text you mentioned?

mradili is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
USER DEFINED SCALARS yann Phoenics 6 November 14, 2013 08:46
user defined scalars shankar FLUENT 0 May 7, 2005 06:55
user defined scalars ramesh FLUENT 1 June 11, 2004 17:25
USER-DEFINED ARRAYS-SCALARS STK Phoenics 0 February 7, 2004 08:56
Multiple user defined scalars Hassid Samuel FLUENT 3 March 27, 2001 03:12

All times are GMT -4. The time now is 01:35.