CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent Multiphase

access violation when initializing step

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

LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2014, 04:21
Default access violation when initializing step
New Member
Pouya Mehrdel
Join Date: Jun 2014
Posts: 1
Rep Power: 0
pouya.mehrdel is on a distinguished road
hi everyone

I'm trying to model a specie transport problem by using fluent. I have two horizontally flows, up and down, which are being separated by a thin wall in the middle. I have written the below UDF to apply mass flux on the middle wall for specie transport. But after interpreting the UDF and selecting the boundary condition, in the initializing step the fluent shows access violation error. Can anyone help me with this problem?


#include "udf.h"

#define del_y 1e-5
#define Diff_coef 0.00012

real c1, c2 , i1;
real x[ND_ND], y;
face_t f;
cell_t c;
Domain *domain;

int wall_ID = 8;
Thread *wall = Lookup_Thread(domain,wall_ID); /*introducing the wall(membrane) thread to the fluent*/

int fluid1_ID = 2;
Thread *fluid1 = Lookup_Thread(domain,fluid1_ID); /*introducing the fluid1 thread to the fluent*/

int fluid2_ID = 3;
Thread *fluid2 = Lookup_Thread(domain,fluid2_ID); /*introducing the fluid2 thread to the fluent*/

real i1 = 0; /*introducing the specie's index to the fluent*/

begin_f_loop(f , t)
y = x[1];

c1 = F_YI(f, fluid1, i1); /*reading the specie mass fraction from fluid1*/
c2 = F_YI(f, fluid2, i1); /*reading the specie mass fraction from fluid2*/

F_PROFILE(f,wall,i) = Diff_coef * (c1 - c2)/ del_y; /*applying the mass fraction*/
end_f_loop(f, thread)
pouya.mehrdel is offline   Reply With Quote


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
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 17, 2019 00:12
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
Floating point exception error Alan OpenFOAM Running, Solving & CFD 10 April 6, 2012 15:02
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03
UDF problem (ACCESS VIOLATION) Jorge Poyatos FLUENT 5 March 16, 2009 09:02

All times are GMT -4. The time now is 00:41.