CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Setting fixed values with UDS (http://www.cfd-online.com/Forums/fluent/32868-setting-fixed-values-uds.html)

Andrew Garrard January 17, 2004 11:00

Setting fixed values with UDS
 
I am running 6.1.22. In the define - Boundary conditions - Fluid box you have the option for setting fixed values. Has anyone got any idea what DEFINE MACRO should be used for this. I am guessing define source or profile. Any help?

thomas January 17, 2004 16:50

Re: Setting fixed values with UDS
 
Hi, A define_source will only help you to add a source term in the continuity, momemtum or energy equation ... A define_profile will help you to fix a value at a boundary face or directly in cells of a domain. Herer the line which are gonna help ya to fix a value in the cells of a domain.

#include "udf.h" DEFINE_PROFILE(fix_value, thread,position) { cell_t cell; begin_c_loop(c,thread) {

F_PROFILE(cell,thread,position)=/*the value you want in the cells*/; } end_c_loop(cell,thread) }

Then hook up in the adequat box. Hope this help. thomas

Andrew Garrard February 2, 2004 06:46

Re: Setting fixed values with UDS
 
I have been experimenting with this, however, I don't think taht you can use a cell as the first argument to F_PROFILE.

thomas February 2, 2004 11:00

Re: Setting fixed values with UDS
 
Hello, I do confirm you can use a cell as the first argument in a F_PORFILE macro. This allows you to fix a value in a domain. (See the UDF documentation of the macro - DEFINE_PROFILE). However if you wish tofix a value at a Boundary condition, it is of course a face argument yur gonna have to use.
:) thomas


All times are GMT -4. The time now is 06:16.