# temperature profile variation -UDF

 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 3, 2013, 04:57 temperature profile variation -UDF #1 Senior Member   Moha Join Date: Mar 2013 Location: EU Posts: 103 Rep Power: 0 Does fluent allow the external temperature function to be defined "by branches": i.e. one equation for 010000s for example. This way, the fitting would become much easier with distinct equations for distinct branches of time… I have this code but it has only one fitting curve equation, while I have two equations for distinct times. how to do this ? Code: ```/*********************************************************************** udfexample.c UDF for specifying transient temperature profile boundary condition ************************************************************************/ #include "udf.h" #include "mem.h" DEFINE_PROFILE(Temp_Profile, thread, position) { real x[ND_ND]; real y; real theProfile; face_t f; begin_f_loop(f, thread); { F_CENTROID(x,f,thread); y = CURRENT_TIME; theProfile=(283.7656)+25.44573*exp(-0.5*((y-49657.42)*(y-49657.42)/(11529.66*11529.66))); F_PROFILE(f, thread, position) =theProfile; } end_f_loop(f,thread) }``` regards,

June 10, 2013, 14:11
#2
New Member

ousegui
Join Date: Oct 2010
Posts: 18
Rep Power: 6
Quote:
 Originally Posted by ahvz Code: ```/*********************************************************************** udfexample.c UDF for specifying transient temperature profile boundary condition ************************************************************************/ #include "udf.h" #include "mem.h" DEFINE_PROFILE(Temp_Profile, thread, position) { real x[ND_ND]; real y; real t1; //time whre your equation profile changes real theProfile; face_t f; begin_f_loop(f, thread); { F_CENTROID(x,f,thread); y = CURRENT_TIME; if(y

 June 10, 2013, 15:10 #3 Senior Member   Moha Join Date: Mar 2013 Location: EU Posts: 103 Rep Power: 0 thank you very much

 June 17, 2013, 19:07 #4 Senior Member   Moha Join Date: Mar 2013 Location: EU Posts: 103 Rep Power: 0 I tried to change the domain of my temperature profile by defining time limits: but the results are very strange. is the code written properly ? Code: ```/*********************************************************************** udfexample.c UDF for specifying transient temperature profile boundary condition ************************************************************************/ #include "udf.h" #include "mem.h" DEFINE_PROFILE(Temp_Profile, thread, position) { real x[ND_ND]; real y; real t1=32399; real t2=89999; real t3=118799; real theProfile; face_t f; begin_f_loop(f, thread); { F_CENTROID(x,f,thread); y = CURRENT_TIME; if(y<=t1) theProfile=(-3e-12*pow(y,3.))+(1e-7*pow(y,2.))-(-0.0004*pow(y,1.))+(282.08); F_PROFILE(f, thread, position) =theProfile; { if(t1t3) theProfile=(-4e-13*pow(y,3.))-(2e-7*pow(y,2.))-(0.0301*pow(y,1.))+1881.6; F_PROFILE(f, thread, position) =theProfile; } } end_f_loop(f,thread) }``` regards,

 July 23, 2013, 07:55 #5 Member   sooraj Join Date: Dec 2012 Posts: 38 Rep Power: 4 hi I need a udf for a work.I'm quite new in this area, so i really need your help. i need a linear varying temperature profile boundary condition to be applied on a circular face of a cylinder. temperature varies from 25 to 50 degrees from bottom to top of circle. diameter of circle is 470 mm . can you please help???

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Zaqie Fluent UDF and Scheme Programming 8 May 11, 2014 08:34 mohammadkm Fluent UDF and Scheme Programming 19 December 24, 2013 23:42 immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27 Shashikant FLUENT 0 June 24, 2006 03:16 sivakumar FLUENT 5 November 24, 2002 01:58

All times are GMT -4. The time now is 14:28.