[ANSYS, Inc. Logo] return to home search
next up previous contents index

2.3.4 DEFINE_DOM_DIFFUSE_REFLECTIVITY



Description


You can use DEFINE_DOM_DIFFUSE_REFLECTIVITY to modify the inter-facial reflectivity computed by ANSYS FLUENT at diffusely reflecting semi-transparent walls, based on the refractive index values. During execution, a DEFINE_DOM_DIFFUSE_REFLECTIVITY function is called by ANSYS FLUENT for each semi-transparent wall and also for each band (in the case of a non-gray discrete ordinates (DO) model). Therefore the function can be used to modify diffuse reflectivity and diffuse transmissivity values at the interface.



Usage



DEFINE_DOM_DIFFUSE_REFLECTIVITY( name, t, nb, n_a, n_b, diff_ref_a, diff_tran_a,
diff_ref_b, diff_tran_b)

figure   

Note that all of the arguments to a DEFINE macro need to be placed on the same line in your source code. Splitting the DEFINE statement onto several lines will result in a compilation error.


Argument Type Description
symbol name UDF name.
Thread *t Pointer to the thread on which the discrete ordinate
  diffusivity function is to be applied.
int nb Band number (needed for the non-gray discrete
  ordinates (DO) model).
real n_a Refractive index of medium a.
real n_b Refractive index of medium b.
real *diff_ref_a Diffuse reflectivity at the interface facing medium a.
real *diff_tran_a Diffuse transmissivity at the interface facing medium a.
real *diff_ref_b Diffuse reflectivity at the interface facing medium b.
real *diff_tran_b Diffuse transmissivity at the interface facing medium b.
   
   
Function returns  
void  
   

There are nine arguments to DEFINE_DOM_DIFFUSE_REFLECTIVITY: name, t, nb, n_a, n_b, diff_ref_a, diff_tran_a, diff_ref_b, and diff_tran_b. You supply name, the name of the UDF. t, nb, n_a, n_b, diff_ref_a, diff_tran_a, diff_ref_b, and diff_tran_b are variables that are passed by the ANSYS FLUENT solver to your UDF.



Example


The following UDF, named user_dom_diff_refl, modifies diffuse reflectivity and transmissivity values on both the sides of the interface separating medium a and b. The UDF is called for all the semi-transparent walls and prints the value of the diffuse reflectivity and transmissivity values for side a and b.

figure   

Note that in the example that follows, the DEFINE_DOM_DIFFUSE_REFLECTIVITY statement is broken up into two lines for the sake of readability. In your source file, you must make sure that the DEFINE statement is on one line only.

/* UDF to print the diffuse reflectivity and transmissivity
at semi-transparent walls*/ 

#include "udf.h"

DEFINE_DOM_DIFFUSE_REFLECTIVITY(user_dom_diff_refl,t,nband,n_a,n_b, 
diff_ref_a,diff_tran_a,diff_ref_b,diff_tran_b)
{
printf("diff_ref_a=%f  diff_tran_a=%f \n", *diff_ref_a, *diff_tran_a);
printf("diff_ref_b=%f  diff_tran_b=%f \n", *diff_ref_b, *diff_tran_b);
}



Hooking a Discrete Ordinates Model (DOM) Diffuse Reflectivity UDF to ANSYS FLUENT


After the UDF that you have defined using DEFINE_DOM_DIFFUSE_REFLECTIVITY is interpreted (Chapter  4) or compiled (Chapter  5), the name of the argument that you supplied as the first DEFINE macro argument (e.g., user_dom_diff_refl) will become visible and selectable in the User-Defined Function Hooks dialog box in ANSYS FLUENT.

See Section  6.2.4 for details.


next up previous contents index Previous: 2.3.3 DEFINE_DIFFUSIVITY
Up: 2.3 Model-Specific DEFINE Macros
Next: 2.3.5 DEFINE_DOM_SOURCE
Release 12.0 © ANSYS, Inc. 2009-01-14