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

unable to run macro C_CHILD(c,t,i) in fluent.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 26, 2018, 13:29
Default unable to run macro C_CHILD(c,t,i) in fluent.
  #1
New Member
 
Piyush
Join Date: Apr 2015
Location: Kolkata
Posts: 12
Rep Power: 11
piyupant is on a distinguished road
Hi all,

I have written following udf for accessing neighbours of a cell in fluent. The macro I am using i.e C_CHILD(c,t,i) is defined in "mem.h". I am also allocating variables associated with this in this header file. Still Access violation error is coming. Can someone suggest way to make it run ??

Thanks & Regards,

Piyush Pant

#include "udf.h"

DEFINE_ADJUST(cell_child, d)
{
Thread *t;
cell_t c;
int n;
FILE *fp;

Alloc_Storage_Vars(d,SV_CHILD,SV_CHILD_THREAD,SV_N ULL);

thread_loop_c(t,d)
{
// if(NNULLP(THREAD_STORAGE(t,SV_CHILD)))
// Message(" SV_CHILD variable not allocated \n");
// else
// Message(" SV_CHILD variable allocated \n");

begin_c_loop(c,t)
{

c_child_loop(c,t,n)
{
fp = fopen("data1.txt", "a");
fprintf(fp," c, n = %u %d %u \n ", c, n, C_CHILD_INDEX(c,t,n) );
fclose(fp);
}


}
end_c_loop(c,t)
}

Free_Storage_Vars(d,SV_CHILD,SV_CHILD_THREAD,SV_NU LL);
}
piyupant is offline   Reply With Quote

Reply

Tags
access violation error, fluent - udf, neighbouring cells, udf and programming

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
looking for a smart interface matlab fluent chary FLUENT 24 June 18, 2021 09:07
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 22:56
Problem in using parallel process in fluent 14 Tleja FLUENT 3 September 13, 2013 10:54
[Commercial meshers] ST_Malloc: out of memory.malloc_storage: unable to malloc Velocity SA, cfdproject OpenFOAM Meshing & Mesh Conversion 0 April 14, 2009 15:45
resume and run fluent for another timestep via a c greg FLUENT 2 June 30, 2005 05:01


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