|
[Sponsors] |
May 9, 2017, 08:41 |
Enthalpy calculated from DEFINE_SPECIFIC_HEAT macro-doubt
|
#1 |
New Member
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9 |
Dear friends,
Below is an excerpt from Fluent manual. "The UDF must return the real value of the specific heat, and set the sensible enthalpy to the value referenced by the real pointer h. The entropy is calculated by Fluent as S=Cp(Tmean)*log(T/Tref) , where Cp is computed by the UDF at Tmean, the logarithmic average of T and Tref". 2.3.31.3. Example /************************************************** ******************** UDF that computes specific heat and sets the sensible enthalpy to the referenced value ************************************************** *********************/ #include "udf.h" DEFINE_SPECIFIC_HEAT(my_user_cp, T, Tref, h, yi) { real cp=2000.; *h = cp*(T-Tref); return cp; } " This is as per Fluent UDF User Manual. If cp is computed at Tmean, what does "real cp=2000.;" mean? It is as if we are setting Cp at 2000J/(kg.K). I got confused. Since specific heat macro is already called from within a loop, this will automatically set the Cp value at all cells to be 2000J/(kg.K), right? Then what is the meaning of above statement? I do not know whether I am interpreting it wrongly. I have few more doubts. I will list those. 1.How the macro works? 2.What is the definition of h("enthalpy") in fluent? It seems to be different from the text book definition. 3.What is the reference temp to be given? 4.Is it absolutely necessary that the Cp macro must be compiled (so given in manual)? I do not have visual studio to compile. My Cp udf got interpreted nicely but do not know if it works fine inernally. Sorry for the long message. I could not help it since no details are given in manual. Please direct me friends. Last edited by anuarun; May 10, 2017 at 05:54. Reason: To add more details |
|
May 9, 2017, 08:48 |
|
#2 |
New Member
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9 |
posted by mistake
Last edited by anuarun; May 10, 2017 at 05:49. |
|
June 24, 2017, 12:02 |
|
#3 |
Member
NGP
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
||
June 26, 2017, 03:29 |
|
#4 |
New Member
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9 |
I did not find answer to these fundamental questions yet, though I managed to solve my actual problem of writing the temperature and property UDFs!
If you know, Please tell me so that I can add it to the knowledge repository |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
timestep extraction for macro | manuc | Tecplot | 0 | August 10, 2016 13:20 |
Doubt about F_FLUX(f,tf) macro & VOF ?!!!!!!!! | asghari | FLUENT | 2 | October 28, 2012 04:03 |
Macro problem | cfddummy | Siemens | 1 | April 9, 2007 13:37 |
Doubt Regarding macro calculator option in CFX | Sridevi | CFX | 0 | December 21, 2005 04:55 |
Call a macro from a macro | Flav | Siemens | 2 | July 1, 2004 06:42 |