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

Convection and heat flux boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By vinerm
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ
  • 1 Post By ymd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2020, 15:55
Default Convection and heat flux boundary condition
  #1
ymd
New Member
 
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 5
ymd is on a distinguished road
Hi, I am performing a heat loss simulation of skin tissue. I have to apply convection, radiation, and evaporation boundary conditions to the outer skin surface. For evaporation, I have heat flux value. I was able to apply convection and radiation boundary values through mixed boundary condition. How can I add heat flux to the same surface? Is there a UDF macro for such an additional boundary condition. Help will be much appreciated.

Last edited by ymd; June 14, 2020 at 18:29.
ymd is offline   Reply With Quote

Old   June 15, 2020, 06:00
Default Extra heat flux
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
You cannot do that directly. However, you can implement the known heat flux as a heat source.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   June 15, 2020, 10:21
Default Convection and heat flux boundary condition
  #3
ymd
New Member
 
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 5
ymd is on a distinguished road
Thank you Vinerm. Should the heat flux be provided by giving wall thickness and heat generation? Or, is it through UDF using DEFINE_SOURCE?
ymd is offline   Reply With Quote

Old   June 15, 2020, 10:35
Default Heat Source
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Both should work fine. Try first with thin wall. If it doesn't work as expected, then you can apply cell based source terms
ymd likes this.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   June 16, 2020, 10:21
Default Convection and heat flux boundary condition
  #5
ymd
New Member
 
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 5
ymd is on a distinguished road
Thank you. I got it working.
ymd is offline   Reply With Quote

Old   August 12, 2022, 05:05
Default
  #6
New Member
 
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 3
GreyMat is on a distinguished road
ymd, I am new in C language, can you please guide me how to add convection and heat flux boundary condition on same wall. thank you

Can you please provide the C code for heat flux.
GreyMat is offline   Reply With Quote

Old   August 15, 2022, 20:13
Default
  #7
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
put heat generation rate and wall thickness in convection tab, which will represent your heat flux
GreyMat likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   August 18, 2022, 01:12
Default
  #8
New Member
 
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 3
GreyMat is on a distinguished road
Thanks AlexanderZ, I am aware about wall thickness and heat generation.

But can you provide the C language (UDF) for adding heat flux at a particular wall?
GreyMat is offline   Reply With Quote

Old   August 18, 2022, 01:33
Default
  #9
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
I don't know the way, how you can apply heat flux and convection directly
UDF allows you to modifiy heat source according to your needs, but you still should hook it, and ther is no other option accept heat source and wall thickness (at least I don't know)
GreyMat likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   August 18, 2022, 01:36
Default
  #10
New Member
 
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 3
GreyMat is on a distinguished road
Ok, thanks mate
GreyMat is offline   Reply With Quote

Old   August 18, 2022, 10:10
Default
  #11
ymd
New Member
 
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 5
ymd is on a distinguished road
One way to do it is by using DEFINE_PROFILE macro. Here is an example code:

#include "udf.h"

#define heat_flux 40 //Unit W/m2
#define convection 10 //Unit W/m2 K
#define Temp 298.15 //Unit K (25 deg C)
DEFINE_PROFILE(wallbc,thread,i)
{

face_t f;

begin_f_loop(f,thread)
F_PROFILE(f,thread,i) = -heat_flux + convection*(Temp-F_T(f,thread));
end_f_loop(f,thread)
}
Hope it works.
GreyMat likes this.
ymd is offline   Reply With Quote

Old   August 18, 2022, 10:32
Default
  #12
New Member
 
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 3
GreyMat is on a distinguished road
Ok thanks ymd, ill try and reply
GreyMat is offline   Reply With Quote

Old   August 19, 2022, 12:01
Default
  #13
New Member
 
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 3
GreyMat is on a distinguished road
(AlexanderZ and ymd)
-I have attached a UDF which define heat flux and convection boundary condition at same wall
- But ANSYS give me SIGSEGV error and fluent suddenly closed.
- Can you please provide me any solution or changes within the UDF, thank you
-please check the attached files
Attached Images
File Type: jpg IMG_20220819_212830.jpg (55.7 KB, 18 views)
File Type: jpg heat flux.jpg (29.0 KB, 18 views)
GreyMat is offline   Reply With Quote

Old   August 22, 2022, 01:42
Default
  #14
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
change the name of the function
DEFINE_PROFILE(name_of_the_function,thread,i)

it must be different from names of variables, you are using
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   August 18, 2023, 08:28
Exclamation Convection and radiation heat flux condition on rotating tube
  #15
New Member
 
Gutu Birhanu
Join Date: Aug 2023
Posts: 4
Rep Power: 2
guti is on a distinguished road
I want to apply heat flux on rotating tube with convection and radiation. Already, I have created my first UDF for stationary tube and faced big problem with rotating one. One thing, I do not understand how to read the face wall temperature and other I could not able to locate point where the heat flux gonna to be applied. Can I combine DEFINE_ZONE_MOTION and DEFINE_PROFILE macros or which one can I use for the problem? Can anyone help me? Please tell me how can I proceed it? Thank you for your cooperation.
guti is offline   Reply With Quote

Old   August 20, 2023, 18:38
Default
  #16
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
EFINE_ZONE_MOTION and DEFINE_PROFILE macros could be used inside one UDF
they are independent from each other
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   August 21, 2023, 03:30
Default
  #17
New Member
 
Gutu Birhanu
Join Date: Aug 2023
Posts: 4
Rep Power: 2
guti is on a distinguished road
Ok thanks for your reply.

So, Can I do like this?

#include"udf.h"
#include"mem.h"
#define sigma 5.6697*10^-8
#define epsilon 0.1
#define H_air 8.52 /* convective heat transfer coefficient*/
#define T_air 298
#define T_sky 278
#define R 0.0147 /*internal radius of the tube*/
DEFINE_ZONE_MOTION(rotation,axis,origin,vel,omega, time,dtime)
{

vel[0]=0.0;/* reset velocities */
vel[1]=0.0;
vel[2]=0.0025;

omega[0]=0.0;
omega[1]=0.0;
omega[2]=0.52;

N3V_D (axis, =, 3.0,3.0,3.0);
N3V_S (origin, =,2.0);
}

DEFINE_PROFILE(heat_flux,thread,i)
real x[ND_ND];/* this will hold the position vector*/
real y;
real z;
real r;

begin_f_loop (f,t)
{
c0=F_C0(f,t);
t0=THREAD_T0(t);
T_abs=F_T(f,t);

F_CENTROID(x,f,t);
y=x[1];
z=x[2];
r=z/sqrt((z*z)+(y*y));

F_PROFILE(f,t,i)= (1408*r)-(F_T(f,t)-T_air)-(0.1*0.000000056697)*(pow(F_T(f,t),4)-pow(T_sky,4));
}

end_f_loop(f,t)
}

or how can I just proceed? please show me the way.
guti is offline   Reply With Quote

Old   August 21, 2023, 04:18
Default
  #18
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
compile code, read log, fix error if any

then you need to apply functions to corresponding faces
select surface of your interest -> boundary conditions -> heat flux -> select your udf

for more information read ansys fluent customization manual
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ 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
Applying convection as internal boundary condition? evanJ FLUENT 4 January 28, 2019 09:49
Constant Heat Flux Boundary Condition NightWing FLUENT 0 February 26, 2016 05:43
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 04:39
Natural Convection - Boundary Condition: Heat Flux = 0 nobody_is_my_name FLUENT 0 February 24, 2014 16:09
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


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