|
[Sponsors] |
August 26, 2013, 18:56 |
Calculating Bulk Temperature-UDF
|
#1 |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Dear Friends,
I have written a piece of UDF to compute bulk mean temperature inside a 2-D straight pipe with structured grid. I hope it comes to work. begin_f_loop(f,t0) { F_AREA(x2,f,t0); F_CENTROID(x,f,t0); BD = x[0]; thread_loop_c(t,d) { if (FLUID_THREAD_P(t)) { begin_c_loop(c,t) /* loops over cells in a cell thread */ { C_CENTROID(xc,c,t); if (ABS(xc[0]-BD) < 0.5*NV_MAG(x2)) { AREA = C_VOLUME(c,t)/(NV_MAG(x2)*ABS(x2[1])); S_T = S_T + C_T(c,t)*C_R(c,t)*C_U(c,t)*AREA; S_V = S_V + C_R(c,t)*C_U(c,t)*AREA; } } end_c_loop(c,t) } } T_AVE = S_T/S_V; S_T = 0.0; S_V = 0.0; C_UDMI(F_C0(f,t0),THREAD_T0(t0),0) = T_AVE; } end_f_loop(f,t0) Last edited by syavash; August 27, 2013 at 05:44. |
|
March 19, 2019, 08:04 |
Bulk mean temperature
|
#2 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
Hello sir. I'm trying to do simulation for synthetic jet (3D) and I want to find out the bulk mean temperature of air. I attached the image of synthetic jet (3D) please go through it. Can you please me for it, I'm not used any udf for this. |
|
September 4, 2019, 15:13 |
|
#3 | ||
Senior Member
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 7 |
Quote:
which type of macro we should add to upper of code? Quote:
|
|||
September 4, 2019, 23:09 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
code above is wrong
you may find good base to define mean temperature in Ansys FLuent Customization manual look for DEFINE_ON_DEMAND macro -> example best regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 08:15 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 02:27 |
UDF or any approach for Bulk Temperature calculation | vemps | FLUENT | 0 | May 1, 2009 02:09 |
UDF velocity and temperature | Raj | FLUENT | 3 | February 1, 2009 19:29 |
how to write a 3D linear temperature of UDF | venus | FLUENT | 1 | October 28, 2008 03:46 |