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

UDF. as always.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2009, 08:49
Lightbulb UDF. as always.
  #1
DmP
New Member
 
DmP's Avatar
 
Try Ratov
Join Date: Dec 2009
Posts: 1
Rep Power: 0
DmP is on a distinguished road
Hi all!
I am going to gain an understanding of UDF format. The case is the simplest: 2D tube with an actuator disk model inside. I want to use a DEFINE_SOURCE option to add x-momentum source. The disk has been marked as a separate zone in GAMBIT (width X – 1 cell, height Y – 10 cells).
When I use a constant profile like:

#include "udf.h"

#define CON 100.0

DEFINE_SOURCE(cell_x_source, c, t, dS, eqn)
{
real x[ND_ND];
real source;

C_CENTROID(x, c, t);

source = CON;

dS[eqn] = 0;

return source;
}

Everything is fine.
But for a linear or parabolic profile like:

#include "udf.h"

DEFINE_SOURCE(xmom_source,c,t,dS,eqn)
{
real x[ND_ND];
real source, y;

C_CENTROID(x,c,t);
y = x[1];

source = 100. - 100.*((.7-y)/.5)*((.7-y)/.5);

dS[eqn] = 0.0;

return source;
}

It doesn’t work – profile is not parabolic after calculations. (y-coordinate changes from 0.2 to 1.2 ).
Could you help me with such stupid problem? Thanks!
DmP 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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 16:59.