CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > 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 Search this Thread Display Modes
Old   September 24, 2013, 05:22
Default udf temperature
  #1
Member
 
rayan
Join Date: Jun 2013
Posts: 65
Rep Power: 12
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, 16:13
Default
  #2
New Member
 
kornetka's Avatar
 
Join Date: Jun 2013
Posts: 15
Rep Power: 12
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, 09:57
Default
  #3
Member
 
rayan
Join Date: Jun 2013
Posts: 65
Rep Power: 12
rayan24 is on a distinguished road
Yes! good

Thanks
rayan24 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for Temperature Dependent Energy Source er.mkumar Fluent UDF and Scheme Programming 9 March 14, 2024 05:01
UDF temperature profile asal Fluent UDF and Scheme Programming 67 August 7, 2018 13:41
UDF slip and temperature jump from IFRT abir Fluent UDF and Scheme Programming 1 July 30, 2012 06:44
UDF or any approach for Bulk Temperature calculation vemps FLUENT 0 May 1, 2009 02:09
UDF reading the temperature gradient Fabian FLUENT 1 May 29, 2003 21:18


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