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

DEFINE_EXECUTE_AT_END --> loop on boundary with the use of Lookup_Thread ???

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By macfly

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 7, 2013, 01:33
Default DEFINE_EXECUTE_AT_END --> loop on boundary with the use of Lookup_Thread ???
  #1
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
Hi,

Here is a simple UDF that calculates and prints the volume integral of temperature at the end of each time step:

Code:
#include "udf.h"
DEFINE_EXECUTE_AT_END(execute_at_end)
{
Domain *d;
Thread *t;
real sum_T=0.;
cell_t c;
d = Get_Domain(1);
thread_loop_c(t,d)
	begin_c_loop(c,t)
		sum_T += C_T(c,t) * C_VOLUME(c,t);  /* Integrate temperature */
	end_c_loop(c,t)
printf("Volume integral of temperature = %g K*m^3\n", sum_T);
}
Now, I would like to do a similar operation but on a boundary, with the use of the Lookup_Thread function. The UDF manual only has an example for the calculation of something in a domain (Get_Domain), not on a boundary (Lookup_Thread). I tried to modify my code with no success. I can make it work with DEFINE_ADJUST at each iteration, but it's not what I want: I want to perform some calculation on a boundary at each time step, not at each iteration.

Any idea how I can tell DEFINE_EXECUTE_AT_END to loop on a boundary?

Last edited by macfly; September 4, 2013 at 14:51.
macfly is offline   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
1.7.x -> buoyantPimpleFoam -> hRhoThermo -> incompressible and icoPoly3ThermoPhysics? will.logie OpenFOAM Programming & Development 1 February 16, 2011 20:52
1.7.x -> buoyantPimpleFoam -> hRhoThermo -> incompressible and icoPoly3ThermoPhysics? will.logie OpenFOAM 0 December 16, 2010 07:08
CAD -> gMsh -> enGrid -> OpenFOAM Problem AlGates OpenFOAM 7 August 6, 2010 12:46
[Netgen] Geometry > Netgen > OpenFOAM ericnutsch OpenFOAM Meshing & Mesh Conversion 9 February 22, 2010 07:39
Point Data -> Spline -> Iges Tim Franke Main CFD Forum 1 July 6, 2000 12:14


All times are GMT -4. The time now is 13:02.