|
[Sponsors] |
February 9, 2020, 17:20 |
Udf
|
#1 |
New Member
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 7 |
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. |
|
February 10, 2020, 01:08 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
February 10, 2020, 01:21 |
|
#3 |
New Member
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 7 |
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
|
|
February 10, 2020, 01:37 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
February 10, 2020, 06:23 |
Standard Macros
|
#5 |
Senior Member
|
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. |
|
February 10, 2020, 16:28 |
|
#6 |
New Member
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 7 |
thank you, the material.h is useful indeed
|
|
|
|
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 03:18 |
Save output of udf in another udf! | JuanJoMex | FLUENT | 0 | February 8, 2018 13:43 |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |