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

heat flux dependent on two boundaries' temperature

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2022, 13:55
Default heat flux dependent on two boundaries' temperature
  #1
New Member
 
Yusef
Join Date: Aug 2022
Posts: 5
Rep Power: 4
Yong666 is on a distinguished road
Dear all, I'm new in Fluent and have little knowledge on udf and programming. I want to define heat fluxes on two parallel boudaries (like two parallel sides of a rectangle). The local heat fluxes are dependent on the corresponding local tempearatures of these boundaries. I came up with a udf as following:


#include "udf.h"
DEFINE_PROFILE(mfee, t, i)
{
face_t f;
Domain *d;
d=Get_Domain(1);
int ID = 4; /* id number of the other boundary zone */
Thread *thread1=Lookup_Thread(d,4);
begin_f_loop(f, t)
{
real t1=F_T(f, t);
real t2=F_T(f, thread1);
F_PROFILE(f,t,i)=-(exp(23.238-((3841/(t1-45))))-exp(23.238-((3841/(t2 - 45)))));
}
end_f_loop(f, t)
}

I'm using the same face index for both threads. I really don't know how the face index is stored (following certain direction? say x direction).

Please suggest any errors. Appreciate!
Yong666 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
Heat flux is not conserved across the boundaries tbhanderi OpenFOAM Running, Solving & CFD 3 May 27, 2020 02:55
Porous domain energy calculation and specific heat capacity temperature dependent Vishnu_bharathi CFX 9 November 29, 2017 14:24
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion faizan_habib7 CFX 4 February 1, 2016 18:00
Temperature and heat flux wall boundary condition L. Hamid FLUENT 2 February 10, 2014 00:59
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28


All times are GMT -4. The time now is 13:53.