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

what is wrong with the DEFINE_ADJUST macro?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2011, 14:50
Default what is wrong with the DEFINE_ADJUST macro?
  #1
New Member
 
davidyin
Join Date: Nov 2011
Posts: 4
Rep Power: 14
davidyin is on a distinguished road
Hi, there is two pahses surface flow of water and air, whick is model with VOF method. I want to simulate the distribution of dissolved oxygen just in water. So I need to give the values at the air area where the volume ratio of air is much than 0.5 at every timestep. The code is written with DEFINE_ADJUST macor as following.

#include"udf.h"
#include "sg_mphase.h"
#include "mem.h"
#include "sg_mem.h"

real vair;

DEFINE_ADJUST(my_adjust, d)
{
Thread *t;
cell_t c;
thread_loop_c (t,d)
{
begin_c_loop (c,t)
vair=C_VOF(c,t,0);
if (vair>0.5) C_UDSI(c,t,0)=8.1;
end_c_loop (c,t)
}
}


It can be interpreted and hooked well.

But when I run calculation, the following erres occur.

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.

please give me some advices, Thank you in advance.
Attached Images
File Type: jpg sketch.JPG (10.7 KB, 10 views)
davidyin is offline   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
udf error srihari FLUENT 1 October 31, 2016 14:18
Macro Trouble -Winows Explorer Crashes with Macro Martin Castillo FLUENT 1 July 25, 2007 04:18
Macro problem cfddummy Siemens 1 April 9, 2007 12:37
macro not function! guang ai Siemens 0 July 25, 2004 18:53
Call a macro from a macro Flav Siemens 2 July 1, 2004 05:42


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