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

A short UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2006, 11:22
Default A short UDF
  #1
Mazyar
Guest
 
Posts: n/a
I am just trying to extract the y-velocity at x=0. Please note that when I use v=F_V(f,t) or F_U(f,t) instead of v=cte, I receive the following error. The line x=0 is within the domain, defined by using Surface menu.

FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: ()

================================================== ========= #include "udf.h"

DEFINE_ADJUST(data_extract_from_jet,d) { real xx[ND_ND]; /* this will hold the position vector */ real x, y, u, v; Thread *t; face_t f; FILE *fp; fp = fopen("jet.dat","w");

thread_loop_f(t,d) /* loop over the Thread of Faces t in the domain */ { begin_f_loop(f,t) /*loop over the faces (f) of the Thread of Faces */ { F_CENTROID(xx,f,t); x = xx[0]; y = xx[1]; if( x==0)

{

v=F_V(f,t);

fprintf(fp, "\n x=%g y=%g\n vc=%g\n", x, y, v); } } end_f_loop(f,t) } fclose(fp); }

  Reply With Quote

Old   May 24, 2006, 11:43
Default Re: A short UDF
  #2
Adriano
Guest
 
Posts: n/a
why dont use a DEFINE_ON_DEMAND function?
  Reply With Quote

Old   May 24, 2006, 11:56
Default Re: A short UDF
  #3
Mazyar
Guest
 
Posts: n/a
Thanks for your reply. Both Define_adjust and On Demand work. I guess the peroblem is from somewhere else.
  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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
short udf amir FLUENT 0 May 25, 2006 14:26
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


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