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

UDF for Defining different Diffusivity for different Cellzones

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 4, 2022, 05:44
Default UDF for Defining different Diffusivity for different Cellzones
  #1
New Member
 
Joe
Join Date: Jan 2022
Posts: 13
Rep Power: 4
CFD27 is on a distinguished road
Hello all,
I have a problem in defining diffusivity. I want to define two different diffusion coefficients in two different cell zones. For this I use the following UDF:
Code:
DEFINE_DIFFUSIVITY(diffusion, c, t, i)
{
	Domain* d;
	Thread * tc1, * tc2;

	d = Get_Domain(1);
	
	tc1 = Lookup_Thread(d, 8);
	tc2 = Lookup_Thread(d, 9);


	if (t == tc1)
	{
		diffusivity = 1e-7;
	}
	else if (t == tc2)
	{
		diffusivity = 1e-5;
	}
	return diffusivity;
	
}
The UDF compiles without any problems. However, you can see in the post that the diffusion coefficients are not inserted correctly. Does anyone have an idea what this can be due to?
Many thanks in advance.
Many greetings
Joe
Attached Images
File Type: png Diffusivity.png (108.7 KB, 16 views)
CFD27 is offline   Reply With Quote

 


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
udf for valve closing a pipe using dynamic mesh chem engineer Fluent UDF and Scheme Programming 2 May 13, 2017 09:39
UDF for anisotropic diffusivity Zerzura Fluent UDF and Scheme Programming 2 December 20, 2015 09:37
UDF Fluent binary diffusivity (stefan Maxwell) natantyt Fluent UDF and Scheme Programming 0 September 19, 2011 11:42
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01
UDF, defining diffusivity Szasz Robert FLUENT 0 March 10, 2000 06:46


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