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

UDF to modify the value of a user defined scalar

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 11, 2000, 17:07
Default UDF to modify the value of a user defined scalar
  #1
Raja Banerjee
Guest
 
Posts: n/a
Hi, I have a two-phase flow between two parallel plates. I am using VOF model to simulate the flow. I have introduced a user defined scalar and trying to assign a value to the scalar at the interface. I am finding the interface by determining the cells which have the liquid volume fraction between 0 and 1. I am using DEFINE_ADJUST macro as I want it to be done every iteration. But it is not assigning the scalar value at the interface. I am provding here the code which I have written:

#include "udf.h" #include "sg_mphase.h"

DEFINE_ADJUST(vol_frac_find, domain) {

Thread *t=Lookup_Thread(domain,8);

cell_t c;

begin_c_loop(c,t)

{

if(C_VOF(c,t,1)>0. && C_VOF(c,t,1)<1.)

C_UDSI(c,t,0)=0.0228;

}

end_c_loop(c,t);

}

I would appreciate, if someone can point out my mistake.

The id that I have used in the Lookup_Thread function corresponds to the zone- default-interior in the boundary conditions dialog-box.

Thanks Raja Banerjee

  Reply With Quote

 


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
Change user defined scalar flux function Kaazem_RA Fluent UDF and Scheme Programming 0 February 15, 2019 08:01
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 6 February 18, 2017 05:57
User Defined Scalar Flux SandilyaCFD OpenFOAM Running, Solving & CFD 0 February 15, 2017 15:08
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
User Defined Scalar (UDS) question (units) D FLUENT 0 March 1, 2006 20:04


All times are GMT -4. The time now is 00:29.