|
[Sponsors] |
March 29, 2017, 03:33 |
UDF to calculate average temperature outlet?
|
#1 |
Member
Join Date: Nov 2016
Posts: 73
Rep Power: 10 |
Hello everybody,
I am simulating a heated pipe flowed through by water and I would like to know the temperature at the outlet. In the program, I can do that by Reports/Surface Integrals/area weighted average/outlet. Now, I want to write an UDF to calculate this value because I need to work with this parameter in the simulation. My idea was to use an if-function that asks for the location of the outlet surface cells. The location of the outlet face are x: 10 to 20 mm y: -5 to 5 mm z: 0 I tried to use this UDF: real x[ND_ND]; // array of face coordinates F_CENTROID(x,f,t); if (x[1]>=0.01 && x[0]<=0.02 && x[1]>=-0.005 && x[1]<=0.005 && x[2]==0) { printf("F_T(f,t)=%f\n",face temperatures); } With this UDF, the face centroids are not choosen. I need to specify a wider range of cells and it looks like it still tries to select the cell centroids. Can someone tell me what is wrong and if this is the right way to calculate the outlet temperature? Best regards h0rst |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Udf function average temp inlet - outlet | erodv | FLUENT | 4 | October 6, 2017 12:16 |
specified shear at wall - temperature gradient - UDF - access violation error | senD | Fluent UDF and Scheme Programming | 9 | September 18, 2014 08:29 |
non constant outlet temperature | amir7 | FLUENT | 0 | April 9, 2012 21:12 |
Too low temperature at combustor outlet | romekr | FLUENT | 2 | February 6, 2012 11:02 |
UDF in Fluent to Match Mass Flow at Pressure Outlet | Jonas Larsson | Main CFD Forum | 1 | April 29, 1999 11:44 |