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

execute on demand --> (segmentation fault)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2014, 06: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, 03:27
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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


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


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