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

Non linear heat source using UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2017, 10:29
Default Non linear heat source using UDF
  #1
New Member
 
Marco Reyes
Join Date: May 2017
Posts: 2
Rep Power: 0
mreyes9406 is on a distinguished road
Hi everybody,

I am trying to solve a steady state heat transfer problem in an axisymmetric solid region, but I need to add the source term "sinh(T)" so that the heat conduction equation has the form of that in the image I attached to this post. The source only depends on the local temperature. To add the term I built this UDF using a DEFINE_SOURCE macro, but when running the simulation, I get exactly the same result as if there were no "sinh(T)" term.


************************************************** **
UDF that adds heat source term sinh(temp) and derivative to solid
************************************************** ***

#include "udf.h"
#include "math.h"


DEFINE_SOURCE(sinh_heat_source, cell, thread, dS, eqn)
{
double source;
double temp = C_T(cell, thread);
source = sinh(temp);
dS[eqn] = cosh(temp);
return source;
}

Could you please let me know if you find any mistake in the code?

Thank you
Attached Images
File Type: png Captura de pantalla 2017-05-07 a la(s) 09.15.39.png (19.9 KB, 9 views)
mreyes9406 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
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 17:34
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 01:41
udf with moving heat source Ryan FLUENT 0 April 10, 2003 19:13


All times are GMT -4. The time now is 00:30.