|
[Sponsors] |
February 23, 2020, 00:33 |
How to write UDF
|
#1 |
Member
Join Date: Aug 2018
Posts: 85
Rep Power: 7 |
Hi everyone,
I am new to CFD. I am unable to understand coding written for ANSYS Fluent. I know C language but kindly anyone ca tell me what is equation written in following code. What is UDSI and when one can use G(c,t). Thank you! Or highr appreciable if provide some helping material. As I have udf manual of ANSYS but it is so confusing I do not know how to use that? source2 = eps*mu/tao/pow((1.-(C_UDSI(c,t,0)+C_UDSI(c,t,1))/L/L),2.0)*((1.-(C_UDSI(c,t,0)+C_UDSI(c,t,1))/L/L)*(C_UDSI_G(c,t,0)[0]+C_UDSI_G(c,t,2)[1])); source2 = source2+eps*mu/tao/pow((1.-(C_UDSI(c,t,0)+C_UDSI(c,t,1))/L/L),2.0)*(C_UDSI(c,t,0)*(C_UDSI_G(c,t,0)[0]+C_UDSI_G(c,t,1)[0])+C_UDSI(c,t,2)*(C_UDSI_G(c,t,0)[1]+C_UDSI_G(c,t,1)[1]))/L/L; dS[eqn] = 0.; |
|
February 23, 2020, 20:03 |
|
#2 |
Senior Member
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 407
Rep Power: 14 |
Hi esha
This is only two lines from the UDF. Can you please post the complete function? Regards, Svetlana |
|
February 24, 2020, 09:46 |
|
#3 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66 |
C_UDSI(c,t,i) is for accessing cell values for user-defined scalars
C_UDSI_G returns the gradient of the scalar |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 13:06 |
How to write UDF to evaluate mass fraction gradient? | mariam.sara | Fluent UDF and Scheme Programming | 0 | January 9, 2020 06:09 |
write code UDF Fluent solve kinetic reaction rate equation palm oil | zirkov | FLUENT | 0 | February 13, 2017 10:16 |
fluent udf problem: write specific data for every iteration in a file. | nnvoro | Fluent UDF and Scheme Programming | 1 | May 27, 2013 15:26 |
how to write a 3D linear temperature of UDF | venus | FLUENT | 1 | October 28, 2008 02:46 |