|
[Sponsors] |
April 1, 2019, 06:31 |
How to read variable values on a surface
|
#1 |
Member
Mattia
Join Date: Mar 2018
Posts: 45
Rep Power: 8 |
Good morning everyone, my project requires me to create a UDF that can read a variable value on a surface and then use that value in order to calculate another variable on a second surface. That must be done at each iteration. I understand that I can define the value of a variable by using Define_Profile or DEFINE_ADJUST, but I don't know how to read the value of the first variable in order to use it in my equation.
I hope my request is clear. Thanks for the help |
|
April 2, 2019, 01:22 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Read Ansys Fluent Customization manual
find there "User-Defined Memory (UDM) Macros" chapter if you want to read/write on each iteration you may use DEFINE_ADJUST macro or DEFINE_EXECUTE_AT_END macro, which execute your code before and after iteration respectively. If you've defined the variable it means you've used F_UDMI for that. To get this value you need to make loop over all face/threads and read this value best regards |
|
April 3, 2019, 08:52 |
|
#3 |
Member
Mattia
Join Date: Mar 2018
Posts: 45
Rep Power: 8 |
Thakns, my idea was to read the value, in this case the temperature of the input and of the output and then use them to modify the flow on the input at each iteration. Do you think that for the last task I should use DEFINE_ADJUST or DEFINE_PROFILE?
Because with the latter it happened this during the calculation: "libudf has wrong type: 1 != 12" |
|
April 3, 2019, 22:33 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
1.Read Ansys Fluent Customization manual
2.show your udf best regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX 11.0 "Vector Variable Normal” Does not Rotate with Domain? User Surface Moving | jrl4444 | CFX | 4 | November 14, 2013 18:46 |
FvPatchFields - read and write values in a patch | vitors | OpenFOAM Programming & Development | 0 | December 11, 2012 14:47 |
[Gmsh] boundaries with gmshToFoam | ouafa | OpenFOAM Meshing & Mesh Conversion | 7 | May 21, 2010 13:43 |
Values at certain distance around surface? | hornig | FLUENT | 0 | August 14, 2009 07:16 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 13, 2001 00:19 |