|
[Sponsors] |
Writing UDF for temperature derivative with respect to time |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 14, 2019, 02:30 |
Writing UDF for temperature derivative with respect to time
|
#1 |
New Member
Jharkhand
Join Date: Aug 2019
Posts: 2
Rep Power: 0 |
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 |
|
October 24, 2019, 21:30 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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.
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
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 |