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

patching all faces ...

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2007, 19:35
Default patching all faces ...
  #1
bart weisser
Guest
 
Posts: n/a
Howdy there:

I am kinda stuck with a UDF of mine. I want to patch both the cell and face values of some variables. The cell part went without incident, but for the face part, it seems that it is only patching one face. How do I get the UDF to loop over *all* the faces? Here is a snippit of the code I used ...

The value of the variable face_count will be smaller than the total number of faces on the grid.

Thanks in advance, BW.


/************************************************** ***/

#include "udf.h"
#include "mem.h"

DEFINE_ON_DEMAND(patch_face)
{
Domain *d;
Thread *t;
face_t *f;

int face_count;

d = Get_Domain (1);
face_count = 0;

thread_loop_f (t,d) {
begin_f_loop (f,t) {
face_count++;
} end_f_loop (f,t)
}

printf ("*** face count = %i ***\n", face_count);
}
  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
2.0.x on Mac OSX niklas OpenFOAM Installation 74 March 28, 2012 16:46
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 19:43
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08


All times are GMT -4. The time now is 12:33.