CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

udf temperature

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

Like Tree1Likes
  • 1 Post By kornetka

Reply
 
LinkBack Thread Tools Display Modes
Old   September 24, 2013, 04:22
Default udf temperature
  #1
Member
 
rayan
Join Date: Jun 2013
Posts: 65
Rep Power: 4
rayan24 is on a distinguished road
Hi,

I want to impose a different temperature a different time, i want to impose 700K between t=0 and t=10s and T=400 K between t=10s and t=50s, can you see this udf and suggest me a correction, please?

Code:
#include "udf.h"
DEFINE_PROFILE(inlet_temperature,t,i)

{
real x[ND_ND];
real r;
face_t f;
real dt=CURRENT_TIME;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);

if ( dt <= 10)
F_PROFILE(f,t,i) =700;
}

if (10 < dt <= 50)

    F_PROFILE(f,t,i) =400;
end_f_loop(f,t)
}
rayan24 is offline   Reply With Quote

Old   September 24, 2013, 15:13
Default
  #2
New Member
 
kornetka's Avatar
 
Join Date: Jun 2013
Posts: 15
Rep Power: 4
kornetka is on a distinguished road
Hi,
two things I noticed:
1. Try changing the 2nd if statement into conjuction of conditions, i.e.
Code:
10 < dt && dt <= 50
2. I think that values for both cases (F_PROFILE=...) should be inside the face loop.
Hope this helps,
Regards, kornetka
rayan24 likes this.
kornetka is offline   Reply With Quote

Old   September 25, 2013, 08:57
Default
  #3
Member
 
rayan
Join Date: Jun 2013
Posts: 65
Rep Power: 4
rayan24 is on a distinguished road
Yes! good

Thanks
rayan24 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF temperature profile asal Fluent UDF and Scheme Programming 59 June 23, 2015 08:49
UDF for Temperature Dependent Energy Source er.mkumar Fluent UDF and Scheme Programming 6 January 19, 2013 09:31
UDF slip and temperature jump from IFRT abir Fluent UDF and Scheme Programming 1 July 30, 2012 05:44
UDF or any approach for Bulk Temperature calculation vemps FLUENT 0 May 1, 2009 01:09
UDF reading the temperature gradient Fabian FLUENT 1 May 29, 2003 20:18


All times are GMT -4. The time now is 02:45.