|
[Sponsors] |
February 21, 2017, 13:34 |
Average Temperature
|
#1 |
New Member
Join Date: Jan 2014
Posts: 10
Rep Power: 12 |
Hi,
I am simulating a sub-channel flow (in a nuclear reactor), so I have 4 domains (fuel, gap, clad and fluid). I have a volumetric heat generation into the fuel and I and to calculate the fluid average temperature by using a UDF. I wrote something like that: #include "udf.h" DEFINE_TEMPERATURA(temp_ave_fluid) { Domain *d; cell_t c; Thread *tc; ind ID = 30; */ ID of the domain fluid d = Get_Domain(1); real volume = 0.0; real temper = 0.0; real temperature_fluid; tc = Lookup_Thread(d,ID); begin_c_loop(c,tc) { volume = C_VOLUME(c,tc); temper += C_T(c,tc)*C_VOLUME(c,tc); vol_tot += volume; tsum += temper } end_c_loop(c,tc) temperature_fluid=tsum/vol_tot; printf("\n Temperature sonde: %e K \n , temperature_fluid); } But I can not interpret the UDF, Fluent says: "unterminated string or character constant" "possible real start of unterminated constant" "line 7: parse error" Could someone helps me? Please Thanks |
|
Tags |
t average, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
heat transfer coefficient value in floefd | jason kid | FloEFD, FloWorks & FloTHERM | 10 | October 16, 2016 16:55 |
Anys Average temperature | apo | FLUENT | 2 | November 4, 2014 12:31 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 01:27 |
Is wall ajacent temperature equal to conservative temperature of the wall? | shenying0710 | CFX | 8 | January 4, 2013 04:03 |
average interior temperature less than the operating temperature | Naher | FLUENT | 4 | March 31, 2011 23:14 |