|
[Sponsors] |
January 12, 2022, 13:13 |
UDF DPM Post Processing
|
#1 |
New Member
Kumar Pushpak
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
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. |
|
|
|
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 |