TAGGED: cfd-udf-fleunt, udf
-
-
April 29, 2025 at 7:02 am
s.sethuraman
SubscriberHi,Â
I want to run a line of cmd prompt inside my C UDF on iteration runtime in Fluent. Is it possible to do so?
Because I enconunter numerous errors while running iteration. So, I want to know if it is due to my UDF or if Fluent cannot interfere/access cmd.Â
Thanks in advance. :)
-
May 1, 2025 at 9:45 am
Rob
Forum ModeratorYou can use an embedded Scheme command in a UDF however it's not always a trivial operation. What are you trying to achieve?Â
-
May 1, 2025 at 9:55 am
s.sethuraman
SubscriberHi, Rob.Â
Thanks for the answer. I have already tried it but it didn't fully work.Â
The UDF is a DEFINE_SOURCE UDF. Inside the UDF, I want to run a custom Chemistry Calculator (coded in Python) which will take the C_Yi and C_T and return R_i. Since the Chemistry Calculator is in .py, I could not make it run (neither direct coupling inside UDF nor accessing it via cmd. I cannot write a PyUDF for chemistry source term as you have previously mentioned in another post, atleast not yet in 2025R1). The UDF struggles to get the output which is printed in the cmd window into Fluent Interface. Printing the output of cmd to temporary.txt and then asking the C UDF to read the .txt also fails for some reason.Â
So, I am currently rewriting the .py program into C :(Â
Any suggestions regarding these issues would be helpful :)
Thanks in advance.Â
-
May 1, 2025 at 10:14 am
Rob
Forum ModeratorFluent cpu doesn't have full Python UDFs, and Fluent gpu doesn't yet have all of the model hooks. Â
Some of the coupling functions (and Ansys software) let you link to an external library/code but if the chemistry solver is simple it may be better in the UDF for now.Â
-
- You must be logged in to reply to this topic.
-
3019
-
971
-
857
-
783
-
772
© 2025 Copyright ANSYS, Inc. All rights reserved.