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

Wrote my first udf but nothing happens

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 12, 2012, 23:07
Question Wrote my first udf but nothing happens
  #1
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 29
diamondx will become famous soon enough
Hello everyone,
I started learning UDF today, i created my first code. It's an easy source term that i apply on a SPECIFIC domain of fluid. the source is a x-momentum, here is my code:
Quote:
#include "udf.h"

DEFINE_SOURCE(test,c,t,dS,eqn)
{
real xc[ND_ND];
real source;

C_CENTROID(xc,c,t);

if ((xc[0] == -0.135608)&&(xc[1] == 0.179728))
{source = 1000;
dS[eqn] = 0;}
else {source = 0;dS[eqn] = 0;}
C_UDMI(c,t,0)=source;
return source;
}
The UDF is interpreted/compiled without any error. this udf applies a source in the location(x,y). I should see a change in the velocity vector, right ? nothing happens, why ? I'm trying to simulate plsma actuators and in all the article that i read, this same udf code is used...
__________________
Regards,
New to ICEM CFD, try this document --> https://goo.gl/KAOIwm
Ali
diamondx is offline   Reply With Quote

 


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
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 06:12
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
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 10:18.