CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Udf (https://www.cfd-online.com/Forums/fluent/224169-udf.html)

kedy6lsy February 9, 2020 16:20

Udf
 
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.

AlexanderZ February 10, 2020 00:08

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

kedy6lsy February 10, 2020 00:21

1 Attachment(s)
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

AlexanderZ February 10, 2020 00:37

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

vinerm February 10, 2020 05:23

Standard Macros
 
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.

kedy6lsy February 10, 2020 15:28

thank you, the material.h is useful indeed


All times are GMT -4. The time now is 14:56.