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 output temperature

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 17, 2017, 12:24
Default UDF for output temperature
  #1
Senior Member
 
Join Date: Jan 2011
Posts: 339
Rep Power: 16
mariam.sara is on a distinguished road
Hi I am attempted to use UDF to define dimensionless temperature in order to use it in post processing results I wrote it as below :

#include "udf.h"

DEFINE_ON_DEMAND(on_demand_calc)
{
Domain *d; /* declare domain pointer since it is not passed as an
argument to the DEFINE macro */
real th = 298.3899;
real tc = 297.6101;
real temp;
Thread *t;
cell_t c;
d = Get_Domain(1); /* Get the domain using Fluent utility */

/* Compute temperature function and store in user-defined memory*/
/*(location index 0) */

begin_c_loop(c,t)
{
temp = C_T(c,t);
C_UDMI(c,t,0) = (temp-tc)/(th-tc);
}
end_c_loop(c,t)

}


I interpreted it successfully but when I select execute for demand it give me the following error:

Warning: E:\\Project current year\\paper work\\output.C: line 9:
Error: received a fatal signal (Segmentation fault).

So is there problem with the UDF? any reply please?

regards,
mariam
mariam.sara 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 Temperature Dependent Energy Source er.mkumar Fluent UDF and Scheme Programming 9 March 14, 2024 04:01
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
UDF temperature profile asal Fluent UDF and Scheme Programming 67 August 7, 2018 12:41
UDF slip and temperature jump from IFRT abir Fluent UDF and Scheme Programming 1 July 30, 2012 05:44
UDF or any approach for Bulk Temperature calculation vemps FLUENT 0 May 1, 2009 01:09


All times are GMT -4. The time now is 05:25.