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

Needed guidance to write my own UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2019, 17:29
Post Needed guidance to write my own UDF
  #1
New Member
 
kailash
Join Date: Jun 2018
Posts: 15
Rep Power: 4
kailash007 is on a distinguished road
Hi Everyone!

I am new to UDF in fluent and I desire to learn and be proficient in writing UDF codes. I have basic knowledge in C. Can anyone suggest me a good place to start learning UDF coding? I started with the UDF manual published by ANSYS which has some examples with UDF codes but it seems like I am not making much progress or at the pace I wish to understand.

Thanks and Regards,
Kailash kuppuraju
kailash007 is offline   Reply With Quote

Old   April 16, 2019, 21:23
Default
  #2
Senior Member
 
Join Date: Feb 2010
Posts: 164
Rep Power: 13
gearboy is on a distinguished road
Quote:
Originally Posted by kailash007 View Post
Hi Everyone!

I am new to UDF in fluent and I desire to learn and be proficient in writing UDF codes. I have basic knowledge in C. Can anyone suggest me a good place to start learning UDF coding? I started with the UDF manual published by ANSYS which has some examples with UDF codes but it seems like I am not making much progress or at the pace I wish to understand.

Thanks and Regards,
Kailash kuppuraju
Just read the manual several times(should know basic macros and where to find them) and do some practice. If having questions, go back to manual examples. And some ANSYS udf seminar ppt also helps. No other ways.
gearboy is offline   Reply With Quote

Old   April 18, 2019, 23:29
Default
  #3
New Member
 
kailash
Join Date: Jun 2018
Posts: 15
Rep Power: 4
kailash007 is on a distinguished road
Thanks "gearboy". I am doing the same. It is apparently taking a lot of time. I am using this link to learn: https://www.sharcnet.ca/Software/Ans...f/flu_udf.html . I hope this helps someone who wants to learn the UDF's. But its quite a lot of MACRO's which makes me think if I will be ever be using all those.
kailash007 is offline   Reply With Quote

Old   April 20, 2019, 09:02
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,465
Rep Power: 20
pakk will become famous soon enough
Start with a concrete problem. Something that you can solve with a UDF. Then, solve it.

You learn the most by just doing it. You will undoubtedly make mistakes, and learn from them. Reading the manual a few times is useless if you never try it yourself.
pakk is offline   Reply With Quote

Old   April 21, 2019, 10:19
Default
  #5
New Member
 
kailash
Join Date: Jun 2018
Posts: 15
Rep Power: 4
kailash007 is on a distinguished road
Thanks Pakk. Yes, I am doing that. I got stuck up in compiling the UDF. I am trying to figure that out. I searched online for a solution to my problem. Apparently, a correct version of Visual Studio is needed to compile the UDF codes it seems. I am using ANSYS Fluent 19.2.0 and Visual Studio 19 doesn't seem to work for me.
kailash007 is offline   Reply With Quote

Old   April 21, 2019, 17:14
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,465
Rep Power: 20
pakk will become famous soon enough
You linked to an online Fluent manual for version 15.0.7.
You are working with Fluent version 19.2.0.

Why would you use an outdated manual?

Just open the Fluent manual that comes with your installation of Fluent, and look there how to configure everything.
pakk is offline   Reply With Quote

Old   April 23, 2019, 22:04
Default
  #7
New Member
 
kailash
Join Date: Jun 2018
Posts: 15
Rep Power: 4
kailash007 is on a distinguished road
Thanks a lot Pakk. I don't know why I really didn't think about this. Got the latest one to use.
kailash007 is offline   Reply With Quote

Old   April 24, 2019, 04:05
Default
  #8
Senior Member
 
Join Date: Feb 2010
Posts: 164
Rep Power: 13
gearboy is on a distinguished road
Quote:
Originally Posted by kailash007 View Post
Thanks "gearboy". I am doing the same. It is apparently taking a lot of time. I am using this link to learn: https://www.sharcnet.ca/Software/Ans...f/flu_udf.html . I hope this helps someone who wants to learn the UDF's. But its quite a lot of MACRO's which makes me think if I will be ever be using all those.
Just generic Macros you need to know, such as DEFINE_PROFILE, DEFINE_INIT, DEFINE_AT_ADJUST, etc.

And basic macros that access Fluent data, such as C_T, C_P, C_CENTROID
And basic marcos loop over cells, faces. thread_loop_c,....
gearboy is offline   Reply With Quote

Old   April 24, 2019, 15:36
Default
  #9
New Member
 
kailash
Join Date: Jun 2018
Posts: 15
Rep Power: 4
kailash007 is on a distinguished road
Quote:
Originally Posted by gearboy View Post
Just generic Macros you need to know, such as DEFINE_PROFILE, DEFINE_INIT, DEFINE_AT_ADJUST, etc.

And basic macros that access Fluent data, such as C_T, C_P, C_CENTROID
And basic marcos loop over cells, faces. thread_loop_c,....
Thanks again gearboy. I am learning all, plus its also kinda fun to learn and have it working.
kailash007 is offline   Reply With Quote

Reply

Tags
udf code

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to write a UDF for a transient temperature deathstar Fluent UDF and Scheme Programming 1 March 10, 2019 21:23
How to write a UDF for gas flow rate? Oula Fluent UDF and Scheme Programming 0 October 4, 2018 05:23
how to write udf for property that are depend on temperature ali.lajevardi Fluent UDF and Scheme Programming 0 June 22, 2015 10:11
How to write UDF to achieve phase chang dunga82 Fluent UDF and Scheme Programming 2 May 8, 2013 22:16
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 20:02.