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

Error: WorkBench Error: Could not register files of type:Udf

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2014, 08:49
Default Error: WorkBench Error: Could not register files of type:Udf
  #1
New Member
 
Rafau
Join Date: Aug 2013
Posts: 18
Rep Power: 9
rkadlof is on a distinguished road
As the title, I have an error after initializing (it is still ok), but after running calculation it appears.
"Error: WorkBench Error: Could not register files of type:Udf"
error photo: http://i62.tinypic.com/16q51u.png
I think the problem is at the begining, with FILE *fid. I can not write this file.
here's my code :

-------------------------------------------------------------------------------
#include "udf.h"

FILE *fid;

DEFINE_PROFILE(flux_setget,t,i)
{
face_t f;
int zoneid = THREAD_ID(t);

/* Write the property and thread id values for the flux condition to file */
fid = fopen("flux-ids", "w");
fprintf(fid, "%d, %d\n", zoneid, i);
fclose(fid);

/* Set initial profile values */
begin_f_loop(f,t)
{
F_PROFILE(f,t,i) = 10;
}
end_f_loop(f,t)
}

DEFINE_ADJUST(flux_adjuster, domain)
{
int iprop;
int izone;
int n = 0;
Thread *t;
face_t f;
Thread *c_thread;
cell_t c;
real pressure = 1;
real newvel;

/* Read in the property and thread id values stored by the BC UDF */
fid = fopen("flux-ids", "r");
fscanf(fid,"%d, %d", &izone, &iprop);
fclose(fid);


thread_loop_c(c_thread, domain) /*loops over all cell threads in domain*/
{
/* Loop over cells in a thread to get information stored in cells. */
begin_c_loop(c, c_thread)
{
/* C_T gets cell temperature. The += will cause all of the cell
temperatures to be added together. */
pressure += C_T(c, c_thread);
n = n+1;
}
end_c_loop(c, c_thread)
}
pressure=pressure;

/* Get the thread pointer based on the obtained zone id */
t = Lookup_Thread(domain, izone);
/* Read the needed data, then calculate and set the new flux values */
begin_f_loop(f,t)
{
if (pressure < 330)

newvel = 0;

else



newvel = sqrt(2*(fabs(pressure))/1.225);

F_PROFILE(f,t,iprop) = newvel;
}
end_f_loop(f,t)
}


DEFINE_PROFILE(unsteady_pressure, thread, position)
{
face_t f;
real t = CURRENT_TIME;

begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 5 + 4*sin(6.28* t);
}
end_f_loop(f, thread)
}
rkadlof is offline   Reply With Quote

Reply

Tags
udf.error.adjust.file

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting ANSYS CFX files to Fluent files Martin S. Rasmussen FLUENT 3 January 30, 2007 15:08
Problems with result files Kasper CFX 5 December 14, 2006 02:41
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 20:51
[making animations] fclose fails to close files? Mika FLUENT 0 March 30, 2001 08:19
Merging .msh files in TGrid Raza Mirza FLUENT 2 January 18, 2001 18:09


All times are GMT -4. The time now is 03:20.