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

Calculate averaged value (mass- or area-weighted) on type:interior boundary conditio

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2012, 10:36
Default Calculate averaged value (mass- or area-weighted) on type:interior boundary conditio
  #1
New Member
 
George B.
Join Date: Nov 2011
Location: United Kingdom
Posts: 2
Rep Power: 0
jorbuiga is on a distinguished road
I would like to calculate the averaged value for some properties (temperature, pressure, viscosity, x-velocity, velocity magnitude, etc) for the boundary condition type:interior (for mass-flow inlet or pressure-outlet works fine). I was trying to get the values for the cell (e.g. the temperature of the cell) but it is not available by using my code :

#include "udf.h"

// firstly I intend to calculate the sum of the temperature values
DEFINE_EXECUTE_AT_END(execute_at_end)
{
real sum_temp=0;

Domain *d;
cell_t c;
face_t f;
Thread *t;
int ID_int = 27; //here I know the ID for the type:interior = 27
d = Get_Domain(1);
t = Lookup_Thread(d,ID_face_int);

begin_c_loop(c,t)
{
sum_temp+=C_T(c,t);
}
end_c_loop(c,t)

printf( "\n Tsum in type:interior %d is [in K]: %f \n",ID_int,sum_temp);

}


Thanks a lot in advance.
jorbuiga 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
Area weighted or mass weighted average SAM Main CFD Forum 31 April 30, 2018 05:12
mass & area average henry CFX 8 September 30, 2016 04:26
How to calculate the mass fraction of species in Fluent? llrr FLUENT 0 May 21, 2010 05:41
Facet, Area and Mass Average in Fluent Tushar Main CFD Forum 0 February 4, 2009 05:37
Can Tecplot calculate isosurface area alon axis x? leaf Tecplot 0 May 21, 2007 13:20


All times are GMT -4. The time now is 23:11.