|
[Sponsors] |
udf function to plot contours of a defined function |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 2, 2018, 04:09 |
udf function to plot contours of a defined function
|
#1 |
New Member
Davide Concu
Join Date: May 2018
Posts: 4
Rep Power: 7 |
Dear all,
I am new with the use of udf and with C programming. I am trying to define a function to plot the value of the blending function F2 of the k omega SST. I am not really sure about the DEFINE function to use so this is one of my (unsuccessful) try. It does compile in fluent but whenever I try to plot it on a plane the value is constantly 0 everywhere. I define one UDM to save the variable. Can someone please point me to the issue? Thanks a lot #include "udf.h" DEFINE_SOURCE(f_1,c,t,dS,eqn) { real s1,s2,s3,s4; real source; s1 = 2*sqrt(C_K(c,t))/(0.09*C_WALL_DIST(c,t)*MAX(C_O(c,t),1.e-10)); s2 = 500*C_MU_L(c,t)/(C_R(c,t)*(C_WALL_DIST(c,t))*(C_WALL_DIST(c,t))*MA X(C_O(c,t),1.e-10)); s3 = MAX(s1,s2); s4 = (s3*s3); source = s4; C_UDMI(c,t,0) = source; return source; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 11:04 |
Can i take contours from Custom field function i defined ? | rahulohlan | FLUENT | 3 | April 18, 2017 13:39 |
Not able to use Interpreted in User Defined Function (UDF) | Touré | FLUENT | 0 | March 8, 2017 19:15 |
[swak4Foam] installation problem with version 0.2.3 | Claudio87 | OpenFOAM Community Contributions | 9 | May 8, 2013 10:20 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |