|
[Sponsors] |
May 7, 2017, 10:29 |
Non linear heat source using UDF
|
#1 |
New Member
Marco Reyes
Join Date: May 2017
Posts: 2
Rep Power: 0 |
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 |
|
|
|
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 |