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

access violation when initializing step

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2014, 03:21
Default access violation when initializing step
  #1
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?

thanks...


#include "udf.h"

#define del_y 1e-5
#define Diff_coef 0.00012

DEFINE_PROFILE(mass_flux,t,i)
{
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)
{
F_CENTROID(x,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

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


All times are GMT -4. The time now is 19:58.