|
[Sponsors] |
January 12, 2014, 21:39 |
Height Function: Inequality in Coordinates
|
#1 |
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 14 |
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 | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LiencubiclowRemodel | nzy102 | OpenFOAM Bugs | 14 | January 10, 2012 09:53 |
Installation 1.5 as a user of server (New bird) | chiven | OpenFOAM Installation | 15 | April 26, 2009 23:33 |
Compilation errors in ThirdPartymallochoard | feng_w | OpenFOAM Installation | 1 | January 25, 2009 07:59 |
Time dependent BC as function of coordinates | tehache | OpenFOAM Running, Solving & CFD | 1 | August 2, 2005 14:36 |
stream function in cylindrical coordinates | Astrid Hostrup | Siemens | 1 | September 8, 2000 04:30 |