CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Undefined error in compiling a very simple UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2022, 09:58
Default Undefined error in compiling a very simple UDF
  #1
New Member
 
Alex
Join Date: Dec 2020
Posts: 15
Rep Power: 5
Kerouac is on a distinguished road
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.
Kerouac is offline   Reply With Quote

Old   March 31, 2022, 23:13
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 18:12.