CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

execute on demand --> (segmentation fault)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 2, 2014, 05:31
Default execute on demand --> (segmentation fault)
  #1
New Member
 
Join Date: Jun 2014
Posts: 1
Rep Power: 0
fasc6813 is on a distinguished road
Hi,
for my Master-Thesis I have to couple Maxwell with Fluent. Therefore I got a UDF from an earlier work.
My Problem is when I interprete the UDF and click then execute on demand comes: recieved a fatal signal (Segmentation fault)
the file is koordinaten.c:

#include "udf.h"

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

FILE *logfile;

DEFINE_INIT(my_init_function,domain)
{
cell_t c;
Thread *t;
real x[ND_ND];
real i = 0;
real j = 0;
FILE *ff;
ff=fopen("Koordinaten.log","at");
fprintf(ff,"\nDEFINE_INIT\n");

printf("\nDEFINE_INIT\n");
printf("Wert von Zelle: %d\n", c);
printf("Wert von thread: %d\n", t);
printf("Wert von ND_ND: %d\n", ND_ND);

/* loop over all cell threads in the domain */
thread_loop_c (t,domain)
{

/* loop over all cells */
begin_c_loop_all (c,t)
{

C_CENTROID(x,c,t);

fprintf(ff,"Zelle-%d-Koordinaten x %le y %le z %le\n", c,x[0],x[1],x[2]);

}
end_c_loop_all (c,t)

}
fclose(ff);

}

DEFINE_ADJUST(djust,domain)
{
FILE *ff;
ff=fopen("libudf.log","at");
fprintf(ff,"\nDEFINE_ADJUST\n");
fclose(ff);

printf("\nDEFINE_ADJUST\n");
}


DEFINE_ON_DEMAND(demand)
{
FILE *ff;
ff=fopen("libudf.log","at");
fprintf(ff,"\nDEFINE_ON_DEMAND\n");
fclose(ff);

printf("\nDEFINE_ON_DEMAND\n");
}


Has anybody an idea?
fasc6813 is offline   Reply With Quote

Old   June 6, 2014, 02:27
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 670
Rep Power: 9
pakk is on a distinguished road
Could it be that the file libudf.log is already opened in a different program?
pakk is offline   Reply With Quote

Reply

Tags
fluent - udf, maxwell, udf

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
Segmentation Fault w/ compiled OF 2.2.0 - motorBike example sudo OpenFOAM Running, Solving & CFD 3 April 2, 2013 17:27
segmentation fault when installing OF-2.1.1 on a cluster Rebecca513 OpenFOAM Installation 9 July 31, 2012 15:06
Segmentation Fault Shawn_A OpenFOAM Running, Solving & CFD 6 October 31, 2011 15:38
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel francesco OpenFOAM Bugs 3 June 10, 2011 09:30
ParaView segmentation fault only for multiphase gwierink OpenFOAM 9 March 25, 2010 08:23


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