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

Writing UDF for temperature derivative with respect to time

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2019, 02:30
Default Writing UDF for temperature derivative with respect to time
  #1
New Member
 
Jharkhand
Join Date: Aug 2019
Posts: 2
Rep Power: 0
nitan9 is on a distinguished road
Hi,
I need to write a UDF function in which the heat transfer coefficient is a function of Temperature and it should be application only for dT/dt >0.

For Eg.
DEFINE_PROFILE(convection,thread,position)
{
face_t f;
real fc[ND_ND];
real temp_con,h,dT/dt;

begin_f_loop(f,thread,)
{
temp_con=F_T(f,thread);
if ( dT/dt>0)
h = -0.5T+10
else if (dT/dt < 0)
h = 5T+0.1;
F_PROFILE(f,thread,position)=h;
}
end_f_loop(f,thread)
}

Thanks in advance
nitan9 is offline   Reply With Quote

Old   October 24, 2019, 21:30
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Dt/dt macro -> C_T_G(c,t) - temperature gradient vector

Note that you can access vector components of each of the variables listed in
Table: Macros for Cell Gradients Defined in mem.h by using the integer index [i] for each macro listed in Table: Macros for Cell Gradients Defined in mem.h.
For example, C_T_G(c,t)[i] will access a component of the temperature gradient vector

The solver continually removes data from memory that it does not need. In order to retain the
gradient data (when you want to set up user-defined scalar transport equations, for example), you can
prevent the solver from freeing up memory by issuing the text command solve/set/expert and
then answering yes to the question, “Keep temporary solver memory from being freed?”
Note that when you do this, all of the gradient data is retained, but the calculation requires more
memory to run.
nitan9 likes this.
__________________
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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 05:28
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03


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