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

UDF of temperature at wall (fluent B.C)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Jerol
  • 1 Post By MayTheFlowBeWithYou

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2017, 18:51
Smile UDF of temperature at wall (fluent B.C)
  #1
New Member
 
Jerol Soibam
Join Date: Aug 2017
Posts: 2
Rep Power: 0
Jerol is on a distinguished road
Hello Everyone,

I am relatively new with UDF concept in fluent. So, kindly help me.

I want to impose a variable temperature along the wall (x-axis) which varies linearly (493 K to 473 K) and I want the temperature to reduce to 298 k after an hour. So, I went and wrote this code, but I am not sure if this is the correct way. Kindly, correct me if this is wrong.

Thank you \

Code:

#include "udf.h"

DEFINE_PROFILE(temp, thread, position)
{
face_t f;
real x;
real t = CURRENT_TIME;

begin_f_loop(f, thread)
{
x = F_T(f,thread);
if (t<3600)
F_PROFILE(f, thread, position) = 493 - 66.667 * x;

else

F_PROFILE(f, thread, position) = 298;
}
end_f_loop(f, thread)
}
Oula likes this.
Jerol is offline   Reply With Quote

Old   August 14, 2017, 06:59
Default
  #2
Member
 
MayTheFlowBeWithYou's Avatar
 
I have to remain anonymous, I'm sorry.
Join Date: Jun 2017
Location: The Netherlands, Delft University of Technology
Posts: 48
Rep Power: 9
MayTheFlowBeWithYou is on a distinguished road
It's almost correct:

#include "udf.h"

DEFINE_PROFILE(temp, thread, position)
{
face_t f;
real x;
real t = CURRENT_TIME;

begin_f_loop(f, thread)
{
x = F_T(f,thread);

if (t<3600){
F_PROFILE(f, thread, position) = 493 - 66.667 * x;
}
else
{
F_PROFILE(f, thread, position) = 298;
}
}
end_f_loop(f, thread)
}
Oula likes this.
__________________
MayTheFlowBeWithYou is offline   Reply With Quote

Old   October 3, 2018, 14:57
Default
  #3
Member
 
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11
Oula is on a distinguished road
Dear Jerol and MayTheFlowBeWithYou

Thank you for sharing these codes, in my case I need to inject a certain amount of gas flow rate through an inlet pipe, the injection of the gas is periodic during the simulation i.e. same amount of gas flow rate to be injected every one hour of the physical flow time. Do you know how can I code a UDF for this case

Any help is appreciated.
Oula is offline   Reply With Quote

Old   March 15, 2019, 09:55
Default coupling temperature variation with fluid flow
  #4
Member
 
Join Date: Oct 2017
Posts: 52
Rep Power: 9
gouravjee is on a distinguished road
Quote:
Originally Posted by MayTheFlowBeWithYou View Post
It's almost correct:

#include "udf.h"

DEFINE_PROFILE(temp, thread, position)
{
face_t f;
real x;
real t = CURRENT_TIME;

begin_f_loop(f, thread)
{
x = F_T(f,thread);

if (t<3600){
F_PROFILE(f, thread, position) = 493 - 66.667 * x;
}
else
{
F_PROFILE(f, thread, position) = 298;
}
}
end_f_loop(f, thread)
}
Hii All,
I have been working on a heat exchanger problem in which the molten metal kept stationary in outer shell of a concentric tube and a fluid is flowing in the inner tube.
I am using UDS scalars to define temperature and velocity but results do not show any variation in temperature profile of fluid part(even if flow is there) and remains same as the stationary fluid
kindly provide me some hint regarding this problem

Thanks in Advance
gouravjee is offline   Reply With Quote

Reply


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
define wall functions (UDF) in Fluent 6.3 Alex FLUENT 6 August 3, 2017 08:45
Is wall ajacent temperature equal to conservative temperature of the wall? shenying0710 CFX 8 January 4, 2013 05:03
Inlet won't apply UDF and has temperature at 0K! tccruise Fluent UDF and Scheme Programming 2 September 14, 2012 07:08
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


All times are GMT -4. The time now is 19:09.