|
[Sponsors] |
November 3, 2011, 14:50 |
what is wrong with the DEFINE_ADJUST macro?
|
#1 |
New Member
davidyin
Join Date: Nov 2011
Posts: 4
Rep Power: 14 |
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. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |