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

Values in UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2013, 05:30
Smile Values in UDF
  #1
New Member
 
Jovana Milenkovic
Join Date: May 2011
Posts: 10
Rep Power: 15
Jovana is on a distinguished road
Hey guys!

At the DEFINE DPM OUTPUT macro I notice that the passed variable header is an integer that is equal to 1 at the first call of the function before particles are tracked and set to 0 for subsequent calls.

Now, I would like to use PATH_ACTIVE and PATH_ABORT in my UDF DEFINE DPM BC.
How ever I am not sure I understand what are the values for this commands? 0, 1,...

Depending form this values I would know how to call if (PATH_ABORT) for example...

Thanks and regards!
Jovana is offline   Reply With Quote

Old   May 29, 2013, 10:10
Default
  #2
Member
 
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 16
JimKnopf is on a distinguished road
Hi Jovana,

not sure which programm are you talking about, Fluent?

But in Fluent, the DEFINE_DPM_OUTPUT Macro should be use to do some output to the hard drive. So you can use the 1 to call some code to write a file header via a if statement like:
Code:
if(header)
{
 fprintf(fid,"This is a file Header");
}
In general in C a 0 is equal to boolean false and a 1 is equal to a boolean true.

Anyways, if the macro PATH_ACTIVE is a interger you can just call
Code:
if(PATH_ACTIVE)
{
 do_some_thing();
}
HTH, else please specify the problem.

Greetz
Jim
JimKnopf is offline   Reply With Quote

Old   June 19, 2013, 08:05
Smile
  #3
New Member
 
Jovana Milenkovic
Join Date: May 2011
Posts: 10
Rep Power: 15
Jovana is on a distinguished road
Thanks for reply Jim, but what I meant, and sorry for misleading was...

The part of my code in DEFINE_BC is:

if (a>b)
{
return PATH_ACTIVE;
}
else
{
return PATH_ABORT;
}

What from this two (PATH_ACTIVE/PATH_ABORT) is TRUE and what is FALSE?What are their values?How Fluent see this?

Thanks!
Jovana is offline   Reply With Quote

Reply


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
Availability of previous time level values in UDF ranga sudarsan FLUENT 0 September 1, 2008 10:17
Tablular values as input to UDF BS FLUENT 0 March 30, 2008 19:59
Accessing node values using a UDF Nico FLUENT 2 December 20, 2007 03:50
DEFINE_DPM_OUTPUT macro UDF HELP Puneet FLUENT 3 November 28, 2003 11:55
DEFINE_GEOM UDF Problems Pat FLUENT 0 August 14, 2003 14:16


All times are GMT -4. The time now is 20:32.