|
[Sponsors] |
June 14, 2020, 16:55 |
Convection and heat flux boundary condition
|
#1 |
New Member
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 6 |
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 19:29. |
|
June 15, 2020, 07:00 |
Extra heat flux
|
#2 |
Senior Member
|
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. |
|
June 15, 2020, 11:21 |
Convection and heat flux boundary condition
|
#3 |
New Member
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 6 |
Thank you Vinerm. Should the heat flux be provided by giving wall thickness and heat generation? Or, is it through UDF using DEFINE_SOURCE?
|
|
June 15, 2020, 11:35 |
Heat Source
|
#4 |
Senior Member
|
Both should work fine. Try first with thin wall. If it doesn't work as expected, then you can apply cell based source terms
__________________
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. |
|
June 16, 2020, 11:21 |
Convection and heat flux boundary condition
|
#5 |
New Member
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 6 |
Thank you. I got it working.
|
|
August 12, 2022, 06:05 |
|
#6 |
New Member
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 4 |
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. |
|
August 15, 2022, 21:13 |
|
#7 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
put heat generation rate and wall thickness in convection tab, which will represent your heat flux
__________________
best regards ****************************** press LIKE if this message was helpful |
|
August 18, 2022, 02:12 |
|
#8 |
New Member
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 4 |
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? |
|
August 18, 2022, 02:33 |
|
#9 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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)
__________________
best regards ****************************** press LIKE if this message was helpful |
|
August 18, 2022, 02:36 |
|
#10 |
New Member
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 4 |
Ok, thanks mate
|
|
August 18, 2022, 11:10 |
|
#11 |
New Member
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 6 |
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. |
|
August 18, 2022, 11:32 |
|
#12 |
New Member
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 4 |
Ok thanks ymd, ill try and reply
|
|
August 19, 2022, 13:01 |
|
#13 |
New Member
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 4 |
(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 |
|
August 22, 2022, 02:42 |
|
#14 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
August 18, 2023, 09:28 |
Convection and radiation heat flux condition on rotating tube
|
#15 |
New Member
Gutu Birhanu
Join Date: Aug 2023
Posts: 4
Rep Power: 3 |
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.
|
|
August 20, 2023, 19:38 |
|
#16 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
August 21, 2023, 04:30 |
|
#17 |
New Member
Gutu Birhanu
Join Date: Aug 2023
Posts: 4
Rep Power: 3 |
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. |
|
August 21, 2023, 05:18 |
|
#18 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Applying convection as internal boundary condition? | evanJ | FLUENT | 4 | January 28, 2019 10:49 |
Constant Heat Flux Boundary Condition | NightWing | FLUENT | 0 | February 26, 2016 06:43 |
Problem in setting Boundary Condition | Madhatter92 | CFX | 12 | January 12, 2016 05:39 |
Natural Convection - Boundary Condition: Heat Flux = 0 | nobody_is_my_name | FLUENT | 0 | February 24, 2014 17:09 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |