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

Height Function: Inequality in Coordinates

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2014, 20:39
Default Height Function: Inequality in Coordinates
  #1
Member
 
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15
shashank312 is on a distinguished road
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)
shashank312 is offline   Reply With Quote

Reply

Tags
cell macros, height function, udf


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
LiencubiclowRemodel nzy102 OpenFOAM Bugs 14 January 10, 2012 08:53
Installation 1.5 as a user of server (New bird) chiven OpenFOAM Installation 15 April 26, 2009 22:33
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59
Time dependent BC as function of coordinates tehache OpenFOAM Running, Solving & CFD 1 August 2, 2005 13:36
stream function in cylindrical coordinates Astrid Hostrup Siemens 1 September 8, 2000 03:30


All times are GMT -4. The time now is 10:54.