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

Varying wall temperature boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2018, 14:27
Default Varying wall temperature boundary condition
  #1
New Member
 
Jahangir
Join Date: Aug 2017
Posts: 13
Rep Power: 9
mj2malik is on a distinguished road
I am simulating a 2D axisymetrical combustor. I have a boundary condition on the wall of the combustor for temperature, which is varying with length . the length (Y) of the combustor wall is 2.4 metres and temperature is in K.

please see the temperature variation in the attachment.

Can someone help me define these boundary conditions in ANSYS Fluent, either through GUI or through UDF.

Thanks
Attached Images
File Type: jpg wall temperature.JPG (24.9 KB, 36 views)
mj2malik is offline   Reply With Quote

Old   January 5, 2018, 06:17
Default
  #2
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
Hello
You can try to compile the following udf, I wrote quickly and didn't have time to verify it works. But basically, your UDF should look like this one.
Once you compiled it in Fluent, go to your boundary conditions panel, select the velocity inlet boundary you want to change, and set the velocity (x,y or z depending on your case) to udf inlet_velocity.
Hope this will help.
Good luck

#include "udf.h"

DEFINE_PROFILE(inlet_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
if (y>0 & y<=0.046)
{ F_PROFILE(f, thread, position) = 925; }
else if (y>0.046 & y<=0.553)
{ F_PROFILE(f, thread, position) = 358.88*y^2-54.615*y+925.6; }
else if (y>0.553 & y<=1.4)
{ F_PROFILE(f, thread, position) = -567.89*y^2+1115.1*y+564.02; }
else
{ F_PROFILE(f, thread, position) = 953; }
}
end_f_loop(f, thread)
}
annan is offline   Reply With Quote

Old   January 5, 2018, 13:04
Default
  #3
New Member
 
Jahangir
Join Date: Aug 2017
Posts: 13
Rep Power: 9
mj2malik is on a distinguished road
Thanks Annan for your help. I just want to clarify one thing, in your post you suggested to select inlet velocity.

Since I want to vary the wall temperature, should I go in the boundary condition panel and select wall and set the temperature in the thermal setting using new input parameter.

Your input will be highly appreciated.
mj2malik is offline   Reply With Quote

Old   January 5, 2018, 14:02
Default
  #4
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
My bad sorry, I thought it was a velocity inlet condition. In your case, you should implement it in "Boundary conditions => select your boundary => wall => thermal => select temperature" and then try to specify it as the UDF.
annan is offline   Reply With Quote

Old   January 6, 2018, 17:54
Default
  #5
New Member
 
Jahangir
Join Date: Aug 2017
Posts: 13
Rep Power: 9
mj2malik is on a distinguished road
Thank for your help. Just a quick question, in the UDF, what should i replace inlet_velocity with in the DEFINE_PROFILE(inlet_velocity, thread, position)

Should it be temperature or wall_temperature

Your input will be highly appreciated.
mj2malik is offline   Reply With Quote

Old   January 6, 2018, 17:59
Default
  #6
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
That is just the name of the udf so that you can recognize it in Fluent GUI. You can put whatever you want, it doesn’t really matter. Therefore, you may put temperature or wall_temperature, it’s really just a name.
annan is offline   Reply With Quote

Old   January 6, 2018, 18:18
Default
  #7
New Member
 
Jahangir
Join Date: Aug 2017
Posts: 13
Rep Power: 9
mj2malik is on a distinguished road
I have interpreted the file and i get the following error

line 16: invalid type for integral binary expression: double ^ double.

Line 16 in this case is
{ F_PROFILE(f, thread, position) = 358.88*y^2-54.615*y+925.6; }


Any suggestions how I can fix the error. Should I replace y^2 with y*y ?
mj2malik is offline   Reply With Quote

Old   January 7, 2018, 03:48
Default
  #8
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
Yes either put y*y or replace y^2 by pow(y,2)
annan is offline   Reply With Quote

Old   January 8, 2018, 14:08
Default
  #9
New Member
 
Jahangir
Join Date: Aug 2017
Posts: 13
Rep Power: 9
mj2malik is on a distinguished road
Now, I want to apply the same boundary condition for a horizontal combustor, where the wall boundary condition changes in the x-axis instead of y.

Should I swap the x and y in the udf ? Or do i need some additional changes ?

Please, see the attachment for more clarity.
Attached Images
File Type: jpg 2018-01-08 13.03.47.jpg (36.8 KB, 11 views)
mj2malik is offline   Reply With Quote

Old   January 8, 2018, 16:33
Default
  #10
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
In the udf I’ve written, x[ND_ND] is your domain. x[0] is the x-axis and x[1] is the y-axis. If you want to apply the same udf on a horizontal boundary, you just need to set y=x[0], which means that your condition statements will be set for x values.
Hope I was clear and that it will help
Let me know if you need more details
annan is offline   Reply With Quote

Old   January 9, 2018, 12:18
Default
  #11
New Member
 
Jahangir
Join Date: Aug 2017
Posts: 13
Rep Power: 9
mj2malik is on a distinguished road
Thanks alot. I really appreciate your help. it worked without any problem
mj2malik is offline   Reply With Quote

Old   January 12, 2018, 05:09
Default
  #12
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
My pleasure

Good luck
annan 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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 09:44
Low torque values on Screw Turbine Shaun Waters CFX 34 July 23, 2015 09:16
natural convection mehrdadeng CFX 10 February 25, 2011 06:25
Variable temperature wall boundary condition Virginie FLUENT 2 October 2, 2007 10:23


All times are GMT -4. The time now is 15:51.