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

UDF initialization problems in 2D

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2017, 11:13
Thumbs up UDF initialization problems in 2D
  #1
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Hi!

I have initialize one case with this UDF code:

Code:
#include "udf.h"
#define BIO_ID 6 /*se define el nombre del ID de la cell zone sobre la que se quiere trabajar */

DEFINE_INIT(init_UDS, domain)
{
	cell_t c; /* Cell index has its own type too */
	Thread *tc; /* Threads are pointers to a structure */

	Thread *tbio = Lookup_Thread(domain,BIO_ID);

	/* Loop through all the cell threads in the domain */
	thread_loop_c(tc,domain)
		{/* Loop through the cells in each cell thread */
		begin_c_loop(c,tc)
		  {
			if(tc==tbio)
			C_UDSI(c,tc,0) = 0;
			else
			C_UDSI(c,tc,0) = 1;
		  }
		end_c_loop(c,tc)
		}
}
This code worked perfect on a 3D case but not in 2D case. Is there any difference to add between different dimentions??

Thanks in advance!!
rarnaunot 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
Help! DMFC UDF problems Biao FLUENT 1 November 2, 2020 07:39
Problems in converging viscosity UDF dependent upon strain rate and temperature. alexskerhut Fluent UDF and Scheme Programming 1 March 17, 2016 07:19
unexpected behaviour of UDF - problems with the coordinate system in Fluent SarahG Fluent UDF and Scheme Programming 0 January 5, 2016 09:51
UDF sucessfully interpreted initialization error duaiduaihu FLUENT 0 May 11, 2009 21:18
problems with UDF to set contact angle poiuy219 Main CFD Forum 0 April 30, 2009 10:43


All times are GMT -4. The time now is 03:55.