CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   difference between Macro UDF & C programming UDF (https://www.cfd-online.com/Forums/fluent-udf/231634-difference-between-macro-udf-c-programming-udf.html)

Mohammad_Jamali November 12, 2020 09:33

difference between Macro UDF & C programming UDF
 
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

pakk November 12, 2020 10:29

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 November 12, 2020 10:56

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

pakk November 12, 2020 11:16

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.


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