|
[Sponsors] |
March 8, 2021, 23:52 |
Temperature Gradient UDF file not compiling
|
#1 |
New Member
Join Date: Mar 2021
Posts: 15
Rep Power: 5 |
Hello,
I have a 2D spiral geometry and I am trying to calculate the temperature gradient along the wall. I have written a UDF code to calculate it but it is not getting compiled. Can anyone help me out here ? I am attaching my udf file here. Code:
#include "udf.h" DEFINE_ADJUST(tempgrad,d) { Thread *t; cell_t c; face_t f; thread_loop_c(t,domain) { begin_c_loop(c,t) { C_UDSI(c,t,0)=NV_Mag(C_T_G(c,t)); } end_c_loop(c,t) } } DEFINE_ON_DEMAND(store_gradient) { Domain *domain; cell_t c; Thread *t; domain=Get_Domain(1); thread_loop_c (t,domain) { begin_c_loop (c,t) { C_UDMI(c,t,0) = NV_MAG(C_UDSI_G(c,t,0)); } end_c_loop (c,t) } } Last edited by SugarOnichan; March 10, 2021 at 03:36. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam "Permission denied" and "command not found" problems. | iyidaniel@yahoo.co.uk | OpenFOAM Running, Solving & CFD | 11 | January 2, 2018 06:47 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 11:32 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 13:59 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 10:57 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 11:44 |