CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to write UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2020, 00:33
Default How to write UDF
  #1
Member
 
Join Date: Aug 2018
Posts: 85
Rep Power: 7
esha is on a distinguished road
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.;
esha is offline   Reply With Quote

Old   February 23, 2020, 20:03
Default
  #2
Senior Member
 
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 407
Rep Power: 14
Светлана is on a distinguished road
Hi esha


This is only two lines from the UDF. Can you please post the complete function?


Regards,
Svetlana
Светлана is offline   Reply With Quote

Old   February 24, 2020, 09:46
Default
  #3
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
C_UDSI(c,t,i) is for accessing cell values for user-defined scalars
C_UDSI_G returns the gradient of the scalar
LuckyTran 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
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


All times are GMT -4. The time now is 23:33.