Ansys Learning Forum Forums Discuss Simulation Fluids Incorrect area for an interior face through udf. Reply To: Incorrect area for an interior face through udf.

Atharva Nagarkar
Ansys Employee

Hello,

As per Ansys policy, employees cannot debug UDFs on this platform. However, I would request you to check the following things.

  • The DEFINE_ON_DEMAND will ensure that the UDF will be executed immediately, after it is activated, but it is not accessible while the solver is iterating. The link below from the Ansys Fluent Customization Manual explains how to use this macro. I would suggest you to look through the example of using this macro for better understanding.

2.2. General Purpose DEFINE Macros (ansys.com)

  • Ensure that the correct zone id is for using the domain variable for the zone_id function. Also, for the Get_Domain function, the argument value is 1 for the mixture domain, but the values for the phase domains can be any integer greater than 1. The ID for a particular phase can be found by selecting it in the Phases dialog box in Ansys Fluent. I have attached links from the Ansys Fluent Customization Manual related to these macros. 

3.2.6. Special Macros (ansys.com)

  • The issue might be because of incorrect Parallelization of the UDF. The link below from the Ansys Fluent Customization Manual contains information on all the concerned topics such as Compiler Directives, Node-to-Host Data Transfer, Global Summations and more. Please check that you have used them correctly.

7.3. Parallelizing Your Serial UDF (ansys.com)

  • I am also attaching the link for the calculation of the area magnitude using the NV_MAG macro. You might want to check the how the Face Area Normal Direction is defined in Ansys Fluent.

3.4.4. Vector Operation Macros (ansys.com); 3.2.4. Face Macros (ansys.com) 

If you are not able to access the link, please refer to this forum discussion: Using Help with links (ansys.com)

Thanks