CFD Online URL
[Sponsors]
Home > Forums > FLUENT

problems with F_AREA

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 15, 2006, 09:41
Default problems with F_AREA
  #1
Bogdan
Guest
 
Posts: n/a
Hello, I have some problems when I'm using F_AREA macro. It returns a zero vector, and I don't understand why. I have a function which computes the cross-section area of a domain at a given x position, but my variable is always 0. I appreciate any help. Thanks, Bogdan

void computeCrossSectionArea(Domain*mixture, real x,real*totalArea){

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

** This function computes the cross-section area of a domanin at a

** given x.

**

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

Thread* face_thread;

Message("x= %f\n",x);

face_t face;

real xf[ND_ND],area[ND_ND];

int counter1=0;

*totalArea=0.0;

FILE * fp;

char filename[]="area_vectors.txt";

fp=fopen(filename,"a");

thread_loop_f(face_thread,mixture)

{

begin_f_loop_all(face,face_thread)

{

F_CENTROID(xf,face,face_thread);

if(equals6(xf[0],x)){

counter1++;

F_AREA(area,face,face_thread);

fprintf(fp,"at x= %f area[0] is %f, area[1] is %f and area[2] is %f\n",xf[0],area[0],area[1],area[2]);

*totalArea+=NV_MAG(area);

}

}

end_f_loop_all(face,face_thread)

}

Message("counter1 is %d\n",counter1);

fclose(fp); }

int equals (real d1, real d2, real delta) {

if ( fabs(d1-d2) < delta )

return 1 ;

return 0 ; }

int equals6 ( real d1, real d2) {

return equals( d1,d2,0.000001); }
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 0 August 5, 2011 17:02
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 13:13
Some problems with Star CD Micha CD-adapco 0 August 6, 2003 14:55
Airpak: Problems with heat flow contour conditions Ivan de Miguel Urain FLUENT 1 November 16, 2001 10:36
unstructured grid sreekanth Main CFD Forum 1 August 6, 2001 16:09


All times are GMT -4. The time now is 07:34.