CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   what is wrong with the DEFINE_ADJUST macro? (

davidyin November 3, 2011 15:50

what is wrong with the DEFINE_ADJUST macro?
1 Attachment(s)
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 "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)
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.

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