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

Temperature Gradient UDF file not compiling

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 8, 2021, 23:52
Default Temperature Gradient UDF file not compiling
  #1
New Member
 
Join Date: Mar 2021
Posts: 15
Rep Power: 5
SugarOnichan is on a distinguished road
Hello,

I have a 2D spiral geometry and I am trying to calculate the temperature gradient along the wall. I have written a UDF code to calculate it but it is not getting compiled. Can anyone help me out here ? I am attaching my udf file here.

Code:
#include "udf.h"

DEFINE_ADJUST(tempgrad,d)
{
	Thread *t;
	cell_t c;
	face_t f;

	thread_loop_c(t,domain)
	{
		begin_c_loop(c,t)
		{
			C_UDSI(c,t,0)=NV_Mag(C_T_G(c,t));
		}
		end_c_loop(c,t)
	}
}

DEFINE_ON_DEMAND(store_gradient)
{ 
	
	Domain *domain;
	cell_t c;
	Thread *t;
	domain=Get_Domain(1);
	
	thread_loop_c (t,domain)
	{
		begin_c_loop (c,t)	
		{
		C_UDMI(c,t,0) = NV_MAG(C_UDSI_G(c,t,0));
		}
	end_c_loop (c,t)
	}
}

Last edited by SugarOnichan; March 10, 2021 at 03:36.
SugarOnichan 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
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 06:47
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 11:32
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 10:57
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44


All times are GMT -4. The time now is 15:44.