|
[Sponsors] |
June 9, 2014, 04:21 |
access violation when initializing step
|
#1 |
New Member
Pouya Mehrdel
Join Date: Jun 2014
Posts: 1
Rep Power: 0 |
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) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Floating point exception error | Alan | OpenFOAM Running, Solving & CFD | 11 | July 1, 2021 22:51 |
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 |
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 |