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

Language for Fluent 6.3.26 UDF Compiler ??

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By BehzadNJ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2012, 01:12
Question Language for Fluent 6.3.26 UDF Compiler ??
  #1
Member
 
Join Date: Jul 2012
Posts: 48
Rep Power: 14
Abhya is on a distinguished road
HI there

I'm v v new to fluent...so plz help me folks!

Plz let me know which prg language and compiler (On win 7) I need to learn for writing an udf in Fluent version 6.3.26 and Ansys-Fluent 13 ..I have access to both of these versions.
I Googled for the same and I found out that its Visual C++ language and Microsoft Visual C++ compiler (on windows) that I need.
However when I checked out Ansys-Fluent 13.0 udf tuts I suspect the tuts code is in C (not in visual C++) ..
here is the CODE from the tut file on porous media:

Code:
/*******************************************************************/
/*                                                                 */
/* Position-Dependent Porous Media                                 */
/*                                                                 */
/*******************************************************************/

#include "udf.h"

DEFINE_SOURCE(xmom_source, cell, thread, dS, eqn)
{
const real c2=100.0;
real x[ND_ND];
real con, source;

C_CENTROID(x, cell, thread);
con = c2*0.5*C_R(cell, thread)*x[1];
source = - con*fabs(C_U(cell, thread))*C_U(cell, thread);
dS[eqn] = - 2.*con*fabs(C_U(cell, thread));
  
return source;
}
plz anyone who knows about this well help me out ..
I don't know much abt C and almost nothing abt visual c++

Any help is appreciated!!

Last edited by Abhya; October 31, 2012 at 01:35.
Abhya is offline   Reply With Quote

Old   October 31, 2012, 02:30
Thumbs down
  #2
New Member
 
Join Date: Aug 2012
Posts: 2
Rep Power: 0
BehzadNJ is on a distinguished road
Quote:
Originally Posted by Abhya View Post
HI there

I'm v v new to fluent...so plz help me folks!

Plz let me know which prg language and compiler (On win 7) I need to learn for writing an udf in Fluent version 6.3.26 and Ansys-Fluent 13 ..I have access to both of these versions.
I Googled for the same and I found out that its Visual C++ language and Microsoft Visual C++ compiler (on windows) that I need.
However when I checked out Ansys-Fluent 13.0 udf tuts I suspect the tuts code is in C (not in visual C++) ..
here is the CODE from the tut file on porous media:

Code:
/*******************************************************************/
/*                                                                 */
/* Position-Dependent Porous Media                                 */
/*                                                                 */
/*******************************************************************/

#include "udf.h"

DEFINE_SOURCE(xmom_source, cell, thread, dS, eqn)
{
const real c2=100.0;
real x[ND_ND];
real con, source;

C_CENTROID(x, cell, thread);
con = c2*0.5*C_R(cell, thread)*x[1];
source = - con*fabs(C_U(cell, thread))*C_U(cell, thread);
dS[eqn] = - 2.*con*fabs(C_U(cell, thread));
  
return source;
}
plz anyone who knows about this well help me out ..
I don't know much abt C and almost nothing abt visual c++

Any help is appreciated!!
There isn't much difference between C and C++ , you can start learning one of them and then you can code in the other one too, and compiler doesn't matter , you can even compile with borland C++ or RAD Studio , the important thing is to have a good and working compiled files. that's all

Best Regards
Abhya likes this.
BehzadNJ 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
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
udf fluent 6.3.26 don't work in fluent 12 enry Fluent UDF and Scheme Programming 16 September 9, 2010 03:44
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
UDF for enthalpy in Fluent 6.3.26 Tanmay Dutta FLUENT 0 December 4, 2008 09:00
C++ Compiler for UDF Dmitriy Makarov FLUENT 1 December 12, 2000 03:41


All times are GMT -4. The time now is 17:00.