|
[Sponsors] |
Undefined error in compiling a very simple UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 23, 2022, 09:58 |
Undefined error in compiling a very simple UDF
|
#1 |
New Member
Alex
Join Date: Dec 2020
Posts: 15
Rep Power: 5 |
Hi everyone,
I am trying to code a UDF for the description of the temperature profile along y direction on a 2D inlet boundary (the complete problem is 3D). However, Fluent does not allow for its compilation. Here I report the code: #include "udf.h" DEFINE_PROPERTY(udftemp, thread, position) { real x[ND_ND]; face_t f; begin_f_loop(f,thread) { F_centroid(x,f,thread); F_profile(f,thread,position)=5.821025807385537e13* x[1]*x[1]*x[1]*x[1]*x[1]-9.546446063883939e11*x[1]*x[1]*x[1]*x[1]+5.490975226266506e9*x[1]*x[1]*x[1]-1.300480854457771e7*x[1]*x[1]+1.114523415740540e4*x[1]+3.013114570825730e2; } end_f_loop(f,thread) } I will apreciate your help in finding the error in this UDF. Best regards, K. |
|
March 31, 2022, 23:13 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
#include "udf.h" DEFINE_PROFILE(udftemp, thread, position) { real x[ND_ND]; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); F_PROFILE(f,thread,position)=5.821025807385537e13* x[1]*x[1]*x[1]*x[1]*x[1]-9.546446063883939e11*x[1]*x[1]*x[1]*x[1]+5.490975226266506e9*x[1]*x[1]*x[1]-1.300480854457771e7*x[1]*x[1]+1.114523415740540e4*x[1]+3.013114570825730e2; } end_f_loop(f,thread) }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
It would be wonderful if a tool for FoamToTecplot is available | luckyluke | OpenFOAM Post-Processing | 165 | November 27, 2012 07:54 |
OpenFOAM 1.6 ext - Compilation errors - Fedora 17(32bit) | toolpost | OpenFOAM Installation | 15 | September 21, 2012 10:38 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 01:35 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
Windows Installation BugsComments on Petrbs patch | brooksmoses | OpenFOAM Installation | 48 | April 16, 2006 01:20 |