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

How to Extract neighbors?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2015, 02:32
Question How to Extract neighbors?
  #1
New Member
 
Join Date: Apr 2015
Posts: 12
Rep Power: 11
sphoenix09 is on a distinguished road
Hi all,

I am new to this forum as well as fluent programming. I am working on single phase flow and need to extract neighbors of each cells through udf and store it in data file. Please lead me.
In this code I want loop over entire cells.

Code:
#include "udf.h"
#include "mem.h"
#include "sg.h"

DEFINE_ON_DEMAND(neighbors)
{
	Domain *d;
	cell_t c;
	Thread *t;
	
	int c0;
	int c1;
	
	thread_loop_c(t,d)
	{
		begin_c_loop(c,t)
		{
			F_C0(c,t)=c0;
			F_C1(c,t)=c1;
			C_UDMI(c,t,1)=c0;
			C_UDMI(c,t,2)=c1;
			
		}
		end_c_loop(c,t)
	}
}
Thanks in advance
sphoenix09 is offline   Reply With Quote

Reply


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
Extract Mesh/Geometry Bill Tuer CFX 10 May 8, 2018 01:43
Extract x,y,z coordinates from surface Saidul ANSYS 0 January 16, 2015 02:28
How to extract data from a specific layer of the grids? ripperjack OpenFOAM Post-Processing 1 October 29, 2014 08:57
extract information from sample during simulation for use duongquaphim OpenFOAM Programming & Development 0 January 10, 2011 13:51
Extract a vertical profile in volScalarField begou OpenFOAM 1 June 3, 2009 13:31


All times are GMT -4. The time now is 18:11.