|
[Sponsors] |
udf for 3d model to give heat flux profile around the wall surface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 6, 2012, 07:21 |
udf for 3d model to give heat flux profile around the wall surface
|
#1 |
New Member
n7310889
Join Date: Aug 2012
Posts: 26
Rep Power: 14 |
Hi, could any of you can tell me whats wrong with this macro? Its for 3d to provide input heat-flux profile around a semi circular cylinder of 33mm radius and 1.5m long.The heat profile varies along the verticle y direction and translates the same along the horizontal z axis.
#include "udf.h" DEFINE_PROFILE(heat_profile,thread,index) { real x[ND_ND]; real x,y,z,r,angle; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); x =x[0]; y =x[1]; z =x[2]; r =sqrt(pow(x,2)+pow(y,2)); angle =acos(-y/r); if ((z>=0.0) && (z<=1.4)) { if ((angle>=0.0) && (angle<=60.0)) { F_PROFILE(f,thread,index) =6500.0; } if ((angle>50.0) && (angle<=180.0)) { F_PROFILE(f,thread,index) =0.0; } } else { F_PROFILE(f,thread,index) =0.0; } } end_f_loop(f,thread) } |
|
April 20, 2018, 03:47 |
Dear n7310889
|
#2 |
New Member
arshad ahmed
Join Date: Apr 2018
Posts: 4
Rep Power: 8 |
Can u please tell the meaning of 6500 in your program.
|
|
April 20, 2018, 04:30 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
||
May 8, 2018, 07:45 |
|
#4 |
New Member
mokong
Join Date: Aug 2015
Posts: 5
Rep Power: 11 |
@AlexanderZ, is your UDF looping over all the faces? try printing the value of the face centroid and seeing if the UDF is going over all the faces.
I am also trying to create a radially varying heat flux for a circular surface. But my UDF surprisingly does not loop over all the faces. This is my udf. We could both help each other out. # include "udf.h" DEFINE_PROFILE(heatfluxshoulder,thread,position) { face_t f; cell_t c; float x[ND_ND]; float xx,z,r,omega,w,sigma, uf,qs1,ql1,hflux,taustick, tauslide, rshoulder, rpin, pressure, yield, qtotal; begin_f_loop(f,thread) { pressure=17700; yield=35000000; omega=800; rshoulder=0.014; rpin=0.003; w=2*3.14*omega/60; F_CENTROID(x,f,thread); xx=x[0]; z=x[2]; r=sqrt((xx*xx+z*z)); sigma=0.31*exp(w*r/1.87)-0.026; uf=0.5*exp(-sigma*w*r); taustick=yield/1.73; tauslide=uf*pressure; qs1=0.67*3.14*w*taustick*(rshoulder*rshoulder*rsho ulder- rpin*rpin*rpin); ql1=0.67*3.14*w*tauslide*(rshoulder*rshoulder*rsho ulder- rpin*rpin*rpin); qtotal=sigma*(qs1)+(1-sigma)*(ql1); hflux=(qtotal/4847)*1.7e+010; F_PROFILE(f,thread,position) = hflux; } end_f_loop(f,thread) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for Heat Exchanger model | francois louw | FLUENT | 2 | July 16, 2010 03:21 |
Heat Flux as a Profile Boundary Condition | Hitch8 | CFX | 2 | April 22, 2010 14:09 |
Wall Heat Flux not a listed variable | mike | CFX | 8 | February 5, 2009 14:32 |
Two-Phase Buoyant Flow Issue | Miguel Baritto | CFX | 4 | August 31, 2006 13:02 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 13, 2001 00:19 |