# Height Function: Inequality in Coordinates

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 12, 2014, 21:39 Height Function: Inequality in Coordinates #1 Member   Shashank Join Date: Apr 2011 Posts: 70 Rep Power: 7 Folks, here is my loop for calculating the sum of volume fractions in a 3x3 stencil of cells. I'm getting an access violation error when I use this loop. Any ideas where the error stems from? Code: ```begin_c_loop_all(c,t) { C_CENTROID(xc,c,t); rx = xc[0]; ry = xc[1]; if (C_VOF(c,lt) != 1.0 && C_VOF(c,lt) != 0.0 && NV_MAG(C_VOF_G(c,lt)) != 0.0) { C_CENTROID(xcp,c,lt); rpx = xcp[0]; rpy = xcp[1]; sum_mh = 0; sum_h = 0; sum_ph = 0; if (rpx=rx-delx && rpy>=ry-dely && rpy<=ry+dely) { sum_mh = sum_mh + (C_VOF(c,lt)*dely); } C_UDMI(c,t,10) = sum_mh; /* H_i-1 */ if (rpx=rx && rpy>=ry-dely && rpy<=ry+dely) { sum_h = sum_h + (C_VOF(c,lt)*dely); } C_UDMI(c,t,11) = sum_h; /* H_i */ if (rpx=rx+delx && rpy>=ry-dely && rpy<=ry+dely) { sum_ph = sum_ph + (C_VOF(c,lt)*dely); } C_UDMI(c,t,12) = sum_ph; /* H_i+1 */ } } end_c_loop_all(c,t)```

 Tags cell macros, height function, udf

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post nzy102 OpenFOAM Bugs 14 January 10, 2012 09:53 chiven OpenFOAM Installation 15 April 26, 2009 22:33 feng_w OpenFOAM Installation 1 January 25, 2009 07:59 tehache OpenFOAM Running, Solving & CFD 1 August 2, 2005 13:36 Astrid Hostrup CD-adapco 1 September 8, 2000 03:30

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

 Contact Us - CFD Online - Top