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

difference between Macro UDF & C programming UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2020, 10:33
Default difference between Macro UDF & C programming UDF
  #1
New Member
 
Mohammad Jamali
Join Date: Oct 2020
Posts: 6
Rep Power: 6
Mohammad_Jamali is on a distinguished road
Hi
i am new be In udf Writing , recently after reading ansys lectures about udf writing some question come in mind !
1: what is different between Macro UDF and C programming UDF Structure ,
for example if i write code in C programming, should use Fluent Function Such
C_R(C,t) For define density or could another type ?

2:if i use fluent function in C programming udf structure how define Fluent library to compiler ?

Thank you for respond and help
Mohammad_Jamali is offline   Reply With Quote

Old   November 12, 2020, 11:29
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
1. I don't understand the question. Fluent's density is C_R, so if you want to interact with it, use that name. I find it hard to imagine what other possibilities you are thinking about...
2. In the same way in both cases. #INCLUDE
Mohammad_Jamali likes this.
pakk is offline   Reply With Quote

Old   November 12, 2020, 11:56
Default
  #3
New Member
 
Mohammad Jamali
Join Date: Oct 2020
Posts: 6
Rep Power: 6
Mohammad_Jamali is on a distinguished road
Hi ,
I am thankful For attention to question.
if I want Write Code in C , i can define D as Density Parameter and i don't need to use C_R(c,t) function in compiler , also if i define C_R(c,t) Need to define Fluent Library in Compiler data base for Run it , Now My Question is here , if i use Fluent library and Code such functions and etc. , in Program and udf body structure , compiler never distingue that functions on the other hand if I use sample Parameter ( D = C_R ) , how define D as Density in Fluent ?
may be share a sample Code For C programming UDF ?
thank you
Mohammad_Jamali is offline   Reply With Quote

Old   November 12, 2020, 12:16
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
I don't understand your problem.

If you are able to use D for density in your code, you are also able to type C_R instead. Why don't you just do that?

And I don't understand what code sample you are asking for. ALL fluent UDFs are in c. Maybe you should give a code sample of what you are trying to do, that might clarify things.
pakk is offline   Reply With Quote

Reply

Tags
#udf_structure


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
Error while initializing a problem with a multi macro udf Sorabh Fluent UDF and Scheme Programming 2 November 2, 2018 00:30
Basic Absorption Coefficients for UDF macro DEFINE_WSGGM_ABS_COEFF moeinvh FLUENT 0 March 21, 2018 11:49
how to write an UDF programming in 3D coolyihao FLOW-3D 1 March 16, 2009 09:59
need help whith hooking UDF and DEFINE_INIT macro cax FLUENT 3 June 6, 2006 13:35
difference between udf compiled and udf interprete chandra sekhar FLUENT 2 April 11, 2006 01:04


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