|
[Sponsors] |
DEFINE_EXECUTE_AT_END --> loop on boundary with the use of Lookup_Thread ??? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 7, 2013, 01:33 |
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 |
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); } 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. |
|
|
|
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 |