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 calculate average temperature outlet?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2017, 03:33
Default UDF to calculate average temperature outlet?
  #1
Member
 
Join Date: Nov 2016
Posts: 73
Rep Power: 10
h0rst is on a distinguished road
Hello everybody,

I am simulating a heated pipe flowed through by water and I would like to know the temperature at the outlet. In the program, I can do that by Reports/Surface Integrals/area weighted average/outlet.

Now, I want to write an UDF to calculate this value because I need to work with this parameter in the simulation.


My idea was to use an if-function that asks for the location of the outlet surface cells. The location of the outlet face are

x: 10 to 20 mm
y: -5 to 5 mm
z: 0

I tried to use this UDF:

real x[ND_ND]; // array of face coordinates
F_CENTROID(x,f,t);

if (x[1]>=0.01 && x[0]<=0.02 && x[1]>=-0.005 && x[1]<=0.005 && x[2]==0)
{
printf("F_T(f,t)=%f\n",face temperatures);
}

With this UDF, the face centroids are not choosen. I need to specify a wider range of cells and it looks like it still tries to select the cell centroids.

Can someone tell me what is wrong and if this is the right way to calculate the outlet temperature?


Best regards
h0rst
h0rst 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
Udf function average temp inlet - outlet erodv FLUENT 4 October 6, 2017 12:16
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 08:29
non constant outlet temperature amir7 FLUENT 0 April 9, 2012 21:12
Too low temperature at combustor outlet romekr FLUENT 2 February 6, 2012 11:02
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 11:44


All times are GMT -4. The time now is 19:04.