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

Udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 9, 2020, 16:20
Default Udf
  #1
New Member
 
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 6
kedy6lsy is on a distinguished road
Hello guys,

I need to write a UDF to get the value calculated within to fluent to be inserted as input parameters

My problem is multi species:
Lewis = (k/p*Cp)/Di

which fluent help calculate the temperature dependent thermodynamic properties
-> mixture thermal conductivity,k
-> mixture density of species, p
-> mixture heat capacity, Cp

The lewis number is constant value so no problem

My aims is to calculate the diffusion coefficient for each species, Di from these output parameters.
kedy6lsy is offline   Reply With Quote

Old   February 10, 2020, 00:08
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Di = (k/p*Cp)/Lewis

use Ansys Fluent Customization manual to fined information on UDF
you should describe what do you mean under "using as input parameters": where?
show your code to discuss your problems
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   February 10, 2020, 00:21
Default
  #3
New Member
 
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 6
kedy6lsy is on a distinguished road
i attached a picture, when i write the UDF, the circle thermodynamics properties will be my the input parameters(during the simulation, perhaps like a loop), my friend told me the stored data will be inside the folder and can be extracted, but i not sure how to do it. Sorry for my bad English
Attached Images
File Type: png Capture.PNG (28.6 KB, 5 views)
kedy6lsy is offline   Reply With Quote

Old   February 10, 2020, 00:37
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
to find information on writing to file in Fluent:
1. read manual I've mentioned, search for Input/Output Macros
2. search through forum "write to file"
3. google

show your code if you have any problems
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   February 10, 2020, 05:23
Default Standard Macros
  #5
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
There are standard macros to do that. Since you need these properties to define diffusion coefficient, they have to correspond to same cell. Look at the example 2 given in UDF manual

https://www.afs.enea.it/project/nept...udf/node46.htm

Here PROP_ktc is thermal conductivity. You cannot use PROP_ macros to modify the properties, but you can use these to calculation and return any property with DEFINE_PROPERTY. Similarly, you have PROP_rho, PROP_Cp, PROP_mu, etc. All these are given in material.h located in Fluent's source directory at installation location.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   February 10, 2020, 15:28
Default
  #6
New Member
 
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 6
kedy6lsy is on a distinguished road
thank you, the material.h is useful indeed
kedy6lsy 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
udf for one dimensional linear motion based on force maccheese Fluent UDF and Scheme Programming 2 September 1, 2019 02:18
Save output of udf in another udf! JuanJoMex FLUENT 0 February 8, 2018 12:43
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 00:53
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 08:07.