|
[Sponsors] |
February 5, 2014, 04:54 |
Boundary condition temerature profile
|
#1 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
Hello,
I have been working on transient analysis with considering the below code but I have strange results. is there anyone to help me to find my problem? (indeed I divide the temperature profile to some branches to get accurate fitting curve, that's why I have more than one equation in the code) Code:
/*********************************************************************** UDF example.c UDF for specifying transient temperature profile boundary condition S ************************************************************************/ #include "udf.h" #include "mem.h" DEFINE_PROFILE(TempS_Profile, thread, position) { real x[ND_ND]; real y; real t1=10019; real t2=13529; real t3=20009; real t4=29999; real t5=40019; real t6=50009; real t7=59999; real t8=70019; real t9=80009; real theProfile; face_t f; begin_f_loop(f, thread); { F_CENTROID(x,f,thread); y = CURRENT_TIME; if(y<=t1) { theProfile=(-2E-13*pow(y,3.))+(3E-08*pow(y,2.))+(9E-06*pow(y,1.))+283.78; F_PROFILE(f, thread, position) =theProfile; } else if (y<=t2 && y>t1) { theProfile=(1E-11*pow(y,3.))-(4E-07*pow(y,2.))+(0.0061*pow(y,1.))+257.77; F_PROFILE(f, thread, position) =theProfile; } else if (y<=t3 && y>t2) { theProfile=(-4E-11*pow(y,3.))+(2E-06*pow(y,2.))-(0.035*pow(y,1.))+482.71; F_PROFILE(f, thread, position) =theProfile; } else if (y<=t4 && y>t3) { theProfile=(4E-12*pow(y,3.))-(3E-07*pow(y,2.))+(0.0091*pow(y,1.))+203.7; F_PROFILE(f, thread, position) =theProfile; } else if (y<=t5 && y>t4) { theProfile=(-7E-12*pow(y,3.))+(7E-07*pow(y,2.))-(0.0233*pow(y,1.))+550.94; F_PROFILE(f, thread, position) =theProfile; } else if (y<=t6 && y>t5) { theProfile=(9E-12*pow(y,3.))-(1E-06*pow(y,2.))+(0.0575*pow(y,1.))+566.62; F_PROFILE(f, thread, position) =theProfile; } else if (y<=t7 && y>t6) { theProfile=(1E-12*pow(y,3.))-(2E-07*pow(y,2.))+(0.0094*pow(y,1.))+171.39; F_PROFILE(f, thread, position) =theProfile; } else if (y<=t8 && y>t7) { theProfile=(-6E-12*pow(y,3.))+(1E-06*pow(y,2.))-(0.0849*pow(y,1.))+2180.8; F_PROFILE(f, thread, position) =theProfile; } else if (y<=t9 && y>t8) { theProfile=(-1E-11*pow(y,3.))+(3E-06*pow(y,2.))-(0.2083*pow(y,1.))+5510.9; F_PROFILE(f, thread, position) =theProfile; } else { theProfile=(-6E-11*pow(y,3.))+(1E-05*pow(y,2.))-(1.2143*pow(y,1.))+33813; F_PROFILE(f, thread, position) =theProfile; } } end_f_loop(f,thread) } regards, |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 06:28 |
Velocity profile boundary condition | Tuca | FLOW-3D | 1 | April 23, 2013 12:02 |
No-slip condition for non-resolved boundary layer in open channel banks | Lupocci | Main CFD Forum | 1 | January 17, 2013 03:11 |
velocity profile inlet boundary condition question | Lcw | FLUENT | 3 | August 3, 2012 05:53 |
applying profile data as a boundary condition | vadivel | CFX | 1 | June 9, 2007 07:11 |