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

UDF DPM Post Processing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2022, 13:13
Default UDF DPM Post Processing
  #1
New Member
 
Kumar Pushpak
Join Date: Apr 2019
Posts: 9
Rep Power: 7
khool_chelsea is on a distinguished road
I have 10injections in my case. After certain interval i want to calculate the average temperature of particles in each injections. I have written the udf for that and it has compiled but when executed its giving me SIGESEV error and FLUENT crashes after that. Below is the udf.


#include "udf.h"

DEFINE_ON_DEMAND(T_avg)
{
Domain *d;
real tavg = 0;
real Tsum = 0;
real n = 0;
Particle *p;
p = 0;
Injection *I;
I = 0;

real pt = P_T(p);
real flow_time = CURRENT_TIME;




loop(p,I->p)
{
Tsum = Tsum + pt;
n = n + 1;
}
tavg = Tsum/n;

Message("Average Temperatue: %d\n",tavg);


}


P.S. I have never written any udf code so a bit of a novice in this area.
khool_chelsea 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
Rewriting UDF For Parallel Processing m_ridzon Fluent UDF and Scheme Programming 9 January 10, 2019 14:42
DPM post processing barzin FLUENT 9 April 22, 2015 04:08
Automated post processing using CFD Post shreyasr ANSYS 0 January 28, 2013 07:21
[OpenFOAM] is parallel processing available in parafoam for post processing? sachinlb ParaView 1 August 14, 2012 10:52
Post Processing Using UDF mohsen zendehbad FLUENT 0 December 16, 2009 04:49


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