|
[Sponsors] |
ACCESS_VIOLATION DEFINE_ADJUST and DEFINE_EXECUTE_AT_END |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 30, 2010, 12:39 |
ACCESS_VIOLATION DEFINE_ADJUST and DEFINE_EXECUTE_AT_END
|
#1 |
New Member
sm
Join Date: Jun 2009
Posts: 15
Rep Power: 17 |
Hello,
I have been using the same code for both 2D and Axis-symmetry. while it does not give any error when using with 2D, I get ACCESS_VIOLATION when I use it with Axis symmetry. I have two faces (one solid and the other fluid in the case of axis symmetry since there is a small solid cylinder at the center of the big cylinder). I have tried hooking after few iterations, but it does not work. The code is as given below DEFINE_ADJUST(adjust_conc,domain) { Domain *d; Thread *t; cell_t c; if (! Data_Valid_P()) return; thread_loop_c (t,domain) { begin_c_loop (c,t) { if (C_UDSI(c,t,1) < 0) {C_UDSI(c,t,1) = 0.0; } else {C_UDSI(c,t,1)= C_UDSI(c,t,1); } if (C_UDSI(c,t,2) < 0) {C_UDSI(c,t,2) = 0.0; } else {C_UDSI(c,t,2)=C_UDSI(c,t,2); } } end_c_loop (c,t) } } DEFINE_EXECUTE_AT_END(execute_at_end) { Domain *d; Thread *t; cell_t c; d = Get_Domain(1); thread_loop_c (t,d) { begin_c_loop (c,t) { C_UDSI(c,t,4)=C_UDSI(c,t,0)+ C_UDSI(c,t,3); if (C_UDSI(c,t,1) <0.) {C_UDSI(c,t,1)=0.;} if (C_UDSI(c,t,2)<0.) {C_UDSI(c,t,2)=0.;} } end_c_loop (c,t) } } Thanx SM |
|
August 3, 2010, 10:16 |
|
#2 |
Member
Akour
Join Date: May 2009
Posts: 79
Rep Power: 17 |
make sure you use the horizontal x-axis as the axis of symmetry...have you done that?
__________________
akour |
|
August 3, 2010, 10:31 |
|
#3 |
New Member
sm
Join Date: Jun 2009
Posts: 15
Rep Power: 17 |
Thanx, yes I already have done that. I have now changed the geometry and eliminated the solid face ( I do not deal with heat transfer) and the UDF works fine.
sm |
|
Tags |
access_violation, axis_symmetry, define_adjust |
|
|